| 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/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 void CoreOobeHandler::SetKeyboardState(bool shown, const gfx::Rect& bounds) { | 234 void CoreOobeHandler::SetKeyboardState(bool shown, const gfx::Rect& bounds) { |
| 235 CallJS("setKeyboardState", shown, bounds.width(), bounds.height()); | 235 CallJS("setKeyboardState", shown, bounds.width(), bounds.height()); |
| 236 } | 236 } |
| 237 | 237 |
| 238 void CoreOobeHandler::SetClientAreaSize(int width, int height) { | 238 void CoreOobeHandler::SetClientAreaSize(int width, int height) { |
| 239 CallJS("setClientAreaSize", width, height); | 239 CallJS("setClientAreaSize", width, height); |
| 240 } | 240 } |
| 241 | 241 |
| 242 void CoreOobeHandler::HandleInitialized() { | 242 void CoreOobeHandler::HandleInitialized() { |
| 243 oobe_ui_->InitializeHandlers(); | 243 oobe_ui_->InitializeHandlers(); |
| 244 |
| 245 // Initialize the ShutdownPolicyObserver and trigger an initial update. |
| 246 oobe_ui_->InitShutdownPolicyObserver(); |
| 244 } | 247 } |
| 245 | 248 |
| 246 void CoreOobeHandler::HandleSkipUpdateEnrollAfterEula() { | 249 void CoreOobeHandler::HandleSkipUpdateEnrollAfterEula() { |
| 247 WizardController* controller = WizardController::default_controller(); | 250 WizardController* controller = WizardController::default_controller(); |
| 248 DCHECK(controller); | 251 DCHECK(controller); |
| 249 if (controller) | 252 if (controller) |
| 250 controller->SkipUpdateEnrollAfterEula(); | 253 controller->SkipUpdateEnrollAfterEula(); |
| 251 } | 254 } |
| 252 | 255 |
| 253 void CoreOobeHandler::HandleUpdateCurrentScreen(const std::string& screen) { | 256 void CoreOobeHandler::HandleUpdateCurrentScreen(const std::string& screen) { |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 void CoreOobeHandler::ShowOobeUI(bool show) { | 322 void CoreOobeHandler::ShowOobeUI(bool show) { |
| 320 if (show == show_oobe_ui_) | 323 if (show == show_oobe_ui_) |
| 321 return; | 324 return; |
| 322 | 325 |
| 323 show_oobe_ui_ = show; | 326 show_oobe_ui_ = show; |
| 324 | 327 |
| 325 if (page_is_ready()) | 328 if (page_is_ready()) |
| 326 UpdateOobeUIVisibility(); | 329 UpdateOobeUIVisibility(); |
| 327 } | 330 } |
| 328 | 331 |
| 332 void CoreOobeHandler::UpdateShutdownButtonVisibility( |
| 333 bool shutdown_button_visible) { |
| 334 CallJS("showShutdown", shutdown_button_visible); |
| 335 } |
| 336 |
| 329 void CoreOobeHandler::UpdateA11yState() { | 337 void CoreOobeHandler::UpdateA11yState() { |
| 330 #if !defined(USE_ATHENA) | 338 #if !defined(USE_ATHENA) |
| 331 // TODO(dpolukhin): crbug.com/412891 | 339 // TODO(dpolukhin): crbug.com/412891 |
| 332 DCHECK(MagnificationManager::Get()); | 340 DCHECK(MagnificationManager::Get()); |
| 333 base::DictionaryValue a11y_info; | 341 base::DictionaryValue a11y_info; |
| 334 a11y_info.SetBoolean("highContrastEnabled", | 342 a11y_info.SetBoolean("highContrastEnabled", |
| 335 AccessibilityManager::Get()->IsHighContrastEnabled()); | 343 AccessibilityManager::Get()->IsHighContrastEnabled()); |
| 336 a11y_info.SetBoolean("largeCursorEnabled", | 344 a11y_info.SetBoolean("largeCursorEnabled", |
| 337 AccessibilityManager::Get()->IsLargeCursorEnabled()); | 345 AccessibilityManager::Get()->IsLargeCursorEnabled()); |
| 338 a11y_info.SetBoolean("spokenFeedbackEnabled", | 346 a11y_info.SetBoolean("spokenFeedbackEnabled", |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 | 442 |
| 435 void CoreOobeHandler::InitDemoModeDetection() { | 443 void CoreOobeHandler::InitDemoModeDetection() { |
| 436 demo_mode_detector_.InitDetection(); | 444 demo_mode_detector_.InitDetection(); |
| 437 } | 445 } |
| 438 | 446 |
| 439 void CoreOobeHandler::StopDemoModeDetection() { | 447 void CoreOobeHandler::StopDemoModeDetection() { |
| 440 demo_mode_detector_.StopDetection(); | 448 demo_mode_detector_.StopDetection(); |
| 441 } | 449 } |
| 442 | 450 |
| 443 } // namespace chromeos | 451 } // namespace chromeos |
| OLD | NEW |