OLD | NEW |
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 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/memory/ref_counted_memory.h" | 11 #include "base/memory/ref_counted_memory.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/browser_about_handler.h" | 13 #include "chrome/browser/browser_about_handler.h" |
14 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen_
actor.h" | 14 #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_screen_
actor.h" |
15 #include "chrome/browser/chromeos/login/screen_locker.h" | 15 #include "chrome/browser/chromeos/login/screen_locker.h" |
16 #include "chrome/browser/chromeos/login/user_manager.h" | 16 #include "chrome/browser/chromeos/login/user_manager.h" |
17 #include "chrome/browser/chromeos/login/wizard_controller.h" | 17 #include "chrome/browser/chromeos/login/wizard_controller.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/ui/webui/about_ui.h" |
19 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" | 20 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" |
20 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" | 21 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" |
21 #include "chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h" | 22 #include "chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h" |
22 #include "chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_scr
een_handler.h" | 23 #include "chrome/browser/ui/webui/chromeos/login/enterprise_oauth_enrollment_scr
een_handler.h" |
23 #include "chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h" | 24 #include "chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h" |
24 #include "chrome/browser/ui/webui/chromeos/login/network_dropdown_handler.h" | 25 #include "chrome/browser/ui/webui/chromeos/login/network_dropdown_handler.h" |
25 #include "chrome/browser/ui/webui/chromeos/login/network_screen_handler.h" | 26 #include "chrome/browser/ui/webui/chromeos/login/network_screen_handler.h" |
26 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 27 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
27 #include "chrome/browser/ui/webui/chromeos/login/update_screen_handler.h" | 28 #include "chrome/browser/ui/webui/chromeos/login/update_screen_handler.h" |
28 #include "chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.h" | 29 #include "chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.h" |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 147 |
147 DictionaryValue* localized_strings = new DictionaryValue(); | 148 DictionaryValue* localized_strings = new DictionaryValue(); |
148 GetLocalizedStrings(localized_strings); | 149 GetLocalizedStrings(localized_strings); |
149 | 150 |
150 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); | 151 Profile* profile = Profile::FromBrowserContext(contents->browser_context()); |
151 // Set up the chrome://theme/ source, for Chrome logo. | 152 // Set up the chrome://theme/ source, for Chrome logo. |
152 ThemeSource* theme = new ThemeSource(profile); | 153 ThemeSource* theme = new ThemeSource(profile); |
153 profile->GetChromeURLDataManager()->AddDataSource(theme); | 154 profile->GetChromeURLDataManager()->AddDataSource(theme); |
154 | 155 |
155 // Set up the chrome://terms/ data source, for EULA content. | 156 // Set up the chrome://terms/ data source, for EULA content. |
156 InitializeAboutDataSource(chrome::kChromeUITermsHost, profile); | 157 AboutUIHTMLSource* about_source = |
| 158 new AboutUIHTMLSource(chrome::kChromeUITermsHost, profile); |
| 159 profile->GetChromeURLDataManager()->AddDataSource(about_source); |
157 | 160 |
158 // Set up the chrome://oobe/ source. | 161 // Set up the chrome://oobe/ source. |
159 OobeUIHTMLSource* html_source = new OobeUIHTMLSource(localized_strings); | 162 OobeUIHTMLSource* html_source = new OobeUIHTMLSource(localized_strings); |
160 profile->GetChromeURLDataManager()->AddDataSource(html_source); | 163 profile->GetChromeURLDataManager()->AddDataSource(html_source); |
161 | 164 |
162 // Set up the chrome://userimage/ source. | 165 // Set up the chrome://userimage/ source. |
163 UserImageSource* user_image_source = new UserImageSource(); | 166 UserImageSource* user_image_source = new UserImageSource(); |
164 profile->GetChromeURLDataManager()->AddDataSource(user_image_source); | 167 profile->GetChromeURLDataManager()->AddDataSource(user_image_source); |
165 } | 168 } |
166 | 169 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 void OobeUI::ShowSigninScreen(SigninScreenHandlerDelegate* delegate) { | 235 void OobeUI::ShowSigninScreen(SigninScreenHandlerDelegate* delegate) { |
233 signin_screen_handler_->SetDelegate(delegate); | 236 signin_screen_handler_->SetDelegate(delegate); |
234 signin_screen_handler_->Show(core_handler_->show_oobe_ui()); | 237 signin_screen_handler_->Show(core_handler_->show_oobe_ui()); |
235 } | 238 } |
236 | 239 |
237 void OobeUI::OnLoginPromptVisible() { | 240 void OobeUI::OnLoginPromptVisible() { |
238 user_image_screen_actor_->CheckCameraPresence(); | 241 user_image_screen_actor_->CheckCameraPresence(); |
239 } | 242 } |
240 | 243 |
241 } // namespace chromeos | 244 } // namespace chromeos |
OLD | NEW |