Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Side by Side Diff: chrome/browser/chromeos/login/wizard_controller.h

Issue 2878056: Put back 53641 - Landing OEM customization CL for Denis... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "base/gtest_prod_util.h" 11 #include "base/gtest_prod_util.h"
12 #include "base/scoped_ptr.h" 12 #include "base/scoped_ptr.h"
13 #include "chrome/browser/chromeos/login/screen_observer.h" 13 #include "chrome/browser/chromeos/login/screen_observer.h"
14 #include "chrome/browser/chromeos/login/string_fetcher.h"
14 #include "chrome/browser/chromeos/login/view_screen.h" 15 #include "chrome/browser/chromeos/login/view_screen.h"
15 #include "chrome/browser/chromeos/login/wizard_screen.h" 16 #include "chrome/browser/chromeos/login/wizard_screen.h"
16 #include "testing/gtest/include/gtest/gtest_prod.h" 17 #include "testing/gtest/include/gtest/gtest_prod.h"
17 18
18 class PrefService; 19 class PrefService;
19 class WizardContentsView; 20 class WizardContentsView;
20 class WizardScreen; 21 class WizardScreen;
21 22
22 namespace chromeos { 23 namespace chromeos {
23 class AccountScreen; 24 class AccountScreen;
(...skipping 23 matching lines...) Expand all
47 public: 48 public:
48 WizardController(); 49 WizardController();
49 ~WizardController(); 50 ~WizardController();
50 51
51 // Returns the default wizard controller if it has been created. 52 // Returns the default wizard controller if it has been created.
52 static WizardController* default_controller() { 53 static WizardController* default_controller() {
53 return default_controller_; 54 return default_controller_;
54 } 55 }
55 56
56 // Returns OOBE completion status. 57 // Returns OOBE completion status.
57 static bool IsOobeComplete(); 58 static bool IsOobeCompleted();
59
60 // Returns device registration completion status, i.e. second part of OOBE.
61 static bool IsDeviceRegistered();
58 62
59 // Shows the first screen defined by |first_screen_name| or by default 63 // Shows the first screen defined by |first_screen_name| or by default
60 // if the parameter is empty. |screen_bounds| are used to calculate position 64 // if the parameter is empty. |screen_bounds| are used to calculate position
61 // of the wizard screen. 65 // of the wizard screen.
62 void Init(const std::string& first_screen_name, 66 void Init(const std::string& first_screen_name,
63 const gfx::Rect& screen_bounds); 67 const gfx::Rect& screen_bounds);
64 68
65 // Returns the view that contains all the other views. 69 // Returns the view that contains all the other views.
66 views::View* contents() { return contents_; } 70 views::View* contents() { return contents_; }
67 71
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // of the document object. 111 // of the document object.
108 void SetCustomization( 112 void SetCustomization(
109 const chromeos::StartupCustomizationDocument* customization); 113 const chromeos::StartupCustomizationDocument* customization);
110 114
111 // Returns partner startup customization document owned by WizardController. 115 // Returns partner startup customization document owned by WizardController.
112 const chromeos::StartupCustomizationDocument* GetCustomization() const; 116 const chromeos::StartupCustomizationDocument* GetCustomization() const;
113 117
114 // Registers OOBE preferences. 118 // Registers OOBE preferences.
115 static void RegisterPrefs(PrefService* local_state); 119 static void RegisterPrefs(PrefService* local_state);
116 120
121 // Applies partner services customizations.
122 void ApplyPartnerServicesCustomizations();
123
117 static const char kNetworkScreenName[]; 124 static const char kNetworkScreenName[];
118 static const char kLoginScreenName[]; 125 static const char kLoginScreenName[];
119 static const char kAccountScreenName[]; 126 static const char kAccountScreenName[];
120 static const char kUpdateScreenName[]; 127 static const char kUpdateScreenName[];
121 static const char kUserImageScreenName[]; 128 static const char kUserImageScreenName[];
122 static const char kRegistrationScreenName[]; 129 static const char kRegistrationScreenName[];
123 static const char kOutOfBoxScreenName[]; 130 static const char kOutOfBoxScreenName[];
124 static const char kTestNoScreenName[]; 131 static const char kTestNoScreenName[];
125 static const char kEulaScreenName[]; 132 static const char kEulaScreenName[];
126 133
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 virtual views::View* GetWizardView(); 165 virtual views::View* GetWizardView();
159 virtual chromeos::ScreenObserver* GetObserver(WizardScreen* screen); 166 virtual chromeos::ScreenObserver* GetObserver(WizardScreen* screen);
160 167
161 // Determines which screen to show first by the parameter, shows it and 168 // Determines which screen to show first by the parameter, shows it and
162 // sets it as the current one. 169 // sets it as the current one.
163 void ShowFirstScreen(const std::string& first_screen_name); 170 void ShowFirstScreen(const std::string& first_screen_name);
164 171
165 // Marks OOBE process as completed. 172 // Marks OOBE process as completed.
166 void MarkOobeCompleted(); 173 void MarkOobeCompleted();
167 174
175 // Marks device registered. i.e. second part of OOBE is completed.
176 void MarkDeviceRegistered();
177
168 // Widget we're showing in. 178 // Widget we're showing in.
169 views::Widget* widget_; 179 views::Widget* widget_;
170 180
171 // Used to render the background. 181 // Used to render the background.
172 views::Widget* background_widget_; 182 views::Widget* background_widget_;
173 chromeos::BackgroundView* background_view_; 183 chromeos::BackgroundView* background_view_;
174 184
175 // Contents view. 185 // Contents view.
176 views::View* contents_; 186 views::View* contents_;
177 187
(...skipping 21 matching lines...) Expand all
199 209
200 // NULL by default - controller itself is observer. Mock could be assigned. 210 // NULL by default - controller itself is observer. Mock could be assigned.
201 ScreenObserver* observer_; 211 ScreenObserver* observer_;
202 212
203 // Default WizardController. 213 // Default WizardController.
204 static WizardController* default_controller_; 214 static WizardController* default_controller_;
205 215
206 // Partner startup customizations. 216 // Partner startup customizations.
207 scoped_ptr<const chromeos::StartupCustomizationDocument> customization_; 217 scoped_ptr<const chromeos::StartupCustomizationDocument> customization_;
208 218
219 // Partner services manifest fetcher.
220 scoped_ptr<StringFetcher> services_manifest_fetcher_;
221
209 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, ControlFlowErrorNetwork); 222 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, ControlFlowErrorNetwork);
210 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, ControlFlowErrorUpdate); 223 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, ControlFlowErrorUpdate);
211 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, 224 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest,
212 ControlFlowLanguageOnLogin); 225 ControlFlowLanguageOnLogin);
213 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, 226 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest,
214 ControlFlowLanguageOnNetwork); 227 ControlFlowLanguageOnNetwork);
215 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, ControlFlowMain); 228 FRIEND_TEST_ALL_PREFIXES(WizardControllerFlowTest, ControlFlowMain);
216 FRIEND_TEST_ALL_PREFIXES(WizardControllerTest, SwitchLanguage); 229 FRIEND_TEST_ALL_PREFIXES(WizardControllerTest, SwitchLanguage);
217 friend class WizardControllerFlowTest; 230 friend class WizardControllerFlowTest;
218 231
219 DISALLOW_COPY_AND_ASSIGN(WizardController); 232 DISALLOW_COPY_AND_ASSIGN(WizardController);
220 }; 233 };
221 234
222 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_ 235 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_WIZARD_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/string_fetcher.cc ('k') | chrome/browser/chromeos/login/wizard_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698