| 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 11 matching lines...) Expand all Loading... |
| 22 #include "chrome/browser/chromeos/login/screens/error_screen.h" | 22 #include "chrome/browser/chromeos/login/screens/error_screen.h" |
| 23 #include "chrome/browser/chromeos/login/startup_utils.h" | 23 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 24 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 24 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 25 #include "chrome/browser/chromeos/login/wizard_controller.h" | 25 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 26 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 26 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 27 #include "chrome/browser/chromeos/settings/shutdown_policy_handler.h" | 27 #include "chrome/browser/chromeos/settings/shutdown_policy_handler.h" |
| 28 #include "chrome/browser/chromeos/system/input_device_settings.h" | 28 #include "chrome/browser/chromeos/system/input_device_settings.h" |
| 29 #include "chrome/browser/extensions/signin/gaia_auth_extension_loader.h" | 29 #include "chrome/browser/extensions/signin/gaia_auth_extension_loader.h" |
| 30 #include "chrome/browser/extensions/tab_helper.h" | 30 #include "chrome/browser/extensions/tab_helper.h" |
| 31 #include "chrome/browser/profiles/profile.h" | 31 #include "chrome/browser/profiles/profile.h" |
| 32 #include "chrome/browser/ui/ash/ash_util.h" |
| 32 #include "chrome/browser/ui/webui/about_ui.h" | 33 #include "chrome/browser/ui/webui/about_ui.h" |
| 33 #include "chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handle
r.h" | 34 #include "chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handle
r.h" |
| 34 #include "chrome/browser/ui/webui/chromeos/login/auto_enrollment_check_screen_ha
ndler.h" | 35 #include "chrome/browser/ui/webui/chromeos/login/auto_enrollment_check_screen_ha
ndler.h" |
| 35 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" | 36 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" |
| 36 #include "chrome/browser/ui/webui/chromeos/login/controller_pairing_screen_handl
er.h" | 37 #include "chrome/browser/ui/webui/chromeos/login/controller_pairing_screen_handl
er.h" |
| 37 #include "chrome/browser/ui/webui/chromeos/login/device_disabled_screen_handler.
h" | 38 #include "chrome/browser/ui/webui/chromeos/login/device_disabled_screen_handler.
h" |
| 38 #include "chrome/browser/ui/webui/chromeos/login/enable_debugging_screen_handler
.h" | 39 #include "chrome/browser/ui/webui/chromeos/login/enable_debugging_screen_handler
.h" |
| 39 #include "chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.h" | 40 #include "chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.h" |
| 40 #include "chrome/browser/ui/webui/chromeos/login/error_screen_handler.h" | 41 #include "chrome/browser/ui/webui/chromeos/login/error_screen_handler.h" |
| 41 #include "chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h" | 42 #include "chrome/browser/ui/webui/chromeos/login/eula_screen_handler.h" |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 content::URLDataSource::Add(profile, user_image_source); | 344 content::URLDataSource::Add(profile, user_image_source); |
| 344 | 345 |
| 345 // TabHelper is required for OOBE webui to make webview working on it. | 346 // TabHelper is required for OOBE webui to make webview working on it. |
| 346 content::WebContents* contents = web_ui->GetWebContents(); | 347 content::WebContents* contents = web_ui->GetWebContents(); |
| 347 extensions::TabHelper::CreateForWebContents(contents); | 348 extensions::TabHelper::CreateForWebContents(contents); |
| 348 } | 349 } |
| 349 | 350 |
| 350 OobeUI::~OobeUI() { | 351 OobeUI::~OobeUI() { |
| 351 core_handler_->SetDelegate(nullptr); | 352 core_handler_->SetDelegate(nullptr); |
| 352 network_dropdown_handler_->RemoveObserver(error_screen_handler_); | 353 network_dropdown_handler_->RemoveObserver(error_screen_handler_); |
| 353 ash::ScreenDimmer::GetForContainer( | 354 if (!chrome::IsRunningInMash()) { |
| 354 ash::kShellWindowId_LockScreenContainersContainer) | 355 ash::ScreenDimmer::GetForContainer( |
| 355 ->SetDimming(false); | 356 ash::kShellWindowId_LockScreenContainersContainer) |
| 357 ->SetDimming(false); |
| 358 } else { |
| 359 NOTIMPLEMENTED(); |
| 360 } |
| 356 } | 361 } |
| 357 | 362 |
| 358 CoreOobeActor* OobeUI::GetCoreOobeActor() { | 363 CoreOobeActor* OobeUI::GetCoreOobeActor() { |
| 359 return core_handler_; | 364 return core_handler_; |
| 360 } | 365 } |
| 361 | 366 |
| 362 NetworkView* OobeUI::GetNetworkView() { | 367 NetworkView* OobeUI::GetNetworkView() { |
| 363 return network_view_; | 368 return network_view_; |
| 364 } | 369 } |
| 365 | 370 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 563 } | 568 } |
| 564 | 569 |
| 565 void OobeUI::OnCurrentScreenChanged(const std::string& screen) { | 570 void OobeUI::OnCurrentScreenChanged(const std::string& screen) { |
| 566 previous_screen_ = current_screen_; | 571 previous_screen_ = current_screen_; |
| 567 OobeScreen new_screen = GetOobeScreenFromName(screen); | 572 OobeScreen new_screen = GetOobeScreenFromName(screen); |
| 568 | 573 |
| 569 const bool should_dim = | 574 const bool should_dim = |
| 570 std::find(std::begin(kDimOverlayScreenIds), | 575 std::find(std::begin(kDimOverlayScreenIds), |
| 571 std::end(kDimOverlayScreenIds), | 576 std::end(kDimOverlayScreenIds), |
| 572 new_screen) != std::end(kDimOverlayScreenIds); | 577 new_screen) != std::end(kDimOverlayScreenIds); |
| 573 ash::ScreenDimmer* screen_dimmer = ash::ScreenDimmer::GetForContainer( | 578 if (!chrome::IsRunningInMash()) { |
| 574 ash::kShellWindowId_LockScreenContainersContainer); | 579 ash::ScreenDimmer* screen_dimmer = ash::ScreenDimmer::GetForContainer( |
| 575 screen_dimmer->set_at_bottom(true); | 580 ash::kShellWindowId_LockScreenContainersContainer); |
| 576 screen_dimmer->SetDimming(should_dim); | 581 screen_dimmer->set_at_bottom(true); |
| 582 screen_dimmer->SetDimming(should_dim); |
| 583 } else { |
| 584 NOTIMPLEMENTED(); |
| 585 } |
| 577 | 586 |
| 578 FOR_EACH_OBSERVER(Observer, | 587 FOR_EACH_OBSERVER(Observer, |
| 579 observer_list_, | 588 observer_list_, |
| 580 OnCurrentScreenChanged(current_screen_, new_screen)); | 589 OnCurrentScreenChanged(current_screen_, new_screen)); |
| 581 current_screen_ = new_screen; | 590 current_screen_ = new_screen; |
| 582 } | 591 } |
| 583 | 592 |
| 584 } // namespace chromeos | 593 } // namespace chromeos |
| OLD | NEW |