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