| 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/options/browser_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/browser_options_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 args->GetBoolean(0, &enabled); | 1258 args->GetBoolean(0, &enabled); |
| 1259 | 1259 |
| 1260 chromeos::accessibility::EnableHighContrast(enabled); | 1260 chromeos::accessibility::EnableHighContrast(enabled); |
| 1261 } | 1261 } |
| 1262 | 1262 |
| 1263 void BrowserOptionsHandler::ScreenMagnifierChangeCallback( | 1263 void BrowserOptionsHandler::ScreenMagnifierChangeCallback( |
| 1264 const ListValue* args) { | 1264 const ListValue* args) { |
| 1265 std::string type_name; | 1265 std::string type_name; |
| 1266 args->GetString(0, &type_name); | 1266 args->GetString(0, &type_name); |
| 1267 | 1267 |
| 1268 chromeos::accessibility::ScreenMagnifierType type = | 1268 ash::MagnifierType type = |
| 1269 chromeos::accessibility::ScreenMagnifierTypeFromName(type_name.c_str()); | 1269 chromeos::accessibility::MagnifierTypeFromName(type_name.c_str()); |
| 1270 | 1270 |
| 1271 chromeos::accessibility::SetScreenMagnifier(type); | 1271 chromeos::accessibility::SetScreenMagnifier(type); |
| 1272 } | 1272 } |
| 1273 | 1273 |
| 1274 void BrowserOptionsHandler::VirtualKeyboardChangeCallback( | 1274 void BrowserOptionsHandler::VirtualKeyboardChangeCallback( |
| 1275 const ListValue* args) { | 1275 const ListValue* args) { |
| 1276 bool enabled = false; | 1276 bool enabled = false; |
| 1277 args->GetBoolean(0, &enabled); | 1277 args->GetBoolean(0, &enabled); |
| 1278 | 1278 |
| 1279 chromeos::accessibility::EnableVirtualKeyboard(enabled); | 1279 chromeos::accessibility::EnableVirtualKeyboard(enabled); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 1303 web_ui()->CallJavascriptFunction( | 1303 web_ui()->CallJavascriptFunction( |
| 1304 "BrowserOptions.setSpokenFeedbackCheckboxState", | 1304 "BrowserOptions.setSpokenFeedbackCheckboxState", |
| 1305 spoken_feedback_enabled); | 1305 spoken_feedback_enabled); |
| 1306 base::FundamentalValue high_contrast_enabled( | 1306 base::FundamentalValue high_contrast_enabled( |
| 1307 pref_service->GetBoolean(prefs::kHighContrastEnabled)); | 1307 pref_service->GetBoolean(prefs::kHighContrastEnabled)); |
| 1308 web_ui()->CallJavascriptFunction( | 1308 web_ui()->CallJavascriptFunction( |
| 1309 "BrowserOptions.setHighContrastCheckboxState", | 1309 "BrowserOptions.setHighContrastCheckboxState", |
| 1310 high_contrast_enabled); | 1310 high_contrast_enabled); |
| 1311 | 1311 |
| 1312 base::StringValue magnifier_type( | 1312 base::StringValue magnifier_type( |
| 1313 pref_service->GetString(prefs::kScreenMagnifierType)); | 1313 pref_service->GetString(prefs::kMagnifierType)); |
| 1314 web_ui()->CallJavascriptFunction( | 1314 web_ui()->CallJavascriptFunction( |
| 1315 "BrowserOptions.setScreenMagnifierTypeState", | 1315 "BrowserOptions.setMagnifierTypeState", |
| 1316 magnifier_type); | 1316 magnifier_type); |
| 1317 | 1317 |
| 1318 base::FundamentalValue virtual_keyboard_enabled( | 1318 base::FundamentalValue virtual_keyboard_enabled( |
| 1319 pref_service->GetBoolean(prefs::kVirtualKeyboardEnabled)); | 1319 pref_service->GetBoolean(prefs::kVirtualKeyboardEnabled)); |
| 1320 web_ui()->CallJavascriptFunction( | 1320 web_ui()->CallJavascriptFunction( |
| 1321 "BrowserOptions.setVirtualKeyboardCheckboxState", | 1321 "BrowserOptions.setVirtualKeyboardCheckboxState", |
| 1322 virtual_keyboard_enabled); | 1322 virtual_keyboard_enabled); |
| 1323 } | 1323 } |
| 1324 #endif | 1324 #endif |
| 1325 | 1325 |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1417 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); | 1417 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); |
| 1418 } | 1418 } |
| 1419 StringValue label(label_str); | 1419 StringValue label(label_str); |
| 1420 | 1420 |
| 1421 web_ui()->CallJavascriptFunction( | 1421 web_ui()->CallJavascriptFunction( |
| 1422 "BrowserOptions.setupProxySettingsSection", disabled, label); | 1422 "BrowserOptions.setupProxySettingsSection", disabled, label); |
| 1423 #endif // !defined(OS_CHROMEOS) | 1423 #endif // !defined(OS_CHROMEOS) |
| 1424 } | 1424 } |
| 1425 | 1425 |
| 1426 } // namespace options | 1426 } // namespace options |
| OLD | NEW |