| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PAGE_CAPTURE_PAGE_CAPTURE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PAGE_CAPTURE_PAGE_CAPTURE_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_PAGE_CAPTURE_PAGE_CAPTURE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_PAGE_CAPTURE_PAGE_CAPTURE_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 // Called on the file thread. | 44 // Called on the file thread. |
| 45 void CreateTemporaryFile(); | 45 void CreateTemporaryFile(); |
| 46 | 46 |
| 47 // Called on the UI thread. | 47 // Called on the UI thread. |
| 48 void TemporaryFileCreated(bool success); | 48 void TemporaryFileCreated(bool success); |
| 49 void ReturnFailure(const std::string& error); | 49 void ReturnFailure(const std::string& error); |
| 50 void ReturnSuccess(int64 file_size); | 50 void ReturnSuccess(int64 file_size); |
| 51 | 51 |
| 52 // Callback called once the MHTML generation is done. | 52 // Callback called once the MHTML generation is done. |
| 53 void MHTMLGenerated(const base::FilePath& file_path, int64 mhtml_file_size); | 53 void MHTMLGenerated(int64 mhtml_file_size); |
| 54 | 54 |
| 55 // Returns the WebContents we are associated with, NULL if it's been closed. | 55 // Returns the WebContents we are associated with, NULL if it's been closed. |
| 56 content::WebContents* GetWebContents(); | 56 content::WebContents* GetWebContents(); |
| 57 | 57 |
| 58 scoped_ptr<extensions::api::page_capture::SaveAsMHTML::Params> params_; | 58 scoped_ptr<extensions::api::page_capture::SaveAsMHTML::Params> params_; |
| 59 | 59 |
| 60 // The path to the temporary file containing the MHTML data. | 60 // The path to the temporary file containing the MHTML data. |
| 61 base::FilePath mhtml_path_; | 61 base::FilePath mhtml_path_; |
| 62 | 62 |
| 63 // The file containing the MHTML. | 63 // The file containing the MHTML. |
| 64 scoped_refptr<webkit_blob::ShareableFileReference> mhtml_file_; | 64 scoped_refptr<webkit_blob::ShareableFileReference> mhtml_file_; |
| 65 | 65 |
| 66 DECLARE_EXTENSION_FUNCTION("pageCapture.saveAsMHTML", PAGECAPTURE_SAVEASMHTML) | 66 DECLARE_EXTENSION_FUNCTION("pageCapture.saveAsMHTML", PAGECAPTURE_SAVEASMHTML) |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } // namespace extensions | 69 } // namespace extensions |
| 70 | 70 |
| 71 #endif // CHROME_BROWSER_EXTENSIONS_API_PAGE_CAPTURE_PAGE_CAPTURE_API_H_ | 71 #endif // CHROME_BROWSER_EXTENSIONS_API_PAGE_CAPTURE_PAGE_CAPTURE_API_H_ |
| OLD | NEW |