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