OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_OPTIONS_SYNC_SETUP_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_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 30 matching lines...) Expand all Loading... |
41 // OptionsPageUIHandler implementation. | 41 // OptionsPageUIHandler implementation. |
42 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; | 42 void GetLocalizedValues(base::DictionaryValue* localized_strings) override; |
43 void RegisterMessages() override; | 43 void RegisterMessages() override; |
44 | 44 |
45 // SyncStartupTracker::Observer implementation; | 45 // SyncStartupTracker::Observer implementation; |
46 void SyncStartupCompleted() override; | 46 void SyncStartupCompleted() override; |
47 void SyncStartupFailed() override; | 47 void SyncStartupFailed() override; |
48 | 48 |
49 // LoginUIService::LoginUI implementation. | 49 // LoginUIService::LoginUI implementation. |
50 void FocusUI() override; | 50 void FocusUI() override; |
51 void CloseUI() override; | |
52 | 51 |
53 static void GetStaticLocalizedValues( | 52 static void GetStaticLocalizedValues( |
54 base::DictionaryValue* localized_strings, | 53 base::DictionaryValue* localized_strings, |
55 content::WebUI* web_ui); | 54 content::WebUI* web_ui); |
56 | 55 |
57 // Initializes the sync setup flow and shows the setup UI. | 56 // Initializes the sync setup flow and shows the setup UI. |
58 void OpenSyncSetup(bool creating_supervised_user); | 57 void OpenSyncSetup(bool creating_supervised_user); |
59 | 58 |
60 // Shows advanced configuration dialog without going through sign in dialog. | 59 // Shows advanced configuration dialog without going through sign in dialog. |
61 // Kicks the sync backend if necessary with showing spinner dialog until it | 60 // Kicks the sync backend if necessary with showing spinner dialog until it |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 133 |
135 // Displays spinner-only UI indicating that something is going on in the | 134 // Displays spinner-only UI indicating that something is going on in the |
136 // background. | 135 // background. |
137 // TODO(kochi): better to show some message that the user can understand what | 136 // TODO(kochi): better to show some message that the user can understand what |
138 // is running in the background. | 137 // is running in the background. |
139 void DisplaySpinner(); | 138 void DisplaySpinner(); |
140 | 139 |
141 // Displays an error dialog which shows timeout of starting the sync backend. | 140 // Displays an error dialog which shows timeout of starting the sync backend. |
142 void DisplayTimeout(); | 141 void DisplayTimeout(); |
143 | 142 |
| 143 // Closes the associated sync settings page. |
| 144 void CloseUI(); |
| 145 |
144 // Returns true if this object is the active login object. | 146 // Returns true if this object is the active login object. |
145 bool IsActiveLogin() const; | 147 bool IsActiveLogin() const; |
146 | 148 |
147 // If a wizard already exists, return true. Otherwise, return false. | 149 // If a wizard already exists, return true. Otherwise, return false. |
148 bool IsExistingWizardPresent(); | 150 bool IsExistingWizardPresent(); |
149 | 151 |
150 // If a wizard already exists, focus it and return true. | 152 // If a wizard already exists, focus it and return true. |
151 bool FocusExistingWizardIfPresent(); | 153 bool FocusExistingWizardIfPresent(); |
152 | 154 |
153 // Display the configure sync UI. If |passphrase_failed| is true, the account | 155 // Display the configure sync UI. If |passphrase_failed| is true, the account |
(...skipping 12 matching lines...) Expand all Loading... |
166 bool configuring_sync_; | 168 bool configuring_sync_; |
167 | 169 |
168 // The OneShotTimer object used to timeout of starting the sync backend | 170 // The OneShotTimer object used to timeout of starting the sync backend |
169 // service. | 171 // service. |
170 std::unique_ptr<base::OneShotTimer> backend_start_timer_; | 172 std::unique_ptr<base::OneShotTimer> backend_start_timer_; |
171 | 173 |
172 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler); | 174 DISALLOW_COPY_AND_ASSIGN(SyncSetupHandler); |
173 }; | 175 }; |
174 | 176 |
175 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_ | 177 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_SYNC_SETUP_HANDLER_H_ |
OLD | NEW |