OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/system_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/system_options_handler.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 DCHECK(web_ui_); | 98 DCHECK(web_ui_); |
99 web_ui_->RegisterMessageCallback("accessibilityChange", | 99 web_ui_->RegisterMessageCallback("accessibilityChange", |
100 NewCallback(this, &SystemOptionsHandler::AccessibilityChangeCallback)); | 100 NewCallback(this, &SystemOptionsHandler::AccessibilityChangeCallback)); |
101 } | 101 } |
102 | 102 |
103 void SystemOptionsHandler::AccessibilityChangeCallback(const ListValue* args) { | 103 void SystemOptionsHandler::AccessibilityChangeCallback(const ListValue* args) { |
104 std::string checked_str; | 104 std::string checked_str; |
105 args->GetString(0, &checked_str); | 105 args->GetString(0, &checked_str); |
106 bool accessibility_enabled = (checked_str == "true"); | 106 bool accessibility_enabled = (checked_str == "true"); |
107 | 107 |
108 chromeos::accessibility::EnableAccessibility(accessibility_enabled); | 108 chromeos::accessibility::EnableAccessibility(accessibility_enabled, NULL); |
109 } | 109 } |
OLD | NEW |