| 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_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 | 279 |
| 280 // TimeZoneRequest::TimeZoneResponseCallback implementation. | 280 // TimeZoneRequest::TimeZoneResponseCallback implementation. |
| 281 void OnTimezoneResolved(scoped_ptr<TimeZoneResponseData> timezone, | 281 void OnTimezoneResolved(scoped_ptr<TimeZoneResponseData> timezone, |
| 282 bool server_error); | 282 bool server_error); |
| 283 | 283 |
| 284 // Called from SimpleGeolocationProvider when location is resolved. | 284 // Called from SimpleGeolocationProvider when location is resolved. |
| 285 void OnLocationResolved(const Geoposition& position, | 285 void OnLocationResolved(const Geoposition& position, |
| 286 bool server_error, | 286 bool server_error, |
| 287 const base::TimeDelta elapsed); | 287 const base::TimeDelta elapsed); |
| 288 | 288 |
| 289 // Returns true if timezone has already been resolved. |
| 290 // Otherwize sets callback and returns false. |
| 291 bool SetOnTimeZoneResolvedForTesting(const base::Closure& callback); |
| 292 |
| 289 // Whether to skip any screens that may normally be shown after login | 293 // Whether to skip any screens that may normally be shown after login |
| 290 // (registration, Terms of Service, user image selection). | 294 // (registration, Terms of Service, user image selection). |
| 291 static bool skip_post_login_screens_; | 295 static bool skip_post_login_screens_; |
| 292 | 296 |
| 293 static bool zero_delay_enabled_; | 297 static bool zero_delay_enabled_; |
| 294 | 298 |
| 295 // Screens. | 299 // Screens. |
| 296 scoped_ptr<NetworkScreen> network_screen_; | 300 scoped_ptr<NetworkScreen> network_screen_; |
| 297 scoped_ptr<UpdateScreen> update_screen_; | 301 scoped_ptr<UpdateScreen> update_screen_; |
| 298 scoped_ptr<UserImageScreen> user_image_screen_; | 302 scoped_ptr<UserImageScreen> user_image_screen_; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 static PrefService* local_state_for_testing_; | 370 static PrefService* local_state_for_testing_; |
| 367 | 371 |
| 368 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestCancel); | 372 FRIEND_TEST_ALL_PREFIXES(EnrollmentScreenTest, TestCancel); |
| 369 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, Accelerators); | 373 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, Accelerators); |
| 370 friend class WizardControllerFlowTest; | 374 friend class WizardControllerFlowTest; |
| 371 friend class WizardInProcessBrowserTest; | 375 friend class WizardInProcessBrowserTest; |
| 372 friend class WizardControllerBrokenLocalStateTest; | 376 friend class WizardControllerBrokenLocalStateTest; |
| 373 | 377 |
| 374 scoped_ptr<AccessibilityStatusSubscription> accessibility_subscription_; | 378 scoped_ptr<AccessibilityStatusSubscription> accessibility_subscription_; |
| 375 | 379 |
| 376 base::WeakPtrFactory<WizardController> weak_factory_; | |
| 377 | |
| 378 scoped_ptr<SimpleGeolocationProvider> geolocation_provider_; | 380 scoped_ptr<SimpleGeolocationProvider> geolocation_provider_; |
| 379 scoped_ptr<TimeZoneProvider> timezone_provider_; | 381 scoped_ptr<TimeZoneProvider> timezone_provider_; |
| 380 | 382 |
| 383 // Tests check result of timezone resolve. |
| 384 bool timezone_resolved_; |
| 385 base::Closure on_timezone_resolved_for_testing_; |
| 386 |
| 387 base::WeakPtrFactory<WizardController> weak_factory_; |
| 388 |
| 381 DISALLOW_COPY_AND_ASSIGN(WizardController); | 389 DISALLOW_COPY_AND_ASSIGN(WizardController); |
| 382 }; | 390 }; |
| 383 | 391 |
| 384 } // namespace chromeos | 392 } // namespace chromeos |
| 385 | 393 |
| 386 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ | 394 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
| OLD | NEW |