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

Side by Side Diff: chrome/browser/chromeos/extensions/file_manager/private_api_misc.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // This file provides miscellaneous API functions, which don't belong to 5 // This file provides miscellaneous API functions, which don't belong to
6 // other files. 6 // other files.
7 7
8 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ 8 #ifndef CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_
9 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ 9 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 public: 67 public:
68 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.zipSelection", 68 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.zipSelection",
69 FILEBROWSERPRIVATE_ZIPSELECTION) 69 FILEBROWSERPRIVATE_ZIPSELECTION)
70 70
71 FileBrowserPrivateZipSelectionFunction(); 71 FileBrowserPrivateZipSelectionFunction();
72 72
73 protected: 73 protected:
74 virtual ~FileBrowserPrivateZipSelectionFunction(); 74 virtual ~FileBrowserPrivateZipSelectionFunction();
75 75
76 // AsyncExtensionFunction overrides. 76 // AsyncExtensionFunction overrides.
77 virtual bool RunImpl() OVERRIDE; 77 virtual bool RunAsync() OVERRIDE;
78 78
79 // Receives the result from ZipFileCreator. 79 // Receives the result from ZipFileCreator.
80 void OnZipDone(bool success); 80 void OnZipDone(bool success);
81 }; 81 };
82 82
83 // Implements the chrome.fileBrowserPrivate.zoom method. 83 // Implements the chrome.fileBrowserPrivate.zoom method.
84 // Changes the zoom level of the file manager by internally calling 84 // Changes the zoom level of the file manager by internally calling
85 // RenderViewHost::Zoom(). TODO(hirono): Remove this function once the zoom 85 // RenderViewHost::Zoom(). TODO(hirono): Remove this function once the zoom
86 // level change is supported for all apps. crbug.com/227175. 86 // level change is supported for all apps. crbug.com/227175.
87 class FileBrowserPrivateZoomFunction : public ChromeSyncExtensionFunction { 87 class FileBrowserPrivateZoomFunction : public ChromeSyncExtensionFunction {
(...skipping 12 matching lines...) Expand all
100 class FileBrowserPrivateInstallWebstoreItemFunction 100 class FileBrowserPrivateInstallWebstoreItemFunction
101 : public LoggedAsyncExtensionFunction { 101 : public LoggedAsyncExtensionFunction {
102 public: 102 public:
103 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.installWebstoreItem", 103 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.installWebstoreItem",
104 FILEBROWSERPRIVATE_INSTALLWEBSTOREITEM); 104 FILEBROWSERPRIVATE_INSTALLWEBSTOREITEM);
105 105
106 protected: 106 protected:
107 virtual ~FileBrowserPrivateInstallWebstoreItemFunction() {} 107 virtual ~FileBrowserPrivateInstallWebstoreItemFunction() {}
108 108
109 // AsyncExtensionFunction overrides. 109 // AsyncExtensionFunction overrides.
110 virtual bool RunImpl() OVERRIDE; 110 virtual bool RunAsync() OVERRIDE;
111 void OnInstallComplete(bool success, const std::string& error); 111 void OnInstallComplete(bool success, const std::string& error);
112 112
113 private: 113 private:
114 std::string webstore_item_id_; 114 std::string webstore_item_id_;
115 }; 115 };
116 116
117 class FileBrowserPrivateRequestWebStoreAccessTokenFunction 117 class FileBrowserPrivateRequestWebStoreAccessTokenFunction
118 : public LoggedAsyncExtensionFunction { 118 : public LoggedAsyncExtensionFunction {
119 public: 119 public:
120 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.requestWebStoreAccessToken", 120 DECLARE_EXTENSION_FUNCTION("fileBrowserPrivate.requestWebStoreAccessToken",
121 FILEBROWSERPRIVATE_REQUESTWEBSTOREACCESSTOKEN); 121 FILEBROWSERPRIVATE_REQUESTWEBSTOREACCESSTOKEN);
122 122
123 FileBrowserPrivateRequestWebStoreAccessTokenFunction(); 123 FileBrowserPrivateRequestWebStoreAccessTokenFunction();
124 124
125 protected: 125 protected:
126 virtual ~FileBrowserPrivateRequestWebStoreAccessTokenFunction(); 126 virtual ~FileBrowserPrivateRequestWebStoreAccessTokenFunction();
127 virtual bool RunImpl() OVERRIDE; 127 virtual bool RunAsync() OVERRIDE;
128 128
129 private: 129 private:
130 scoped_ptr<google_apis::AuthServiceInterface> auth_service_; 130 scoped_ptr<google_apis::AuthServiceInterface> auth_service_;
131 131
132 void OnAccessTokenFetched(google_apis::GDataErrorCode code, 132 void OnAccessTokenFetched(google_apis::GDataErrorCode code,
133 const std::string& access_token); 133 const std::string& access_token);
134 134
135 }; 135 };
136 136
137 class FileBrowserPrivateGetProfilesFunction 137 class FileBrowserPrivateGetProfilesFunction
(...skipping 18 matching lines...) Expand all
156 protected: 156 protected:
157 virtual ~FileBrowserPrivateVisitDesktopFunction() {} 157 virtual ~FileBrowserPrivateVisitDesktopFunction() {}
158 158
159 // AsyncExtensionFunction overrides. 159 // AsyncExtensionFunction overrides.
160 virtual bool RunSync() OVERRIDE; 160 virtual bool RunSync() OVERRIDE;
161 }; 161 };
162 162
163 } // namespace extensions 163 } // namespace extensions
164 164
165 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_ 165 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_FILE_MANAGER_PRIVATE_API_MISC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698