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

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

Issue 257333002: Drive extension functions from ExtensionFunction::Run. The (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 6 years, 7 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 | Annotate | Revision Log
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"
(...skipping 19 matching lines...) Expand all
30 class TestDelegate { 30 class TestDelegate {
31 public: 31 public:
32 // Called on the UI thread when the temporary file that contains the 32 // Called on the UI thread when the temporary file that contains the
33 // generated data has been created. 33 // generated data has been created.
34 virtual void OnTemporaryFileCreated(const base::FilePath& temp_file) = 0; 34 virtual void OnTemporaryFileCreated(const base::FilePath& temp_file) = 0;
35 }; 35 };
36 static void SetTestDelegate(TestDelegate* delegate); 36 static void SetTestDelegate(TestDelegate* delegate);
37 37
38 private: 38 private:
39 virtual ~PageCaptureSaveAsMHTMLFunction(); 39 virtual ~PageCaptureSaveAsMHTMLFunction();
40 virtual bool RunImpl() OVERRIDE; 40 virtual bool RunAsync() OVERRIDE;
41 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 41 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
42 42
43 // Called on the file thread. 43 // Called on the file thread.
44 void CreateTemporaryFile(); 44 void CreateTemporaryFile();
45 45
46 // Called on the UI thread. 46 // Called on the UI thread.
47 void TemporaryFileCreated(bool success); 47 void TemporaryFileCreated(bool success);
48 void ReturnFailure(const std::string& error); 48 void ReturnFailure(const std::string& error);
49 void ReturnSuccess(int64 file_size); 49 void ReturnSuccess(int64 file_size);
50 50
(...skipping 10 matching lines...) Expand all
61 61
62 // The file containing the MHTML. 62 // The file containing the MHTML.
63 scoped_refptr<webkit_blob::ShareableFileReference> mhtml_file_; 63 scoped_refptr<webkit_blob::ShareableFileReference> mhtml_file_;
64 64
65 DECLARE_EXTENSION_FUNCTION("pageCapture.saveAsMHTML", PAGECAPTURE_SAVEASMHTML) 65 DECLARE_EXTENSION_FUNCTION("pageCapture.saveAsMHTML", PAGECAPTURE_SAVEASMHTML)
66 }; 66 };
67 67
68 } // namespace extensions 68 } // namespace extensions
69 69
70 #endif // CHROME_BROWSER_EXTENSIONS_API_PAGE_CAPTURE_PAGE_CAPTURE_API_H_ 70 #endif // CHROME_BROWSER_EXTENSIONS_API_PAGE_CAPTURE_PAGE_CAPTURE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698