Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Side by Side Diff: content/browser/download/mhtml_generation_manager.h

Issue 1386873003: OOPIFs: Transitioning MHTML generation from view-oriented to frame-oriented. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mhtml-generation-mgr-cleanup
Patch Set: Moving "using" declaration under a singly-included section of frame_messges.h Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 19 matching lines...) Expand all
30 // generation. On success |file_size| indicates the size of the 30 // generation. On success |file_size| indicates the size of the
31 // generated file. On failure |file_size| is -1. 31 // generated file. On failure |file_size| is -1.
32 typedef base::Callback<void(int64 file_size)> GenerateMHTMLCallback; 32 typedef base::Callback<void(int64 file_size)> GenerateMHTMLCallback;
33 33
34 // Instructs the render view to generate a MHTML representation of the current 34 // Instructs the render view to generate a MHTML representation of the current
35 // page for |web_contents|. 35 // page for |web_contents|.
36 void SaveMHTML(WebContents* web_contents, 36 void SaveMHTML(WebContents* web_contents,
37 const base::FilePath& file_path, 37 const base::FilePath& file_path,
38 const GenerateMHTMLCallback& callback); 38 const GenerateMHTMLCallback& callback);
39 39
40 // Handler for ViewHostMsg_SavedPageAsMHTML (a notification from the renderer 40 // Handler for FrameHostMsg_SerializeAsMHTMLResponse (a notification from the
41 // that the MHTML generation finished). 41 // renderer that the MHTML generation finished for a single frame).
42 void OnSavedPageAsMHTML(int job_id, 42 void OnSavedFrameAsMHTML(int job_id,
43 bool mhtml_generation_in_renderer_succeeded); 43 bool mhtml_generation_in_renderer_succeeded);
44 44
45 private: 45 private:
46 friend struct base::DefaultSingletonTraits<MHTMLGenerationManager>; 46 friend struct base::DefaultSingletonTraits<MHTMLGenerationManager>;
47 class Job; 47 class Job;
48 enum class JobStatus { SUCCESS, FAILURE }; 48 enum class JobStatus { SUCCESS, FAILURE };
49 49
50 MHTMLGenerationManager(); 50 MHTMLGenerationManager();
51 virtual ~MHTMLGenerationManager(); 51 virtual ~MHTMLGenerationManager();
52 52
53 // Called on the file thread to create |file|. 53 // Called on the file thread to create |file|.
(...skipping 22 matching lines...) Expand all
76 IDToJobMap id_to_job_; 76 IDToJobMap id_to_job_;
77 77
78 int next_job_id_; 78 int next_job_id_;
79 79
80 DISALLOW_COPY_AND_ASSIGN(MHTMLGenerationManager); 80 DISALLOW_COPY_AND_ASSIGN(MHTMLGenerationManager);
81 }; 81 };
82 82
83 } // namespace content 83 } // namespace content
84 84
85 #endif // CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_ 85 #endif // CONTENT_BROWSER_DOWNLOAD_MHTML_GENERATION_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/save_page_browsertest.cc ('k') | content/browser/download/mhtml_generation_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698