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/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 builder->Add("productName", IDS_SHORT_PRODUCT_NAME); | 71 builder->Add("productName", IDS_SHORT_PRODUCT_NAME); |
72 builder->Add("learnMore", IDS_LEARN_MORE); | 72 builder->Add("learnMore", IDS_LEARN_MORE); |
73 | 73 |
74 // OOBE accessibility options menu strings shown on each screen. | 74 // OOBE accessibility options menu strings shown on each screen. |
75 builder->Add("accessibilityLink", IDS_OOBE_ACCESSIBILITY_LINK); | 75 builder->Add("accessibilityLink", IDS_OOBE_ACCESSIBILITY_LINK); |
76 builder->Add("spokenFeedbackOption", IDS_OOBE_SPOKEN_FEEDBACK_OPTION); | 76 builder->Add("spokenFeedbackOption", IDS_OOBE_SPOKEN_FEEDBACK_OPTION); |
77 builder->Add("largeCursorOption", IDS_OOBE_LARGE_CURSOR_OPTION); | 77 builder->Add("largeCursorOption", IDS_OOBE_LARGE_CURSOR_OPTION); |
78 builder->Add("highContrastOption", IDS_OOBE_HIGH_CONTRAST_MODE_OPTION); | 78 builder->Add("highContrastOption", IDS_OOBE_HIGH_CONTRAST_MODE_OPTION); |
79 builder->Add("screenMagnifierOption", IDS_OOBE_SCREEN_MAGNIFIER_OPTION); | 79 builder->Add("screenMagnifierOption", IDS_OOBE_SCREEN_MAGNIFIER_OPTION); |
80 builder->Add("virtualKeyboardOption", IDS_OOBE_VIRTUAL_KEYBOARD_OPTION); | 80 builder->Add("virtualKeyboardOption", IDS_OOBE_VIRTUAL_KEYBOARD_OPTION); |
| 81 builder->Add("monoAudioOption", IDS_OOBE_MONO_AUDIO_OPTION); |
81 builder->Add("closeAccessibilityMenu", IDS_OOBE_CLOSE_ACCESSIBILITY_MENU); | 82 builder->Add("closeAccessibilityMenu", IDS_OOBE_CLOSE_ACCESSIBILITY_MENU); |
82 | 83 |
83 // Strings for the device requisition prompt. | 84 // Strings for the device requisition prompt. |
84 builder->Add("deviceRequisitionPromptCancel", | 85 builder->Add("deviceRequisitionPromptCancel", |
85 IDS_ENTERPRISE_DEVICE_REQUISITION_PROMPT_CANCEL); | 86 IDS_ENTERPRISE_DEVICE_REQUISITION_PROMPT_CANCEL); |
86 builder->Add("deviceRequisitionPromptOk", | 87 builder->Add("deviceRequisitionPromptOk", |
87 IDS_ENTERPRISE_DEVICE_REQUISITION_PROMPT_OK); | 88 IDS_ENTERPRISE_DEVICE_REQUISITION_PROMPT_OK); |
88 builder->Add("deviceRequisitionPromptText", | 89 builder->Add("deviceRequisitionPromptText", |
89 IDS_ENTERPRISE_DEVICE_REQUISITION_PROMPT_TEXT); | 90 IDS_ENTERPRISE_DEVICE_REQUISITION_PROMPT_TEXT); |
90 builder->Add("deviceRequisitionRemoraPromptCancel", | 91 builder->Add("deviceRequisitionRemoraPromptCancel", |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 AddCallback("skipUpdateEnrollAfterEula", | 123 AddCallback("skipUpdateEnrollAfterEula", |
123 &CoreOobeHandler::HandleSkipUpdateEnrollAfterEula); | 124 &CoreOobeHandler::HandleSkipUpdateEnrollAfterEula); |
124 AddCallback("updateCurrentScreen", | 125 AddCallback("updateCurrentScreen", |
125 &CoreOobeHandler::HandleUpdateCurrentScreen); | 126 &CoreOobeHandler::HandleUpdateCurrentScreen); |
126 AddCallback("enableHighContrast", | 127 AddCallback("enableHighContrast", |
127 &CoreOobeHandler::HandleEnableHighContrast); | 128 &CoreOobeHandler::HandleEnableHighContrast); |
128 AddCallback("enableLargeCursor", | 129 AddCallback("enableLargeCursor", |
129 &CoreOobeHandler::HandleEnableLargeCursor); | 130 &CoreOobeHandler::HandleEnableLargeCursor); |
130 AddCallback("enableVirtualKeyboard", | 131 AddCallback("enableVirtualKeyboard", |
131 &CoreOobeHandler::HandleEnableVirtualKeyboard); | 132 &CoreOobeHandler::HandleEnableVirtualKeyboard); |
| 133 AddCallback("enableMonoAudio", |
| 134 &CoreOobeHandler::HandleEnableMonoAudio); |
132 AddCallback("enableScreenMagnifier", | 135 AddCallback("enableScreenMagnifier", |
133 &CoreOobeHandler::HandleEnableScreenMagnifier); | 136 &CoreOobeHandler::HandleEnableScreenMagnifier); |
134 AddCallback("enableSpokenFeedback", | 137 AddCallback("enableSpokenFeedback", |
135 &CoreOobeHandler::HandleEnableSpokenFeedback); | 138 &CoreOobeHandler::HandleEnableSpokenFeedback); |
136 AddCallback("setDeviceRequisition", | 139 AddCallback("setDeviceRequisition", |
137 &CoreOobeHandler::HandleSetDeviceRequisition); | 140 &CoreOobeHandler::HandleSetDeviceRequisition); |
138 AddCallback("screenAssetsLoaded", | 141 AddCallback("screenAssetsLoaded", |
139 &CoreOobeHandler::HandleScreenAssetsLoaded); | 142 &CoreOobeHandler::HandleScreenAssetsLoaded); |
140 AddRawCallback("skipToLoginForTesting", | 143 AddRawCallback("skipToLoginForTesting", |
141 &CoreOobeHandler::HandleSkipToLoginForTesting); | 144 &CoreOobeHandler::HandleSkipToLoginForTesting); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 } | 262 } |
260 | 263 |
261 void CoreOobeHandler::HandleEnableLargeCursor(bool enabled) { | 264 void CoreOobeHandler::HandleEnableLargeCursor(bool enabled) { |
262 AccessibilityManager::Get()->EnableLargeCursor(enabled); | 265 AccessibilityManager::Get()->EnableLargeCursor(enabled); |
263 } | 266 } |
264 | 267 |
265 void CoreOobeHandler::HandleEnableVirtualKeyboard(bool enabled) { | 268 void CoreOobeHandler::HandleEnableVirtualKeyboard(bool enabled) { |
266 AccessibilityManager::Get()->EnableVirtualKeyboard(enabled); | 269 AccessibilityManager::Get()->EnableVirtualKeyboard(enabled); |
267 } | 270 } |
268 | 271 |
| 272 void CoreOobeHandler::HandleEnableMonoAudio(bool enabled) { |
| 273 AccessibilityManager::Get()->EnableMonoAudio(enabled); |
| 274 } |
| 275 |
269 void CoreOobeHandler::HandleEnableScreenMagnifier(bool enabled) { | 276 void CoreOobeHandler::HandleEnableScreenMagnifier(bool enabled) { |
270 // TODO(nkostylev): Add support for partial screen magnifier. | 277 // TODO(nkostylev): Add support for partial screen magnifier. |
271 DCHECK(MagnificationManager::Get()); | 278 DCHECK(MagnificationManager::Get()); |
272 MagnificationManager::Get()->SetMagnifierEnabled(enabled); | 279 MagnificationManager::Get()->SetMagnifierEnabled(enabled); |
273 } | 280 } |
274 | 281 |
275 void CoreOobeHandler::HandleEnableSpokenFeedback(bool /* enabled */) { | 282 void CoreOobeHandler::HandleEnableSpokenFeedback(bool /* enabled */) { |
276 // Checkbox is initialized on page init and updates when spoken feedback | 283 // Checkbox is initialized on page init and updates when spoken feedback |
277 // setting is changed so just toggle spoken feedback here. | 284 // setting is changed so just toggle spoken feedback here. |
278 AccessibilityManager::Get()->ToggleSpokenFeedback( | 285 AccessibilityManager::Get()->ToggleSpokenFeedback( |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 | 432 |
426 void CoreOobeHandler::InitDemoModeDetection() { | 433 void CoreOobeHandler::InitDemoModeDetection() { |
427 demo_mode_detector_.InitDetection(); | 434 demo_mode_detector_.InitDetection(); |
428 } | 435 } |
429 | 436 |
430 void CoreOobeHandler::StopDemoModeDetection() { | 437 void CoreOobeHandler::StopDemoModeDetection() { |
431 demo_mode_detector_.StopDetection(); | 438 demo_mode_detector_.StopDetection(); |
432 } | 439 } |
433 | 440 |
434 } // namespace chromeos | 441 } // namespace chromeos |
OLD | NEW |