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

Side by Side Diff: chrome/browser/extensions/extension_webstore_private_api.h

Issue 4727001: Split the private webstore install API into two parts.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_EXTENSION_WEBSTORE_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_
7 #pragma once 7 #pragma once
8 8
9 #include "chrome/browser/browser_signin.h" 9 #include "chrome/browser/browser_signin.h"
10 #include "chrome/browser/extensions/extension_function.h" 10 #include "chrome/browser/extensions/extension_function.h"
11 #include "chrome/common/net/gaia/google_service_auth_error.h" 11 #include "chrome/common/net/gaia/google_service_auth_error.h"
12 #include "chrome/common/notification_observer.h" 12 #include "chrome/common/notification_observer.h"
13 #include "chrome/common/notification_registrar.h" 13 #include "chrome/common/notification_registrar.h"
14 14
15 class ProfileSyncService; 15 class ProfileSyncService;
16 16
17 class WebstorePrivateApi { 17 class WebstorePrivateApi {
18 public: 18 public:
19 // Allows you to set the ProfileSyncService the function will use for 19 // Allows you to set the ProfileSyncService the function will use for
20 // testing purposes. 20 // testing purposes.
21 static void SetTestingProfileSyncService(ProfileSyncService* service); 21 static void SetTestingProfileSyncService(ProfileSyncService* service);
22 22
23 // Allows you to set the BrowserSignin the function will use for 23 // Allows you to set the BrowserSignin the function will use for
24 // testing purposes. 24 // testing purposes.
25 static void SetTestingBrowserSignin(BrowserSignin* signin); 25 static void SetTestingBrowserSignin(BrowserSignin* signin);
26 }; 26 };
27 27
28 // TODO(asargent) - this function is deprecated. We can remove it sometime
29 // after the chrome milestone 9 timeframe.
Erik does not do reviews 2010/11/09 16:32:21 why can't we just remove it? I don't think anythi
asargent_no_longer_on_chrome 2010/11/10 00:23:48 Ok, removed
28 class InstallFunction : public SyncExtensionFunction { 30 class InstallFunction : public SyncExtensionFunction {
29 public:
30 static void SetTestingInstallBaseUrl(const char* testing_install_base_url);
31
32 protected:
33 ~InstallFunction() {}
34 virtual bool RunImpl(); 31 virtual bool RunImpl();
35 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.install"); 32 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.install");
36 }; 33 };
37 34
35 class BeginInstallFunction : public SyncExtensionFunction {
36 public:
37 // For use only in tests - sets a flag that can cause this function to ignore
38 // the normal requirement that it is called during a user gesture.
39 static void SetIgnoreUserGestureForTests(bool ignore);
40 protected:
41 virtual bool RunImpl();
42 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.beginInstall");
43 };
44
45 class CompleteInstallFunction : public SyncExtensionFunction {
46 public:
47 static void SetTestingInstallBaseUrl(const char* testing_install_base_url);
Erik does not do reviews 2010/11/09 16:32:21 add comment
asargent_no_longer_on_chrome 2010/11/10 00:23:48 Done.
48 protected:
49 virtual bool RunImpl();
50 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.completeInstall");
51 };
52
38 class GetBrowserLoginFunction : public SyncExtensionFunction { 53 class GetBrowserLoginFunction : public SyncExtensionFunction {
39 virtual bool RunImpl(); 54 virtual bool RunImpl();
40 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.getBrowserLogin"); 55 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.getBrowserLogin");
41 }; 56 };
42 57
43 class GetStoreLoginFunction : public SyncExtensionFunction { 58 class GetStoreLoginFunction : public SyncExtensionFunction {
44 virtual bool RunImpl(); 59 virtual bool RunImpl();
45 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.getStoreLogin"); 60 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.getStoreLogin");
46 }; 61 };
47 62
(...skipping 27 matching lines...) Expand all
75 // Are we waiting for a token available notification? 90 // Are we waiting for a token available notification?
76 bool waiting_for_token_; 91 bool waiting_for_token_;
77 92
78 // Used for listening for TokenService notifications. 93 // Used for listening for TokenService notifications.
79 NotificationRegistrar registrar_; 94 NotificationRegistrar registrar_;
80 95
81 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.promptBrowserLogin"); 96 DECLARE_EXTENSION_FUNCTION_NAME("webstorePrivate.promptBrowserLogin");
82 }; 97 };
83 98
84 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_ 99 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEBSTORE_PRIVATE_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698