| Index: chrome/browser/extensions/api/webstore_private/webstore_private_api.h
|
| diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_api.h b/chrome/browser/extensions/api/webstore_private/webstore_private_api.h
|
| index 57f2b7a0dbb6d2848d053d22a2a8cd2bb4bc01b9..6dbc753728e8926ef9929c9c9339d9ab6e7c309a 100644
|
| --- a/chrome/browser/extensions/api/webstore_private/webstore_private_api.h
|
| +++ b/chrome/browser/extensions/api/webstore_private/webstore_private_api.h
|
| @@ -12,6 +12,7 @@
|
| #include "chrome/browser/extensions/extension_install_prompt.h"
|
| #include "chrome/browser/extensions/webstore_install_helper.h"
|
| #include "chrome/browser/extensions/webstore_installer.h"
|
| +#include "chrome/browser/signin/signin_manager_factory.h"
|
| #include "chrome/browser/signin/signin_tracker.h"
|
| #include "chrome/common/extensions/api/webstore_private.h"
|
| #include "content/public/browser/gpu_data_manager_observer.h"
|
| @@ -21,6 +22,7 @@
|
| #include "third_party/skia/include/core/SkBitmap.h"
|
|
|
| class ProfileSyncService;
|
| +class SigninManagerBase;
|
|
|
| namespace content {
|
| class GpuDataManager;
|
| @@ -304,6 +306,38 @@ class WebstorePrivateIsInIncognitoModeFunction
|
| virtual bool RunImpl() OVERRIDE;
|
| };
|
|
|
| +class WebstorePrivateSignInFunction : public ChromeAsyncExtensionFunction,
|
| + public SigninManagerFactory::Observer,
|
| + public SigninTracker::Observer {
|
| + public:
|
| + DECLARE_EXTENSION_FUNCTION("webstorePrivate.signIn",
|
| + WEBSTOREPRIVATE_SIGNINFUNCTION)
|
| +
|
| + WebstorePrivateSignInFunction();
|
| +
|
| + protected:
|
| + virtual ~WebstorePrivateSignInFunction();
|
| +
|
| + // ExtensionFunction:
|
| + virtual bool RunImpl() OVERRIDE;
|
| +
|
| + // SigninManagerFactory::Observer:
|
| + virtual void SigninManagerShutdown(SigninManagerBase* manager) OVERRIDE;
|
| +
|
| + // SigninTracker::Observer:
|
| + virtual void SigninFailed(const GoogleServiceAuthError& error) OVERRIDE;
|
| + virtual void SigninSuccess() OVERRIDE;
|
| + virtual void MergeSessionComplete(const GoogleServiceAuthError& error)
|
| + OVERRIDE;
|
| +
|
| + private:
|
| + // The sign-in manager for the invoking tab's Chrome Profile. Weak reference.
|
| + SigninManagerBase* signin_manager_;
|
| +
|
| + // TODO(isherman):
|
| + scoped_ptr<SigninTracker> signin_tracker_;
|
| +};
|
| +
|
| } // namespace extensions
|
|
|
| #endif // CHROME_BROWSER_EXTENSIONS_API_WEBSTORE_PRIVATE_WEBSTORE_PRIVATE_API_H_
|
|
|