| 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 "ash/shell_window_ids.h" | 9 #include "ash/shell_window_ids.h" |
| 10 #include "ash/wm/screen_dimmer.h" | 10 #include "ash/wm/screen_dimmer.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
| 16 #include "base/values.h" | 16 #include "base/values.h" |
| 17 #include "chrome/browser/browser_process.h" | 17 #include "chrome/browser/browser_process.h" |
| 18 #include "chrome/browser/browser_process_platform_part.h" | 18 #include "chrome/browser/browser_process_platform_part.h" |
| 19 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen_
actor.h" | 19 #include "chrome/browser/chromeos/login/enrollment/auto_enrollment_check_screen_
actor.h" |
| 20 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen_actor.h" | 20 #include "chrome/browser/chromeos/login/enrollment/enrollment_screen_actor.h" |
| 21 #include "chrome/browser/chromeos/login/screens/error_screen.h" | 21 #include "chrome/browser/chromeos/login/screens/error_screen.h" |
| 22 #include "chrome/browser/chromeos/login/startup_utils.h" | 22 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 23 #include "chrome/browser/chromeos/login/ui/login_display_host.h" | 23 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
| 24 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | |
| 25 #include "chrome/browser/chromeos/login/wizard_controller.h" | 24 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 26 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 25 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 27 #include "chrome/browser/chromeos/settings/shutdown_policy_handler.h" | 26 #include "chrome/browser/chromeos/settings/shutdown_policy_handler.h" |
| 28 #include "chrome/browser/chromeos/system/input_device_settings.h" | 27 #include "chrome/browser/chromeos/system/input_device_settings.h" |
| 29 #include "chrome/browser/extensions/signin/gaia_auth_extension_loader.h" | 28 #include "chrome/browser/extensions/signin/gaia_auth_extension_loader.h" |
| 30 #include "chrome/browser/extensions/tab_helper.h" | 29 #include "chrome/browser/extensions/tab_helper.h" |
| 31 #include "chrome/browser/profiles/profile.h" | 30 #include "chrome/browser/profiles/profile.h" |
| 32 #include "chrome/browser/ui/webui/about_ui.h" | 31 #include "chrome/browser/ui/webui/about_ui.h" |
| 33 #include "chrome/browser/ui/webui/chromeos/login/app_launch_splash_screen_handle
r.h" | 32 #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" | 33 #include "chrome/browser/ui/webui/chromeos/login/auto_enrollment_check_screen_ha
ndler.h" |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 | 598 |
| 600 void OobeUI::ShowSigninScreen(const LoginScreenContext& context, | 599 void OobeUI::ShowSigninScreen(const LoginScreenContext& context, |
| 601 SigninScreenHandlerDelegate* delegate, | 600 SigninScreenHandlerDelegate* delegate, |
| 602 NativeWindowDelegate* native_window_delegate) { | 601 NativeWindowDelegate* native_window_delegate) { |
| 603 // Check our device mode. | 602 // Check our device mode. |
| 604 policy::BrowserPolicyConnectorChromeOS* connector = | 603 policy::BrowserPolicyConnectorChromeOS* connector = |
| 605 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 604 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| 606 if (connector->GetDeviceMode() == policy::DEVICE_MODE_LEGACY_RETAIL_MODE) { | 605 if (connector->GetDeviceMode() == policy::DEVICE_MODE_LEGACY_RETAIL_MODE) { |
| 607 // If we're in legacy retail mode, the best thing we can do is launch the | 606 // If we're in legacy retail mode, the best thing we can do is launch the |
| 608 // new offline demo mode. | 607 // new offline demo mode. |
| 609 LoginDisplayHost* host = LoginDisplayHostImpl::default_host(); | 608 LoginDisplayHost::default_host()->StartDemoAppLaunch(); |
| 610 host->StartDemoAppLaunch(); | |
| 611 return; | 609 return; |
| 612 } | 610 } |
| 613 | 611 |
| 614 signin_screen_handler_->SetDelegate(delegate); | 612 signin_screen_handler_->SetDelegate(delegate); |
| 615 signin_screen_handler_->SetNativeWindowDelegate(native_window_delegate); | 613 signin_screen_handler_->SetNativeWindowDelegate(native_window_delegate); |
| 616 | 614 |
| 617 LoginScreenContext actual_context(context); | 615 LoginScreenContext actual_context(context); |
| 618 actual_context.set_oobe_ui(core_handler_->show_oobe_ui()); | 616 actual_context.set_oobe_ui(core_handler_->show_oobe_ui()); |
| 619 signin_screen_handler_->Show(actual_context); | 617 signin_screen_handler_->Show(actual_context); |
| 620 } | 618 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 652 screen_dimmer->set_at_bottom(true); | 650 screen_dimmer->set_at_bottom(true); |
| 653 screen_dimmer->SetDimming(should_dim); | 651 screen_dimmer->SetDimming(should_dim); |
| 654 | 652 |
| 655 FOR_EACH_OBSERVER(Observer, | 653 FOR_EACH_OBSERVER(Observer, |
| 656 observer_list_, | 654 observer_list_, |
| 657 OnCurrentScreenChanged(current_screen_, new_screen)); | 655 OnCurrentScreenChanged(current_screen_, new_screen)); |
| 658 current_screen_ = new_screen; | 656 current_screen_ = new_screen; |
| 659 } | 657 } |
| 660 | 658 |
| 661 } // namespace chromeos | 659 } // namespace chromeos |
| OLD | NEW |