| Index: chrome/browser/ui/webui/sync_setup_handler.h
|
| diff --git a/chrome/browser/ui/webui/sync_setup_handler.h b/chrome/browser/ui/webui/sync_setup_handler.h
|
| index 9838ec8368a4b1ca8073d6c3039b5cc5ac4fcc66..29c755907c2de48c4d2c98dd7d97218a5acd4709 100644
|
| --- a/chrome/browser/ui/webui/sync_setup_handler.h
|
| +++ b/chrome/browser/ui/webui/sync_setup_handler.h
|
| @@ -11,15 +11,21 @@
|
| #include "chrome/browser/signin/signin_tracker.h"
|
| #include "chrome/browser/ui/webui/options/options_ui.h"
|
| #include "chrome/browser/ui/webui/signin/login_ui_service.h"
|
| +#include "content/public/browser/web_contents_observer.h"
|
|
|
| class LoginUIService;
|
| class ProfileManager;
|
| class ProfileSyncService;
|
| class SigninManager;
|
|
|
| +namespace content {
|
| +class WebContents;
|
| +}
|
| +
|
| class SyncSetupHandler : public options::OptionsPageUIHandler,
|
| public SigninTracker::Observer,
|
| - public LoginUIService::LoginUI {
|
| + public LoginUIService::LoginUI,
|
| + public content::WebContentsObserver {
|
| public:
|
| // Constructs a new SyncSetupHandler. |profile_manager| may be NULL.
|
| explicit SyncSetupHandler(ProfileManager* profile_manager);
|
| @@ -39,6 +45,10 @@ class SyncSetupHandler : public options::OptionsPageUIHandler,
|
| virtual void FocusUI() OVERRIDE;
|
| virtual void CloseUI() OVERRIDE;
|
|
|
| + // content::WebContentsObserver implementation.
|
| + virtual void WebContentsDestroyed(
|
| + content::WebContents* web_contents) OVERRIDE;
|
| +
|
| static void GetStaticLocalizedValues(
|
| base::DictionaryValue* localized_strings,
|
| content::WebUI* web_ui);
|
| @@ -164,6 +174,9 @@ class SyncSetupHandler : public options::OptionsPageUIHandler,
|
| // Invokes the javascript call to close the setup overlay.
|
| void CloseOverlay();
|
|
|
| + // When using web-flow, closes the Gaia used to collection user credentials.
|
| + void CloseGaiaSigninPage();
|
| +
|
| // Returns true if the given login data is valid, false otherwise. If the
|
| // login data is not valid then on return |error_message| will be set to a
|
| // localized error message. Note, |error_message| must not be NULL.
|
| @@ -201,6 +214,13 @@ class SyncSetupHandler : public options::OptionsPageUIHandler,
|
| // service.
|
| scoped_ptr<base::OneShotTimer<SyncSetupHandler> > backend_start_timer_;
|
|
|
| + // When using web-flow, pointer to the tab that holds the Gaia sign in page.
|
| + content::WebContents* active_gaia_signin_tab_;
|
| +
|
| + // When using web-flow, this member holds the SyncSetupHandler instance
|
| + // that initiated the Gaia sign in.
|
| + static SyncSetupHandler* active_sync_setup_handler_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler);
|
| };
|
|
|
|
|