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

Side by Side Diff: chrome/browser/extensions/api/webstore_private/webstore_private_api.h

Issue 252653002: Rename (Chrome)SyncExtensionFunction::RunImpl to RunSync so that the RunImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/extensions/bundle_installer.h" 10 #include "chrome/browser/extensions/bundle_installer.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 // BundleInstaller::Delegate: 55 // BundleInstaller::Delegate:
56 virtual void OnBundleInstallApproved() OVERRIDE; 56 virtual void OnBundleInstallApproved() OVERRIDE;
57 virtual void OnBundleInstallCanceled(bool user_initiated) OVERRIDE; 57 virtual void OnBundleInstallCanceled(bool user_initiated) OVERRIDE;
58 virtual void OnBundleInstallCompleted() OVERRIDE; 58 virtual void OnBundleInstallCompleted() OVERRIDE;
59 59
60 protected: 60 protected:
61 virtual ~WebstorePrivateInstallBundleFunction(); 61 virtual ~WebstorePrivateInstallBundleFunction();
62 62
63 // ExtensionFunction: 63 // ExtensionFunction:
64 virtual bool RunImpl() OVERRIDE; 64 virtual bool RunSync() OVERRIDE;
65 65
66 // Reads the extension |details| into |items|. 66 // Reads the extension |details| into |items|.
67 bool ReadBundleInfo( 67 bool ReadBundleInfo(
68 const api::webstore_private::InstallBundle::Params& details, 68 const api::webstore_private::InstallBundle::Params& details,
69 extensions::BundleInstaller::ItemList* items); 69 extensions::BundleInstaller::ItemList* items);
70 70
71 private: 71 private:
72 scoped_refptr<extensions::BundleInstaller> bundle_; 72 scoped_refptr<extensions::BundleInstaller> bundle_;
73 }; 73 };
74 74
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 const std::string& error_message) OVERRIDE; 128 const std::string& error_message) OVERRIDE;
129 129
130 // ExtensionInstallPrompt::Delegate: 130 // ExtensionInstallPrompt::Delegate:
131 virtual void InstallUIProceed() OVERRIDE; 131 virtual void InstallUIProceed() OVERRIDE;
132 virtual void InstallUIAbort(bool user_initiated) OVERRIDE; 132 virtual void InstallUIAbort(bool user_initiated) OVERRIDE;
133 133
134 protected: 134 protected:
135 virtual ~WebstorePrivateBeginInstallWithManifest3Function(); 135 virtual ~WebstorePrivateBeginInstallWithManifest3Function();
136 136
137 // ExtensionFunction: 137 // ExtensionFunction:
138 virtual bool RunImpl() OVERRIDE; 138 virtual bool RunSync() OVERRIDE;
139 139
140 // Sets the result_ as a string based on |code|. 140 // Sets the result_ as a string based on |code|.
141 void SetResultCode(ResultCode code); 141 void SetResultCode(ResultCode code);
142 142
143 private: 143 private:
144 // SigninTracker::Observer override. 144 // SigninTracker::Observer override.
145 virtual void SigninFailed(const GoogleServiceAuthError& error) OVERRIDE; 145 virtual void SigninFailed(const GoogleServiceAuthError& error) OVERRIDE;
146 virtual void SigninSuccess() OVERRIDE; 146 virtual void SigninSuccess() OVERRIDE;
147 virtual void MergeSessionComplete( 147 virtual void MergeSessionComplete(
148 const GoogleServiceAuthError& error) OVERRIDE; 148 const GoogleServiceAuthError& error) OVERRIDE;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 virtual void OnExtensionInstallSuccess(const std::string& id) OVERRIDE; 182 virtual void OnExtensionInstallSuccess(const std::string& id) OVERRIDE;
183 virtual void OnExtensionInstallFailure( 183 virtual void OnExtensionInstallFailure(
184 const std::string& id, 184 const std::string& id,
185 const std::string& error, 185 const std::string& error,
186 WebstoreInstaller::FailureReason reason) OVERRIDE; 186 WebstoreInstaller::FailureReason reason) OVERRIDE;
187 187
188 protected: 188 protected:
189 virtual ~WebstorePrivateCompleteInstallFunction(); 189 virtual ~WebstorePrivateCompleteInstallFunction();
190 190
191 // ExtensionFunction: 191 // ExtensionFunction:
192 virtual bool RunImpl() OVERRIDE; 192 virtual bool RunSync() OVERRIDE;
193 193
194 private: 194 private:
195 scoped_ptr<WebstoreInstaller::Approval> approval_; 195 scoped_ptr<WebstoreInstaller::Approval> approval_;
196 }; 196 };
197 197
198 class WebstorePrivateEnableAppLauncherFunction 198 class WebstorePrivateEnableAppLauncherFunction
199 : public ChromeSyncExtensionFunction { 199 : public ChromeSyncExtensionFunction {
200 public: 200 public:
201 DECLARE_EXTENSION_FUNCTION("webstorePrivate.enableAppLauncher", 201 DECLARE_EXTENSION_FUNCTION("webstorePrivate.enableAppLauncher",
202 WEBSTOREPRIVATE_ENABLEAPPLAUNCHER) 202 WEBSTOREPRIVATE_ENABLEAPPLAUNCHER)
203 203
204 WebstorePrivateEnableAppLauncherFunction(); 204 WebstorePrivateEnableAppLauncherFunction();
205 205
206 protected: 206 protected:
207 virtual ~WebstorePrivateEnableAppLauncherFunction(); 207 virtual ~WebstorePrivateEnableAppLauncherFunction();
208 208
209 // ExtensionFunction: 209 // ExtensionFunction:
210 virtual bool RunImpl() OVERRIDE; 210 virtual bool RunSync() OVERRIDE;
211 }; 211 };
212 212
213 class WebstorePrivateGetBrowserLoginFunction 213 class WebstorePrivateGetBrowserLoginFunction
214 : public ChromeSyncExtensionFunction { 214 : public ChromeSyncExtensionFunction {
215 public: 215 public:
216 DECLARE_EXTENSION_FUNCTION("webstorePrivate.getBrowserLogin", 216 DECLARE_EXTENSION_FUNCTION("webstorePrivate.getBrowserLogin",
217 WEBSTOREPRIVATE_GETBROWSERLOGIN) 217 WEBSTOREPRIVATE_GETBROWSERLOGIN)
218 218
219 protected: 219 protected:
220 virtual ~WebstorePrivateGetBrowserLoginFunction() {} 220 virtual ~WebstorePrivateGetBrowserLoginFunction() {}
221 221
222 // ExtensionFunction: 222 // ExtensionFunction:
223 virtual bool RunImpl() OVERRIDE; 223 virtual bool RunSync() OVERRIDE;
224 }; 224 };
225 225
226 class WebstorePrivateGetStoreLoginFunction 226 class WebstorePrivateGetStoreLoginFunction
227 : public ChromeSyncExtensionFunction { 227 : public ChromeSyncExtensionFunction {
228 public: 228 public:
229 DECLARE_EXTENSION_FUNCTION("webstorePrivate.getStoreLogin", 229 DECLARE_EXTENSION_FUNCTION("webstorePrivate.getStoreLogin",
230 WEBSTOREPRIVATE_GETSTORELOGIN) 230 WEBSTOREPRIVATE_GETSTORELOGIN)
231 231
232 protected: 232 protected:
233 virtual ~WebstorePrivateGetStoreLoginFunction() {} 233 virtual ~WebstorePrivateGetStoreLoginFunction() {}
234 234
235 // ExtensionFunction: 235 // ExtensionFunction:
236 virtual bool RunImpl() OVERRIDE; 236 virtual bool RunSync() OVERRIDE;
237 }; 237 };
238 238
239 class WebstorePrivateSetStoreLoginFunction 239 class WebstorePrivateSetStoreLoginFunction
240 : public ChromeSyncExtensionFunction { 240 : public ChromeSyncExtensionFunction {
241 public: 241 public:
242 DECLARE_EXTENSION_FUNCTION("webstorePrivate.setStoreLogin", 242 DECLARE_EXTENSION_FUNCTION("webstorePrivate.setStoreLogin",
243 WEBSTOREPRIVATE_SETSTORELOGIN) 243 WEBSTOREPRIVATE_SETSTORELOGIN)
244 244
245 protected: 245 protected:
246 virtual ~WebstorePrivateSetStoreLoginFunction() {} 246 virtual ~WebstorePrivateSetStoreLoginFunction() {}
247 247
248 // ExtensionFunction: 248 // ExtensionFunction:
249 virtual bool RunImpl() OVERRIDE; 249 virtual bool RunSync() OVERRIDE;
250 }; 250 };
251 251
252 class WebstorePrivateGetWebGLStatusFunction 252 class WebstorePrivateGetWebGLStatusFunction
253 : public ChromeAsyncExtensionFunction { 253 : public ChromeAsyncExtensionFunction {
254 public: 254 public:
255 DECLARE_EXTENSION_FUNCTION("webstorePrivate.getWebGLStatus", 255 DECLARE_EXTENSION_FUNCTION("webstorePrivate.getWebGLStatus",
256 WEBSTOREPRIVATE_GETWEBGLSTATUS) 256 WEBSTOREPRIVATE_GETWEBGLSTATUS)
257 257
258 WebstorePrivateGetWebGLStatusFunction(); 258 WebstorePrivateGetWebGLStatusFunction();
259 259
260 protected: 260 protected:
261 virtual ~WebstorePrivateGetWebGLStatusFunction(); 261 virtual ~WebstorePrivateGetWebGLStatusFunction();
262 262
263 void OnFeatureCheck(bool feature_allowed); 263 void OnFeatureCheck(bool feature_allowed);
264 264
265 // ExtensionFunction: 265 // ExtensionFunction:
266 virtual bool RunImpl() OVERRIDE; 266 virtual bool RunSync() OVERRIDE;
267 267
268 private: 268 private:
269 void CreateResult(bool webgl_allowed); 269 void CreateResult(bool webgl_allowed);
270 270
271 scoped_refptr<GPUFeatureChecker> feature_checker_; 271 scoped_refptr<GPUFeatureChecker> feature_checker_;
272 }; 272 };
273 273
274 class WebstorePrivateGetIsLauncherEnabledFunction 274 class WebstorePrivateGetIsLauncherEnabledFunction
275 : public ChromeSyncExtensionFunction { 275 : public ChromeSyncExtensionFunction {
276 public: 276 public:
277 DECLARE_EXTENSION_FUNCTION("webstorePrivate.getIsLauncherEnabled", 277 DECLARE_EXTENSION_FUNCTION("webstorePrivate.getIsLauncherEnabled",
278 WEBSTOREPRIVATE_GETISLAUNCHERENABLED) 278 WEBSTOREPRIVATE_GETISLAUNCHERENABLED)
279 279
280 WebstorePrivateGetIsLauncherEnabledFunction() {} 280 WebstorePrivateGetIsLauncherEnabledFunction() {}
281 281
282 protected: 282 protected:
283 virtual ~WebstorePrivateGetIsLauncherEnabledFunction() {} 283 virtual ~WebstorePrivateGetIsLauncherEnabledFunction() {}
284 284
285 // ExtensionFunction: 285 // ExtensionFunction:
286 virtual bool RunImpl() OVERRIDE; 286 virtual bool RunSync() OVERRIDE;
287 287
288 private: 288 private:
289 void OnIsLauncherCheckCompleted(bool is_enabled); 289 void OnIsLauncherCheckCompleted(bool is_enabled);
290 }; 290 };
291 291
292 class WebstorePrivateIsInIncognitoModeFunction 292 class WebstorePrivateIsInIncognitoModeFunction
293 : public ChromeSyncExtensionFunction { 293 : public ChromeSyncExtensionFunction {
294 public: 294 public:
295 DECLARE_EXTENSION_FUNCTION("webstorePrivate.isInIncognitoMode", 295 DECLARE_EXTENSION_FUNCTION("webstorePrivate.isInIncognitoMode",
296 WEBSTOREPRIVATE_ISININCOGNITOMODEFUNCTION) 296 WEBSTOREPRIVATE_ISININCOGNITOMODEFUNCTION)
297 297
298 WebstorePrivateIsInIncognitoModeFunction() {} 298 WebstorePrivateIsInIncognitoModeFunction() {}
299 299
300 protected: 300 protected:
301 virtual ~WebstorePrivateIsInIncognitoModeFunction() {} 301 virtual ~WebstorePrivateIsInIncognitoModeFunction() {}
302 302
303 // ExtensionFunction: 303 // ExtensionFunction:
304 virtual bool RunImpl() OVERRIDE; 304 virtual bool RunSync() OVERRIDE;
305 }; 305 };
306 306
307 } // namespace extensions 307 } // namespace extensions
308 308
309 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H _ 309 #endif // CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698