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

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

Issue 9693032: [uber page] Split up initialization of handlers from initialization of webui pages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright bumps Created 8 years, 9 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) 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/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/bind.h" 10 #include "base/bind.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_VIRTUAL_KEYBOARD_DESCRIPTION)); 127 IDS_OPTIONS_SETTINGS_ACCESSIBILITY_VIRTUAL_KEYBOARD_DESCRIPTION));
128 128
129 // TODO(pastarmovj): replace this with a call to the CrosSettings list 129 // TODO(pastarmovj): replace this with a call to the CrosSettings list
130 // handling functionality to come. 130 // handling functionality to come.
131 localized_strings->Set("timezoneList", 131 localized_strings->Set("timezoneList",
132 static_cast<chromeos::SystemSettingsProvider*>( 132 static_cast<chromeos::SystemSettingsProvider*>(
133 chromeos::CrosSettings::Get()->GetProvider( 133 chromeos::CrosSettings::Get()->GetProvider(
134 chromeos::kSystemTimezone))->GetTimezoneList()); 134 chromeos::kSystemTimezone))->GetTimezoneList());
135 } 135 }
136 136
137 void SystemOptionsHandler::Initialize() { 137 void SystemOptionsHandler::InitializeHandler() {
138 PrefService* pref_service = g_browser_process->local_state(); 138 PrefService* pref_service = g_browser_process->local_state();
139 base::FundamentalValue spoken_feedback_enabled( 139 base::FundamentalValue spoken_feedback_enabled(
140 pref_service->GetBoolean(prefs::kSpokenFeedbackEnabled)); 140 pref_service->GetBoolean(prefs::kSpokenFeedbackEnabled));
141 web_ui()->CallJavascriptFunction( 141 web_ui()->CallJavascriptFunction(
142 "options.SystemOptions.setSpokenFeedbackCheckboxState", 142 "options.SystemOptions.setSpokenFeedbackCheckboxState",
143 spoken_feedback_enabled); 143 spoken_feedback_enabled);
144 base::FundamentalValue high_contrast_enabled( 144 base::FundamentalValue high_contrast_enabled(
145 pref_service->GetBoolean(prefs::kHighContrastEnabled)); 145 pref_service->GetBoolean(prefs::kHighContrastEnabled));
146 web_ui()->CallJavascriptFunction( 146 web_ui()->CallJavascriptFunction(
147 "options.SystemOptions.setHighContrastCheckboxState", 147 "options.SystemOptions.setHighContrastCheckboxState",
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 // can make it very difficult to see the increase brightness button. 259 // can make it very difficult to see the increase brightness button.
260 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 260 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
261 DecreaseScreenBrightness(false); 261 DecreaseScreenBrightness(false);
262 } 262 }
263 263
264 void SystemOptionsHandler::IncreaseScreenBrightnessCallback( 264 void SystemOptionsHandler::IncreaseScreenBrightnessCallback(
265 const ListValue* args) { 265 const ListValue* args) {
266 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 266 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
267 IncreaseScreenBrightness(); 267 IncreaseScreenBrightness();
268 } 268 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698