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_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ | 5 #ifndef CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ |
6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ | 6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // Initializes the internals of the OneClickSigninSyncStarter object. Can also | 127 // Initializes the internals of the OneClickSigninSyncStarter object. Can also |
128 // be used to re-initialize the object to refer to a newly created profile. | 128 // be used to re-initialize the object to refer to a newly created profile. |
129 void Initialize(Profile* profile, Browser* browser); | 129 void Initialize(Profile* profile, Browser* browser); |
130 | 130 |
131 // SigninTracker::Observer override. | 131 // SigninTracker::Observer override. |
132 void SigninFailed(const GoogleServiceAuthError& error) override; | 132 void SigninFailed(const GoogleServiceAuthError& error) override; |
133 void SigninSuccess() override; | 133 void SigninSuccess() override; |
134 void AccountAddedToCookie(const GoogleServiceAuthError& error) override; | 134 void AccountAddedToCookie(const GoogleServiceAuthError& error) override; |
135 | 135 |
136 // LoginUIService::Observer override. | 136 // LoginUIService::Observer override. |
137 void OnSyncConfirmationUIClosed(bool configure_sync_first) override; | 137 void OnSyncConfirmationUIClosed( |
| 138 LoginUIService::SyncConfirmationUIClosedResults results) override; |
138 | 139 |
139 #if defined(ENABLE_CONFIGURATION_POLICY) | 140 #if defined(ENABLE_CONFIGURATION_POLICY) |
140 // User input handler for the signin confirmation dialog. | 141 // User input handler for the signin confirmation dialog. |
141 class SigninDialogDelegate | 142 class SigninDialogDelegate |
142 : public ui::ProfileSigninConfirmationDelegate { | 143 : public ui::ProfileSigninConfirmationDelegate { |
143 public: | 144 public: |
144 SigninDialogDelegate( | 145 SigninDialogDelegate( |
145 base::WeakPtr<OneClickSigninSyncStarter> sync_starter); | 146 base::WeakPtr<OneClickSigninSyncStarter> sync_starter); |
146 virtual ~SigninDialogDelegate(); | 147 virtual ~SigninDialogDelegate(); |
147 void OnCancelSignin() override; | 148 void OnCancelSignin() override; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 212 |
212 // Displays a settings page in the provided web contents. |sub_page| can be | 213 // Displays a settings page in the provided web contents. |sub_page| can be |
213 // empty to show the main settings page. | 214 // empty to show the main settings page. |
214 void ShowSettingsPageInWebContents(content::WebContents* contents, | 215 void ShowSettingsPageInWebContents(content::WebContents* contents, |
215 const std::string& sub_page); | 216 const std::string& sub_page); |
216 | 217 |
217 // Shows the post-signin confirmation bubble. If |custom_message| is empty, | 218 // Shows the post-signin confirmation bubble. If |custom_message| is empty, |
218 // the default "You are signed in" message is displayed. | 219 // the default "You are signed in" message is displayed. |
219 void DisplayFinalConfirmationBubble(const base::string16& custom_message); | 220 void DisplayFinalConfirmationBubble(const base::string16& custom_message); |
220 | 221 |
| 222 void DisplayModalSyncConfirmationWindow(); |
| 223 |
221 // Loads the |continue_url_| in the current tab. | 224 // Loads the |continue_url_| in the current tab. |
222 void LoadContinueUrl(); | 225 void LoadContinueUrl(); |
223 | 226 |
224 Profile* profile_; | 227 Profile* profile_; |
225 Browser* browser_; | 228 Browser* browser_; |
226 scoped_ptr<SigninTracker> signin_tracker_; | 229 scoped_ptr<SigninTracker> signin_tracker_; |
227 StartSyncMode start_mode_; | 230 StartSyncMode start_mode_; |
228 chrome::HostDesktopType desktop_type_; | 231 chrome::HostDesktopType desktop_type_; |
229 ConfirmationRequired confirmation_required_; | 232 ConfirmationRequired confirmation_required_; |
230 GURL current_url_; | 233 GURL current_url_; |
231 GURL continue_url_; | 234 GURL continue_url_; |
232 | 235 |
233 // Callback executed when sync setup succeeds or fails. | 236 // Callback executed when sync setup succeeds or fails. |
234 Callback sync_setup_completed_callback_; | 237 Callback sync_setup_completed_callback_; |
235 | 238 |
236 #if defined(ENABLE_CONFIGURATION_POLICY) | 239 #if defined(ENABLE_CONFIGURATION_POLICY) |
237 // Policy credentials we keep while determining whether to create | 240 // Policy credentials we keep while determining whether to create |
238 // a new profile for an enterprise user or not. | 241 // a new profile for an enterprise user or not. |
239 std::string dm_token_; | 242 std::string dm_token_; |
240 std::string client_id_; | 243 std::string client_id_; |
241 #endif | 244 #endif |
242 | 245 |
243 base::WeakPtrFactory<OneClickSigninSyncStarter> weak_pointer_factory_; | 246 base::WeakPtrFactory<OneClickSigninSyncStarter> weak_pointer_factory_; |
244 | 247 |
245 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter); | 248 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncStarter); |
246 }; | 249 }; |
247 | 250 |
248 | 251 |
249 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ | 252 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_STARTER_H_ |
OLD | NEW |