| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| 11 #include "chrome/browser/chromeos/login/screen_observer.h" | 11 #include "chrome/browser/chromeos/login/screen_observer.h" |
| 12 #include "chrome/browser/chromeos/login/view_screen.h" | 12 #include "chrome/browser/chromeos/login/view_screen.h" |
| 13 #include "chrome/browser/chromeos/login/wizard_screen.h" | 13 #include "chrome/browser/chromeos/login/wizard_screen.h" |
| 14 #include "testing/gtest/include/gtest/gtest_prod.h" | 14 #include "testing/gtest/include/gtest/gtest_prod.h" |
| 15 | 15 |
| 16 class WizardContentsView; | 16 class WizardContentsView; |
| 17 class WizardScreen; | 17 class WizardScreen; |
| 18 | 18 |
| 19 namespace chromeos { | 19 namespace chromeos { |
| 20 class AccountScreen; | 20 class AccountScreen; |
| 21 class BackgroundView; | 21 class BackgroundView; |
| 22 class LoginScreen; | 22 class LoginScreen; |
| 23 class NetworkScreen; | 23 class NetworkScreen; |
| 24 class UpdateScreen; | 24 class UpdateScreen; |
| 25 class StartupCustomizationDocument; |
| 25 } | 26 } |
| 26 | 27 |
| 27 namespace gfx { | 28 namespace gfx { |
| 28 class Rect; | 29 class Rect; |
| 29 } | 30 } |
| 30 | 31 |
| 31 namespace views { | 32 namespace views { |
| 32 class Views; | 33 class Views; |
| 33 class Widget; | 34 class Widget; |
| 34 } | 35 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 void ShowAccountScreen(); | 81 void ShowAccountScreen(); |
| 81 void ShowUpdateScreen(); | 82 void ShowUpdateScreen(); |
| 82 | 83 |
| 83 // Returns a pointer to the current screen or NULL if there's no such | 84 // Returns a pointer to the current screen or NULL if there's no such |
| 84 // screen. | 85 // screen. |
| 85 WizardScreen* current_screen() const { return current_screen_; } | 86 WizardScreen* current_screen() const { return current_screen_; } |
| 86 | 87 |
| 87 // Overrides observer for testing. | 88 // Overrides observer for testing. |
| 88 void set_observer(ScreenObserver* observer) { observer_ = observer; } | 89 void set_observer(ScreenObserver* observer) { observer_ = observer; } |
| 89 | 90 |
| 91 // Sets partner startup customization. WizardController takes ownership |
| 92 // of the document object. |
| 93 void SetCustomization( |
| 94 const chromeos::StartupCustomizationDocument* customization); |
| 95 |
| 90 static const char kNetworkScreenName[]; | 96 static const char kNetworkScreenName[]; |
| 91 static const char kLoginScreenName[]; | 97 static const char kLoginScreenName[]; |
| 92 static const char kAccountScreenName[]; | 98 static const char kAccountScreenName[]; |
| 93 static const char kUpdateScreenName[]; | 99 static const char kUpdateScreenName[]; |
| 94 static const char kOutOfBoxScreenName[]; | 100 static const char kOutOfBoxScreenName[]; |
| 95 static const char kTestNoScreenName[]; | 101 static const char kTestNoScreenName[]; |
| 96 | 102 |
| 97 private: | 103 private: |
| 98 // Exit handlers: | 104 // Exit handlers: |
| 99 void OnLoginSignInSelected(); | 105 void OnLoginSignInSelected(); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 155 |
| 150 // True if full OOBE flow should be shown. | 156 // True if full OOBE flow should be shown. |
| 151 bool is_out_of_box_; | 157 bool is_out_of_box_; |
| 152 | 158 |
| 153 // NULL by default - controller itself is observer. Mock could be assigned. | 159 // NULL by default - controller itself is observer. Mock could be assigned. |
| 154 ScreenObserver* observer_; | 160 ScreenObserver* observer_; |
| 155 | 161 |
| 156 // Default WizardController. | 162 // Default WizardController. |
| 157 static WizardController* default_controller_; | 163 static WizardController* default_controller_; |
| 158 | 164 |
| 165 // Partner startup customizations. |
| 166 scoped_ptr<const chromeos::StartupCustomizationDocument> customization_; |
| 167 |
| 159 FRIEND_TEST(WizardControllerFlowTest, ControlFlowErrorNetwork); | 168 FRIEND_TEST(WizardControllerFlowTest, ControlFlowErrorNetwork); |
| 160 FRIEND_TEST(WizardControllerFlowTest, ControlFlowErrorUpdate); | 169 FRIEND_TEST(WizardControllerFlowTest, ControlFlowErrorUpdate); |
| 161 FRIEND_TEST(WizardControllerFlowTest, ControlFlowLanguageOnLogin); | 170 FRIEND_TEST(WizardControllerFlowTest, ControlFlowLanguageOnLogin); |
| 162 FRIEND_TEST(WizardControllerFlowTest, ControlFlowLanguageOnNetwork); | 171 FRIEND_TEST(WizardControllerFlowTest, ControlFlowLanguageOnNetwork); |
| 163 FRIEND_TEST(WizardControllerFlowTest, ControlFlowMain); | 172 FRIEND_TEST(WizardControllerFlowTest, ControlFlowMain); |
| 164 FRIEND_TEST(WizardControllerTest, SwitchLanguage); | 173 FRIEND_TEST(WizardControllerTest, SwitchLanguage); |
| 165 friend class WizardControllerFlowTest; | 174 friend class WizardControllerFlowTest; |
| 166 DISALLOW_COPY_AND_ASSIGN(WizardController); | 175 DISALLOW_COPY_AND_ASSIGN(WizardController); |
| 167 }; | 176 }; |
| 168 | 177 |
| 169 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ | 178 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ |
| OLD | NEW |