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

Side by Side Diff: chrome/browser/extensions/api/page_capture/page_capture_api.h

Issue 10806072: Refactor chrome.pageCapture to use JSON schema compiler (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 months 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/page_capture/page_capture_api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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"
11 #include "chrome/browser/extensions/extension_function.h" 11 #include "chrome/browser/extensions/extension_function.h"
12 #include "chrome/common/extensions/api/page_capture.h"
12 #include "webkit/blob/shareable_file_reference.h" 13 #include "webkit/blob/shareable_file_reference.h"
13 14
14 class FilePath; 15 class FilePath;
15 16
16 namespace content { 17 namespace content {
17 class WebContents; 18 class WebContents;
18 } 19 }
19 20
20 namespace extensions { 21 namespace extensions {
21 22
(...skipping 23 matching lines...) Expand all
45 void TemporaryFileCreated(bool success); 46 void TemporaryFileCreated(bool success);
46 void ReturnFailure(const std::string& error); 47 void ReturnFailure(const std::string& error);
47 void ReturnSuccess(int64 file_size); 48 void ReturnSuccess(int64 file_size);
48 49
49 // Callback called once the MHTML generation is done. 50 // Callback called once the MHTML generation is done.
50 void MHTMLGenerated(const FilePath& file_path, int64 mhtml_file_size); 51 void MHTMLGenerated(const FilePath& file_path, int64 mhtml_file_size);
51 52
52 // Returns the WebContents we are associated with, NULL if it's been closed. 53 // Returns the WebContents we are associated with, NULL if it's been closed.
53 content::WebContents* GetWebContents(); 54 content::WebContents* GetWebContents();
54 55
55 int tab_id_; 56 scoped_ptr<extensions::api::page_capture::SaveAsMHTML::Params> params_;
56 57
57 // The path to the temporary file containing the MHTML data. 58 // The path to the temporary file containing the MHTML data.
58 FilePath mhtml_path_; 59 FilePath mhtml_path_;
59 60
60 // The file containing the MHTML. 61 // The file containing the MHTML.
61 scoped_refptr<webkit_blob::ShareableFileReference> mhtml_file_; 62 scoped_refptr<webkit_blob::ShareableFileReference> mhtml_file_;
62 63
63 DECLARE_EXTENSION_FUNCTION_NAME("pageCapture.saveAsMHTML") 64 DECLARE_EXTENSION_FUNCTION_NAME("pageCapture.saveAsMHTML")
64 }; 65 };
65 66
66 } // namespace extensions 67 } // namespace extensions
67 68
68 #endif // CHROME_BROWSER_EXTENSIONS_API_PAGE_CAPTURE_PAGE_CAPTURE_API_H_ 69 #endif // CHROME_BROWSER_EXTENSIONS_API_PAGE_CAPTURE_PAGE_CAPTURE_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/page_capture/page_capture_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698