| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 #include "chrome/browser/ui/webui/chromeos/login/network_screen_handler.h" | 52 #include "chrome/browser/ui/webui/chromeos/login/network_screen_handler.h" |
| 53 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" | 53 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" |
| 54 #include "chrome/browser/ui/webui/chromeos/login/oobe_display_chooser.h" | 54 #include "chrome/browser/ui/webui/chromeos/login/oobe_display_chooser.h" |
| 55 #include "chrome/browser/ui/webui/chromeos/login/reset_screen_handler.h" | 55 #include "chrome/browser/ui/webui/chromeos/login/reset_screen_handler.h" |
| 56 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 56 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 57 #include "chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen
_handler.h" | 57 #include "chrome/browser/ui/webui/chromeos/login/supervised_user_creation_screen
_handler.h" |
| 58 #include "chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler
.h" | 58 #include "chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler
.h" |
| 59 #include "chrome/browser/ui/webui/chromeos/login/update_screen_handler.h" | 59 #include "chrome/browser/ui/webui/chromeos/login/update_screen_handler.h" |
| 60 #include "chrome/browser/ui/webui/chromeos/login/user_board_screen_handler.h" | 60 #include "chrome/browser/ui/webui/chromeos/login/user_board_screen_handler.h" |
| 61 #include "chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.h" | 61 #include "chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.h" |
| 62 #include "chrome/browser/ui/webui/chromeos/login/voice_interaction_value_prop_sc
reen_handler.h" |
| 62 #include "chrome/browser/ui/webui/chromeos/login/wrong_hwid_screen_handler.h" | 63 #include "chrome/browser/ui/webui/chromeos/login/wrong_hwid_screen_handler.h" |
| 63 #include "chrome/browser/ui/webui/chromeos/network_element_localized_strings_pro
vider.h" | 64 #include "chrome/browser/ui/webui/chromeos/network_element_localized_strings_pro
vider.h" |
| 64 #include "chrome/browser/ui/webui/options/chromeos/user_image_source.h" | 65 #include "chrome/browser/ui/webui/options/chromeos/user_image_source.h" |
| 65 #include "chrome/browser/ui/webui/test_files_request_filter.h" | 66 #include "chrome/browser/ui/webui/test_files_request_filter.h" |
| 66 #include "chrome/browser/ui/webui/theme_source.h" | 67 #include "chrome/browser/ui/webui/theme_source.h" |
| 67 #include "chrome/common/chrome_constants.h" | 68 #include "chrome/common/chrome_constants.h" |
| 68 #include "chrome/common/chrome_switches.h" | 69 #include "chrome/common/chrome_switches.h" |
| 69 #include "chrome/common/pref_names.h" | 70 #include "chrome/common/pref_names.h" |
| 70 #include "chrome/common/url_constants.h" | 71 #include "chrome/common/url_constants.h" |
| 71 #include "chrome/grit/browser_resources.h" | 72 #include "chrome/grit/browser_resources.h" |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 if (display_type_ == kOobeDisplay) { | 325 if (display_type_ == kOobeDisplay) { |
| 325 AddScreenHandler(base::MakeUnique<ControllerPairingScreenHandler>()); | 326 AddScreenHandler(base::MakeUnique<ControllerPairingScreenHandler>()); |
| 326 | 327 |
| 327 AddScreenHandler(base::MakeUnique<HostPairingScreenHandler>()); | 328 AddScreenHandler(base::MakeUnique<HostPairingScreenHandler>()); |
| 328 } | 329 } |
| 329 | 330 |
| 330 AddScreenHandler(base::MakeUnique<DeviceDisabledScreenHandler>()); | 331 AddScreenHandler(base::MakeUnique<DeviceDisabledScreenHandler>()); |
| 331 | 332 |
| 332 AddScreenHandler(base::MakeUnique<EncryptionMigrationScreenHandler>()); | 333 AddScreenHandler(base::MakeUnique<EncryptionMigrationScreenHandler>()); |
| 333 | 334 |
| 335 AddScreenHandler(base::MakeUnique<VoiceInteractionValuePropScreenHandler>()); |
| 336 |
| 334 // Initialize KioskAppMenuHandler. Note that it is NOT a screen handler. | 337 // Initialize KioskAppMenuHandler. Note that it is NOT a screen handler. |
| 335 auto kiosk_app_menu_handler = | 338 auto kiosk_app_menu_handler = |
| 336 base::MakeUnique<KioskAppMenuHandler>(network_state_informer_); | 339 base::MakeUnique<KioskAppMenuHandler>(network_state_informer_); |
| 337 kiosk_app_menu_handler_ = kiosk_app_menu_handler.get(); | 340 kiosk_app_menu_handler_ = kiosk_app_menu_handler.get(); |
| 338 web_ui->AddMessageHandler(std::move(kiosk_app_menu_handler)); | 341 web_ui->AddMessageHandler(std::move(kiosk_app_menu_handler)); |
| 339 | 342 |
| 340 base::DictionaryValue localized_strings; | 343 base::DictionaryValue localized_strings; |
| 341 GetLocalizedStrings(&localized_strings); | 344 GetLocalizedStrings(&localized_strings); |
| 342 | 345 |
| 343 Profile* profile = Profile::FromWebUI(web_ui); | 346 Profile* profile = Profile::FromWebUI(web_ui); |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 } | 448 } |
| 446 | 449 |
| 447 DeviceDisabledScreenView* OobeUI::GetDeviceDisabledScreenView() { | 450 DeviceDisabledScreenView* OobeUI::GetDeviceDisabledScreenView() { |
| 448 return GetView<DeviceDisabledScreenHandler>(); | 451 return GetView<DeviceDisabledScreenHandler>(); |
| 449 } | 452 } |
| 450 | 453 |
| 451 EncryptionMigrationScreenView* OobeUI::GetEncryptionMigrationScreenView() { | 454 EncryptionMigrationScreenView* OobeUI::GetEncryptionMigrationScreenView() { |
| 452 return GetView<EncryptionMigrationScreenHandler>(); | 455 return GetView<EncryptionMigrationScreenHandler>(); |
| 453 } | 456 } |
| 454 | 457 |
| 458 VoiceInteractionValuePropScreenView* |
| 459 OobeUI::GetVoiceInteractionValuePropScreenView() { |
| 460 return GetView<VoiceInteractionValuePropScreenHandler>(); |
| 461 } |
| 462 |
| 455 UserImageView* OobeUI::GetUserImageView() { | 463 UserImageView* OobeUI::GetUserImageView() { |
| 456 return GetView<UserImageScreenHandler>(); | 464 return GetView<UserImageScreenHandler>(); |
| 457 } | 465 } |
| 458 | 466 |
| 459 ErrorScreen* OobeUI::GetErrorScreen() { | 467 ErrorScreen* OobeUI::GetErrorScreen() { |
| 460 return error_screen_.get(); | 468 return error_screen_.get(); |
| 461 } | 469 } |
| 462 | 470 |
| 463 SupervisedUserCreationScreenHandler* | 471 SupervisedUserCreationScreenHandler* |
| 464 OobeUI::GetSupervisedUserCreationScreenView() { | 472 OobeUI::GetSupervisedUserCreationScreenView() { |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 GetLocalizedStrings(&localized_strings); | 650 GetLocalizedStrings(&localized_strings); |
| 643 static_cast<CoreOobeView*>(core_handler_)->ReloadContent(localized_strings); | 651 static_cast<CoreOobeView*>(core_handler_)->ReloadContent(localized_strings); |
| 644 } | 652 } |
| 645 | 653 |
| 646 void OobeUI::OnDisplayConfigurationChanged() { | 654 void OobeUI::OnDisplayConfigurationChanged() { |
| 647 if (oobe_display_chooser_) | 655 if (oobe_display_chooser_) |
| 648 oobe_display_chooser_->TryToPlaceUiOnTouchDisplay(); | 656 oobe_display_chooser_->TryToPlaceUiOnTouchDisplay(); |
| 649 } | 657 } |
| 650 | 658 |
| 651 } // namespace chromeos | 659 } // namespace chromeos |
| OLD | NEW |