| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_UI_WEBUI_SETTINGS_PEOPLE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_PEOPLE_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_PEOPLE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SETTINGS_PEOPLE_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 void RegisterMessages() override; | 96 void RegisterMessages() override; |
| 97 void OnJavascriptAllowed() override; | 97 void OnJavascriptAllowed() override; |
| 98 void OnJavascriptDisallowed() override; | 98 void OnJavascriptDisallowed() override; |
| 99 | 99 |
| 100 // SyncStartupTracker::Observer implementation. | 100 // SyncStartupTracker::Observer implementation. |
| 101 void SyncStartupCompleted() override; | 101 void SyncStartupCompleted() override; |
| 102 void SyncStartupFailed() override; | 102 void SyncStartupFailed() override; |
| 103 | 103 |
| 104 // LoginUIService::LoginUI implementation. | 104 // LoginUIService::LoginUI implementation. |
| 105 void FocusUI() override; | 105 void FocusUI() override; |
| 106 void CloseUI() override; | |
| 107 | 106 |
| 108 // SigninManagerBase::Observer implementation. | 107 // SigninManagerBase::Observer implementation. |
| 109 void GoogleSigninSucceeded(const std::string& account_id, | 108 void GoogleSigninSucceeded(const std::string& account_id, |
| 110 const std::string& username, | 109 const std::string& username, |
| 111 const std::string& password) override; | 110 const std::string& password) override; |
| 112 void GoogleSignedOut(const std::string& account_id, | 111 void GoogleSignedOut(const std::string& account_id, |
| 113 const std::string& username) override; | 112 const std::string& username) override; |
| 114 | 113 |
| 115 // sync_driver::SyncServiceObserver implementation. | 114 // sync_driver::SyncServiceObserver implementation. |
| 116 void OnStateChanged() override; | 115 void OnStateChanged() override; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 141 #if !defined(OS_CHROMEOS) | 140 #if !defined(OS_CHROMEOS) |
| 142 // Displays the GAIA login form. | 141 // Displays the GAIA login form. |
| 143 void DisplayGaiaLogin(signin_metrics::AccessPoint access_point); | 142 void DisplayGaiaLogin(signin_metrics::AccessPoint access_point); |
| 144 | 143 |
| 145 // When web-flow is enabled, displays the Gaia login form in a new tab. | 144 // When web-flow is enabled, displays the Gaia login form in a new tab. |
| 146 // This function is virtual so that tests can override. | 145 // This function is virtual so that tests can override. |
| 147 virtual void DisplayGaiaLoginInNewTabOrWindow( | 146 virtual void DisplayGaiaLoginInNewTabOrWindow( |
| 148 signin_metrics::AccessPoint access_point); | 147 signin_metrics::AccessPoint access_point); |
| 149 #endif | 148 #endif |
| 150 | 149 |
| 151 // A utility function to call before actually showing setup dialog. Makes sure | |
| 152 // that a new dialog can be shown and sets flag that setup is in progress. | |
| 153 bool PrepareSyncSetup(); | |
| 154 | |
| 155 // Displays spinner-only UI indicating that something is going on in the | 150 // Displays spinner-only UI indicating that something is going on in the |
| 156 // background. | 151 // background. |
| 157 // TODO(kochi): better to show some message that the user can understand what | 152 // TODO(kochi): better to show some message that the user can understand what |
| 158 // is running in the background. | 153 // is running in the background. |
| 159 void DisplaySpinner(); | 154 void DisplaySpinner(); |
| 160 | 155 |
| 161 // Displays an error dialog which shows timeout of starting the sync backend. | 156 // Displays an error dialog which shows timeout of starting the sync backend. |
| 162 void DisplayTimeout(); | 157 void DisplayTimeout(); |
| 163 | 158 |
| 164 // Returns true if this object is the active login object. | 159 // Closes the associated sync settings page. |
| 165 bool IsActiveLogin() const; | 160 void CloseUI(); |
| 166 | |
| 167 // If a wizard already exists, return true. Otherwise, return false. | |
| 168 bool IsExistingWizardPresent(); | |
| 169 | |
| 170 // If a wizard already exists, focus it and return true. | |
| 171 bool FocusExistingWizardIfPresent(); | |
| 172 | 161 |
| 173 // Pushes the updated sync prefs to JavaScript. | 162 // Pushes the updated sync prefs to JavaScript. |
| 174 void PushSyncPrefs(); | 163 void PushSyncPrefs(); |
| 175 | 164 |
| 176 // Sends the current sync status to the JavaScript WebUI code. | 165 // Sends the current sync status to the JavaScript WebUI code. |
| 177 void UpdateSyncStatus(); | 166 void UpdateSyncStatus(); |
| 178 | 167 |
| 179 // Suppresses any further signin promos, since the user has signed in once. | 168 // Suppresses any further signin promos, since the user has signed in once. |
| 180 void MarkFirstSetupComplete(); | 169 void MarkFirstSetupComplete(); |
| 181 | 170 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 200 // Manages observer lifetimes. | 189 // Manages observer lifetimes. |
| 201 ScopedObserver<SigninManagerBase, PeopleHandler> signin_observer_; | 190 ScopedObserver<SigninManagerBase, PeopleHandler> signin_observer_; |
| 202 ScopedObserver<ProfileSyncService, PeopleHandler> sync_service_observer_; | 191 ScopedObserver<ProfileSyncService, PeopleHandler> sync_service_observer_; |
| 203 | 192 |
| 204 DISALLOW_COPY_AND_ASSIGN(PeopleHandler); | 193 DISALLOW_COPY_AND_ASSIGN(PeopleHandler); |
| 205 }; | 194 }; |
| 206 | 195 |
| 207 } // namespace settings | 196 } // namespace settings |
| 208 | 197 |
| 209 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_PEOPLE_HANDLER_H_ | 198 #endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_PEOPLE_HANDLER_H_ |
| OLD | NEW |