Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/system_options_handler.cc

Issue 7649006: more changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix another typo Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 localized_strings->Set("timezoneList", 83 localized_strings->Set("timezoneList",
84 reinterpret_cast<chromeos::SystemSettingsProvider*>( 84 reinterpret_cast<chromeos::SystemSettingsProvider*>(
85 settings_provider_.get())->GetTimezoneList()); 85 settings_provider_.get())->GetTimezoneList());
86 } 86 }
87 87
88 void SystemOptionsHandler::Initialize() { 88 void SystemOptionsHandler::Initialize() {
89 DCHECK(web_ui_); 89 DCHECK(web_ui_);
90 PrefService* pref_service = g_browser_process->local_state(); 90 PrefService* pref_service = g_browser_process->local_state();
91 bool acc_enabled = pref_service->GetBoolean(prefs::kAccessibilityEnabled); 91 bool acc_enabled = pref_service->GetBoolean(prefs::kAccessibilityEnabled);
92 base::FundamentalValue checked(acc_enabled); 92 base::BooleanValue checked(acc_enabled);
93 web_ui_->CallJavascriptFunction( 93 web_ui_->CallJavascriptFunction(
94 "options.SystemOptions.SetAccessibilityCheckboxState", checked); 94 "options.SystemOptions.SetAccessibilityCheckboxState", checked);
95 } 95 }
96 96
97 void SystemOptionsHandler::RegisterMessages() { 97 void SystemOptionsHandler::RegisterMessages() {
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, NULL); 108 chromeos::accessibility::EnableAccessibility(accessibility_enabled, NULL);
109 } 109 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698