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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/oobe_ui.h

Issue 2731103002: cros: Remove CoreOobeHandler::Delegate. (Closed)
Patch Set: Initial upload Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_WEBUI_CHROMEOS_LOGIN_OOBE_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_OOBE_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_OOBE_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_OOBE_UI_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 class UserBoardView; 60 class UserBoardView;
61 class UserImageView; 61 class UserImageView;
62 class UpdateView; 62 class UpdateView;
63 class WrongHWIDScreenView; 63 class WrongHWIDScreenView;
64 64
65 // A custom WebUI that defines datasource for out-of-box-experience (OOBE) UI: 65 // A custom WebUI that defines datasource for out-of-box-experience (OOBE) UI:
66 // - welcome screen (setup language/keyboard/network). 66 // - welcome screen (setup language/keyboard/network).
67 // - eula screen (CrOS (+ OEM) EULA content/TPM password/crash reporting). 67 // - eula screen (CrOS (+ OEM) EULA content/TPM password/crash reporting).
68 // - update screen. 68 // - update screen.
69 class OobeUI : public content::WebUIController, 69 class OobeUI : public content::WebUIController,
70 public CoreOobeHandler::Delegate,
71 public ShutdownPolicyHandler::Delegate { 70 public ShutdownPolicyHandler::Delegate {
72 public: 71 public:
73 // List of known types of OobeUI. Type added as path in chrome://oobe url, for 72 // List of known types of OobeUI. Type added as path in chrome://oobe url, for
74 // example chrome://oobe/user-adding. 73 // example chrome://oobe/user-adding.
75 static const char kOobeDisplay[]; 74 static const char kOobeDisplay[];
76 static const char kLoginDisplay[]; 75 static const char kLoginDisplay[];
77 static const char kLockDisplay[]; 76 static const char kLockDisplay[];
78 static const char kUserAddingDisplay[]; 77 static const char kUserAddingDisplay[];
79 static const char kAppLaunchSplashDisplay[]; 78 static const char kAppLaunchSplashDisplay[];
80 static const char kArcKioskSplashDisplay[]; 79 static const char kArcKioskSplashDisplay[];
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 121
123 // ShutdownPolicyHandler::Delegate 122 // ShutdownPolicyHandler::Delegate
124 void OnShutdownPolicyChanged(bool reboot_on_shutdown) override; 123 void OnShutdownPolicyChanged(bool reboot_on_shutdown) override;
125 124
126 // Collects localized strings from the owned handlers. 125 // Collects localized strings from the owned handlers.
127 void GetLocalizedStrings(base::DictionaryValue* localized_strings); 126 void GetLocalizedStrings(base::DictionaryValue* localized_strings);
128 127
129 // Initializes the handlers. 128 // Initializes the handlers.
130 void InitializeHandlers(); 129 void InitializeHandlers();
131 130
131 // Called by CoreOobeHandler when the screen has changed.
achuithb 2017/03/08 11:32:52 Not sure we want to be specific about the caller.
jdufault 2017/03/09 19:24:14 Done.
132 void OnCurrentScreenChanged(OobeScreen screen);
133
132 // Invoked after the async assets load. The screen handler that has the same 134 // Invoked after the async assets load. The screen handler that has the same
133 // async assets load id will be initialized. 135 // async assets load id will be initialized.
134 void OnScreenAssetsLoaded(const std::string& async_assets_load_id); 136 void OnScreenAssetsLoaded(const std::string& async_assets_load_id);
135 137
136 bool IsJSReady(const base::Closure& display_is_ready_callback); 138 bool IsJSReady(const base::Closure& display_is_ready_callback);
137 139
138 // Shows or hides OOBE UI elements. 140 // Shows or hides OOBE UI elements.
139 void ShowOobeUI(bool show); 141 void ShowOobeUI(bool show);
140 142
141 // Shows the signin screen. 143 // Shows the signin screen.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 } 181 }
180 182
181 NOTREACHED() << "Unable to find handler for screen " 183 NOTREACHED() << "Unable to find handler for screen "
182 << GetOobeScreenName(expected_screen); 184 << GetOobeScreenName(expected_screen);
183 return nullptr; 185 return nullptr;
184 } 186 }
185 187
186 void AddWebUIHandler(std::unique_ptr<BaseWebUIHandler> handler); 188 void AddWebUIHandler(std::unique_ptr<BaseWebUIHandler> handler);
187 void AddScreenHandler(std::unique_ptr<BaseScreenHandler> handler); 189 void AddScreenHandler(std::unique_ptr<BaseScreenHandler> handler);
188 190
189 // CoreOobeHandler::Delegate implementation:
190 void OnCurrentScreenChanged(OobeScreen screen) override;
191
192 // Type of UI. 191 // Type of UI.
193 std::string display_type_; 192 std::string display_type_;
194 193
195 // Reference to NetworkStateInformer that handles changes in network 194 // Reference to NetworkStateInformer that handles changes in network
196 // state. 195 // state.
197 scoped_refptr<NetworkStateInformer> network_state_informer_; 196 scoped_refptr<NetworkStateInformer> network_state_informer_;
198 197
199 // Reference to CoreOobeHandler that handles common requests of Oobe page. 198 // Reference to CoreOobeHandler that handles common requests of Oobe page.
200 CoreOobeHandler* core_handler_ = nullptr; 199 CoreOobeHandler* core_handler_ = nullptr;
201 200
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 // Store the deferred JS calls before the screen handler instance is 244 // Store the deferred JS calls before the screen handler instance is
246 // initialized. 245 // initialized.
247 std::unique_ptr<JSCallsContainer> js_calls_container; 246 std::unique_ptr<JSCallsContainer> js_calls_container;
248 247
249 DISALLOW_COPY_AND_ASSIGN(OobeUI); 248 DISALLOW_COPY_AND_ASSIGN(OobeUI);
250 }; 249 };
251 250
252 } // namespace chromeos 251 } // namespace chromeos
253 252
254 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_OOBE_UI_H_ 253 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_OOBE_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698