| 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/core_oobe_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 10 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
| 11 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 11 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
| 12 #include "chrome/browser/chromeos/login/helper.h" | 12 #include "chrome/browser/chromeos/login/helper.h" |
| 13 #include "chrome/browser/chromeos/login/lock/screen_locker.h" | 13 #include "chrome/browser/chromeos/login/lock/screen_locker.h" |
| 14 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 14 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" |
| 15 #include "chrome/browser/chromeos/login/wizard_controller.h" | 15 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 16 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" | 16 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" |
| 17 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" | 17 #include "chrome/browser/chromeos/policy/device_cloud_policy_manager_chromeos.h" |
| 18 #include "chrome/browser/chromeos/system/input_device_settings.h" | 18 #include "chrome/browser/chromeos/system/input_device_settings.h" |
| 19 #include "chrome/browser/lifetime/application_lifetime.h" | 19 #include "chrome/browser/lifetime/application_lifetime.h" |
| 20 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | 20 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" |
| 21 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 21 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 22 #include "chrome/common/channel_info.h" |
| 22 #include "chrome/common/chrome_constants.h" | 23 #include "chrome/common/chrome_constants.h" |
| 23 #include "chrome/common/chrome_version_info.h" | |
| 24 #include "chrome/grit/chromium_strings.h" | 24 #include "chrome/grit/chromium_strings.h" |
| 25 #include "chrome/grit/generated_resources.h" | 25 #include "chrome/grit/generated_resources.h" |
| 26 #include "chromeos/chromeos_constants.h" | 26 #include "chromeos/chromeos_constants.h" |
| 27 #include "components/login/localized_values_builder.h" | 27 #include "components/login/localized_values_builder.h" |
| 28 #include "components/version_info/version_info.h" |
| 28 #include "grit/components_strings.h" | 29 #include "grit/components_strings.h" |
| 29 #include "ui/chromeos/accessibility_types.h" | 30 #include "ui/chromeos/accessibility_types.h" |
| 30 #include "ui/gfx/display.h" | 31 #include "ui/gfx/display.h" |
| 31 #include "ui/gfx/geometry/size.h" | 32 #include "ui/gfx/geometry/size.h" |
| 32 #include "ui/gfx/screen.h" | 33 #include "ui/gfx/screen.h" |
| 33 #include "ui/keyboard/keyboard_controller.h" | 34 #include "ui/keyboard/keyboard_controller.h" |
| 34 | 35 |
| 35 namespace { | 36 namespace { |
| 36 | 37 |
| 37 const char kJsScreenPath[] = "cr.ui.Oobe"; | 38 const char kJsScreenPath[] = "cr.ui.Oobe"; |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 a11y_info.SetBoolean("screenMagnifierEnabled", | 338 a11y_info.SetBoolean("screenMagnifierEnabled", |
| 338 MagnificationManager::Get()->IsMagnifierEnabled()); | 339 MagnificationManager::Get()->IsMagnifierEnabled()); |
| 339 a11y_info.SetBoolean("virtualKeyboardEnabled", | 340 a11y_info.SetBoolean("virtualKeyboardEnabled", |
| 340 AccessibilityManager::Get()->IsVirtualKeyboardEnabled()); | 341 AccessibilityManager::Get()->IsVirtualKeyboardEnabled()); |
| 341 CallJS("refreshA11yInfo", a11y_info); | 342 CallJS("refreshA11yInfo", a11y_info); |
| 342 } | 343 } |
| 343 | 344 |
| 344 void CoreOobeHandler::UpdateOobeUIVisibility() { | 345 void CoreOobeHandler::UpdateOobeUIVisibility() { |
| 345 // Don't show version label on the stable channel by default. | 346 // Don't show version label on the stable channel by default. |
| 346 bool should_show_version = true; | 347 bool should_show_version = true; |
| 347 version_info::Channel channel = chrome::VersionInfo::GetChannel(); | 348 version_info::Channel channel = chrome::GetChannel(); |
| 348 if (channel == version_info::Channel::STABLE || | 349 if (channel == version_info::Channel::STABLE || |
| 349 channel == version_info::Channel::BETA) { | 350 channel == version_info::Channel::BETA) { |
| 350 should_show_version = false; | 351 should_show_version = false; |
| 351 } | 352 } |
| 352 CallJS("showVersion", should_show_version); | 353 CallJS("showVersion", should_show_version); |
| 353 CallJS("showOobeUI", show_oobe_ui_); | 354 CallJS("showOobeUI", show_oobe_ui_); |
| 354 if (system::InputDeviceSettings::Get()->ForceKeyboardDrivenUINavigation()) | 355 if (system::InputDeviceSettings::Get()->ForceKeyboardDrivenUINavigation()) |
| 355 CallJS("enableKeyboardFlow", true); | 356 CallJS("enableKeyboardFlow", true); |
| 356 } | 357 } |
| 357 | 358 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 | 418 |
| 418 void CoreOobeHandler::InitDemoModeDetection() { | 419 void CoreOobeHandler::InitDemoModeDetection() { |
| 419 demo_mode_detector_.InitDetection(); | 420 demo_mode_detector_.InitDetection(); |
| 420 } | 421 } |
| 421 | 422 |
| 422 void CoreOobeHandler::StopDemoModeDetection() { | 423 void CoreOobeHandler::StopDemoModeDetection() { |
| 423 demo_mode_detector_.StopDetection(); | 424 demo_mode_detector_.StopDetection(); |
| 424 } | 425 } |
| 425 | 426 |
| 426 } // namespace chromeos | 427 } // namespace chromeos |
| OLD | NEW |