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