| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #include "chrome/browser/ui/webui/chromeos/login/network_screen_handler.h" | 50 #include "chrome/browser/ui/webui/chromeos/login/network_screen_handler.h" |
| 51 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" | 51 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" |
| 52 #include "chrome/browser/ui/webui/chromeos/login/reset_screen_handler.h" | 52 #include "chrome/browser/ui/webui/chromeos/login/reset_screen_handler.h" |
| 53 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 53 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 54 #include "chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen
_handler.h" | 54 #include "chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen
_handler.h" |
| 55 #include "chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler
.h" | 55 #include "chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler
.h" |
| 56 #include "chrome/browser/ui/webui/chromeos/login/update_screen_handler.h" | 56 #include "chrome/browser/ui/webui/chromeos/login/update_screen_handler.h" |
| 57 #include "chrome/browser/ui/webui/chromeos/login/user_board_screen_handler.h" | 57 #include "chrome/browser/ui/webui/chromeos/login/user_board_screen_handler.h" |
| 58 #include "chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.h" | 58 #include "chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.h" |
| 59 #include "chrome/browser/ui/webui/chromeos/login/wrong_hwid_screen_handler.h" | 59 #include "chrome/browser/ui/webui/chromeos/login/wrong_hwid_screen_handler.h" |
| 60 #include "chrome/browser/ui/webui/chromeos/network_element_localized_strings_pro
vider.h" |
| 60 #include "chrome/browser/ui/webui/options/chromeos/user_image_source.h" | 61 #include "chrome/browser/ui/webui/options/chromeos/user_image_source.h" |
| 61 #include "chrome/browser/ui/webui/settings/md_settings_localized_strings_provide
r.h" | |
| 62 #include "chrome/browser/ui/webui/test_files_request_filter.h" | 62 #include "chrome/browser/ui/webui/test_files_request_filter.h" |
| 63 #include "chrome/browser/ui/webui/theme_source.h" | 63 #include "chrome/browser/ui/webui/theme_source.h" |
| 64 #include "chrome/common/chrome_constants.h" | 64 #include "chrome/common/chrome_constants.h" |
| 65 #include "chrome/common/chrome_switches.h" | 65 #include "chrome/common/chrome_switches.h" |
| 66 #include "chrome/common/pref_names.h" | 66 #include "chrome/common/pref_names.h" |
| 67 #include "chrome/common/url_constants.h" | 67 #include "chrome/common/url_constants.h" |
| 68 #include "chrome/grit/browser_resources.h" | 68 #include "chrome/grit/browser_resources.h" |
| 69 #include "chrome/grit/chrome_unscaled_resources.h" | 69 #include "chrome/grit/chrome_unscaled_resources.h" |
| 70 #include "chrome/grit/component_extension_resources.h" | 70 #include "chrome/grit/component_extension_resources.h" |
| 71 #include "chromeos/chromeos_switches.h" | 71 #include "chromeos/chromeos_switches.h" |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 | 354 |
| 355 // Set up the chrome://terms/ data source, for EULA content. | 355 // Set up the chrome://terms/ data source, for EULA content. |
| 356 AboutUIHTMLSource* about_source = | 356 AboutUIHTMLSource* about_source = |
| 357 new AboutUIHTMLSource(chrome::kChromeUITermsHost, profile); | 357 new AboutUIHTMLSource(chrome::kChromeUITermsHost, profile); |
| 358 content::URLDataSource::Add(profile, about_source); | 358 content::URLDataSource::Add(profile, about_source); |
| 359 | 359 |
| 360 // Set up the chrome://oobe/ source. | 360 // Set up the chrome://oobe/ source. |
| 361 content::WebUIDataSource* html_source = | 361 content::WebUIDataSource* html_source = |
| 362 CreateOobeUIDataSource(localized_strings, display_type_); | 362 CreateOobeUIDataSource(localized_strings, display_type_); |
| 363 content::WebUIDataSource::Add(profile, html_source); | 363 content::WebUIDataSource::Add(profile, html_source); |
| 364 settings::AddCrNetworkStrings(html_source); | 364 network_element::AddLocalizedStrings(html_source); |
| 365 | 365 |
| 366 // Set up the chrome://userimage/ source. | 366 // Set up the chrome://userimage/ source. |
| 367 options::UserImageSource* user_image_source = | 367 options::UserImageSource* user_image_source = |
| 368 new options::UserImageSource(); | 368 new options::UserImageSource(); |
| 369 content::URLDataSource::Add(profile, user_image_source); | 369 content::URLDataSource::Add(profile, user_image_source); |
| 370 | 370 |
| 371 // TabHelper is required for OOBE webui to make webview working on it. | 371 // TabHelper is required for OOBE webui to make webview working on it. |
| 372 content::WebContents* contents = web_ui->GetWebContents(); | 372 content::WebContents* contents = web_ui->GetWebContents(); |
| 373 extensions::TabHelper::CreateForWebContents(contents); | 373 extensions::TabHelper::CreateForWebContents(contents); |
| 374 } | 374 } |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 g_browser_process->local_state()->GetBoolean(prefs::kOobeMdMode)) { | 626 g_browser_process->local_state()->GetBoolean(prefs::kOobeMdMode)) { |
| 627 return; | 627 return; |
| 628 } | 628 } |
| 629 | 629 |
| 630 base::DictionaryValue localized_strings; | 630 base::DictionaryValue localized_strings; |
| 631 GetLocalizedStrings(&localized_strings); | 631 GetLocalizedStrings(&localized_strings); |
| 632 static_cast<CoreOobeActor*>(core_handler_)->ReloadContent(localized_strings); | 632 static_cast<CoreOobeActor*>(core_handler_)->ReloadContent(localized_strings); |
| 633 } | 633 } |
| 634 | 634 |
| 635 } // namespace chromeos | 635 } // namespace chromeos |
| OLD | NEW |