| 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 #ifndef CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ | 4 #ifndef CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ |
| 5 #define CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ | 5 #define CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 void SaveMHTML(WebContents* web_contents, | 46 void SaveMHTML(WebContents* web_contents, |
| 47 const MHTMLGenerationParams& params, | 47 const MHTMLGenerationParams& params, |
| 48 const GenerateMHTMLCallback& callback); | 48 const GenerateMHTMLCallback& callback); |
| 49 | 49 |
| 50 // Handler for FrameHostMsg_SerializeAsMHTMLResponse (a notification from the | 50 // Handler for FrameHostMsg_SerializeAsMHTMLResponse (a notification from the |
| 51 // renderer that the MHTML generation finished for a single frame). | 51 // renderer that the MHTML generation finished for a single frame). |
| 52 void OnSerializeAsMHTMLResponse( | 52 void OnSerializeAsMHTMLResponse( |
| 53 RenderFrameHostImpl* sender, | 53 RenderFrameHostImpl* sender, |
| 54 int job_id, | 54 int job_id, |
| 55 bool mhtml_generation_in_renderer_succeeded, | 55 bool mhtml_generation_in_renderer_succeeded, |
| 56 const std::set<std::string>& digests_of_uris_of_serialized_resources); | 56 const std::set<std::string>& digests_of_uris_of_serialized_resources, |
| 57 base::TimeDelta renderer_main_thread_time); |
| 57 | 58 |
| 58 private: | 59 private: |
| 59 friend struct base::DefaultSingletonTraits<MHTMLGenerationManager>; | 60 friend struct base::DefaultSingletonTraits<MHTMLGenerationManager>; |
| 60 class Job; | 61 class Job; |
| 61 enum class JobStatus { SUCCESS, FAILURE }; | 62 enum class JobStatus { SUCCESS, FAILURE }; |
| 62 | 63 |
| 63 MHTMLGenerationManager(); | 64 MHTMLGenerationManager(); |
| 64 virtual ~MHTMLGenerationManager(); | 65 virtual ~MHTMLGenerationManager(); |
| 65 | 66 |
| 66 // Called on the file thread to create |file|. | 67 // Called on the file thread to create |file|. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 91 IDToJobMap id_to_job_; | 92 IDToJobMap id_to_job_; |
| 92 | 93 |
| 93 int next_job_id_; | 94 int next_job_id_; |
| 94 | 95 |
| 95 DISALLOW_COPY_AND_ASSIGN(MHTMLGenerationManager); | 96 DISALLOW_COPY_AND_ASSIGN(MHTMLGenerationManager); |
| 96 }; | 97 }; |
| 97 | 98 |
| 98 } // namespace content | 99 } // namespace content |
| 99 | 100 |
| 100 #endif // CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ | 101 #endif // CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ |
| OLD | NEW |