Chromium Code Reviews| Index: content/browser/download/mhtml_generation_manager.h |
| diff --git a/content/browser/download/mhtml_generation_manager.h b/content/browser/download/mhtml_generation_manager.h |
| index eeb6b04b0491f24d396d33fd41c008aadeb136f6..9c186d96adc6b8a3d04e1af7db4c66768a6009a0 100644 |
| --- a/content/browser/download/mhtml_generation_manager.h |
| +++ b/content/browser/download/mhtml_generation_manager.h |
| @@ -24,21 +24,20 @@ class CONTENT_EXPORT MHTMLGenerationManager |
| MHTMLGenerationManager(); |
| ~MHTMLGenerationManager(); |
| + typedef base::Callback<void(const FilePath& /* path to the MHTML file */, |
|
jam
2011/11/22 23:06:00
nit: can you make these two parameters line up?
|
| + int64 /* size of the file */)> GenerateMHTMLCallback; |
| + |
| // Instructs the render view to generate a MHTML representation of the current |
| // page for |tab_contents|. |
| - void GenerateMHTML(TabContents* tab_contents, const FilePath& file); |
| + void GenerateMHTML(TabContents* tab_contents, |
| + const FilePath& file, |
| + const GenerateMHTMLCallback& callback); |
| // Notification from the renderer that the MHTML generation finished. |
| // |mhtml_data_size| contains the size in bytes of the generated MHTML data, |
| // or -1 in case of failure. |
| void MHTMLGenerated(int job_id, int64 mhtml_data_size); |
| - // The details sent along with the MHTML_GENERATED notification. |
| - struct NotificationDetails { |
| - FilePath file_path; |
| - int64 file_size; |
| - }; |
| - |
| private: |
| struct Job{ |
| Job(); |
| @@ -53,6 +52,9 @@ class CONTENT_EXPORT MHTMLGenerationManager |
| // The IDs mapping to a specific tab. |
| int process_id; |
| int routing_id; |
| + |
| + // The callback to call once generation is complete. |
| + GenerateMHTMLCallback callback; |
| }; |
| // Called on the file thread to create |file|. |