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 CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ |
6 #define CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ | 6 #define CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 void StreamMHTML(WebContents* web_contents, | 38 void StreamMHTML(WebContents* web_contents, |
39 base::File file, | 39 base::File file, |
40 const GenerateMHTMLCallback& callback); | 40 const GenerateMHTMLCallback& callback); |
41 | 41 |
42 // Notification from the renderer that the MHTML generation finished. | 42 // Notification from the renderer that the MHTML generation finished. |
43 // |mhtml_data_size| contains the size in bytes of the generated MHTML data, | 43 // |mhtml_data_size| contains the size in bytes of the generated MHTML data, |
44 // or -1 in case of failure. | 44 // or -1 in case of failure. |
45 void MHTMLGenerated(int job_id, int64 mhtml_data_size); | 45 void MHTMLGenerated(int job_id, int64 mhtml_data_size); |
46 | 46 |
47 private: | 47 private: |
48 friend struct DefaultSingletonTraits<MHTMLGenerationManager>; | 48 friend struct base::DefaultSingletonTraits<MHTMLGenerationManager>; |
49 class Job; | 49 class Job; |
50 | 50 |
51 MHTMLGenerationManager(); | 51 MHTMLGenerationManager(); |
52 virtual ~MHTMLGenerationManager(); | 52 virtual ~MHTMLGenerationManager(); |
53 | 53 |
54 // Called on the file thread to create |file|. | 54 // Called on the file thread to create |file|. |
55 void CreateFile(int job_id, | 55 void CreateFile(int job_id, |
56 const base::FilePath& file, | 56 const base::FilePath& file, |
57 base::ProcessHandle renderer_process); | 57 base::ProcessHandle renderer_process); |
58 | 58 |
(...skipping 20 matching lines...) Expand all Loading... |
79 | 79 |
80 typedef std::map<int, Job*> IDToJobMap; | 80 typedef std::map<int, Job*> IDToJobMap; |
81 IDToJobMap id_to_job_; | 81 IDToJobMap id_to_job_; |
82 | 82 |
83 DISALLOW_COPY_AND_ASSIGN(MHTMLGenerationManager); | 83 DISALLOW_COPY_AND_ASSIGN(MHTMLGenerationManager); |
84 }; | 84 }; |
85 | 85 |
86 } // namespace content | 86 } // namespace content |
87 | 87 |
88 #endif // CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ | 88 #endif // CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ |
OLD | NEW |