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

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

Issue 11194011: Reverting this CL because it was committed before I gave the final LGTM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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
« no previous file with comments | « chrome/browser/chromeos/preferences.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:mergeinfo
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/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 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 base::FundamentalValue spoken_feedback_enabled( 1287 base::FundamentalValue spoken_feedback_enabled(
1288 pref_service->GetBoolean(prefs::kSpokenFeedbackEnabled)); 1288 pref_service->GetBoolean(prefs::kSpokenFeedbackEnabled));
1289 web_ui()->CallJavascriptFunction( 1289 web_ui()->CallJavascriptFunction(
1290 "BrowserOptions.setSpokenFeedbackCheckboxState", 1290 "BrowserOptions.setSpokenFeedbackCheckboxState",
1291 spoken_feedback_enabled); 1291 spoken_feedback_enabled);
1292 base::FundamentalValue high_contrast_enabled( 1292 base::FundamentalValue high_contrast_enabled(
1293 pref_service->GetBoolean(prefs::kHighContrastEnabled)); 1293 pref_service->GetBoolean(prefs::kHighContrastEnabled));
1294 web_ui()->CallJavascriptFunction( 1294 web_ui()->CallJavascriptFunction(
1295 "BrowserOptions.setHighContrastCheckboxState", 1295 "BrowserOptions.setHighContrastCheckboxState",
1296 high_contrast_enabled); 1296 high_contrast_enabled);
1297 base::FundamentalValue screen_magnifier_enabled(
1298 pref_service->GetBoolean(prefs::kScreenMagnifierEnabled));
1299 web_ui()->CallJavascriptFunction(
1300 "BrowserOptions.setScreenMagnifierCheckboxState",
1301 screen_magnifier_enabled);
1297 base::FundamentalValue virtual_keyboard_enabled( 1302 base::FundamentalValue virtual_keyboard_enabled(
1298 pref_service->GetBoolean(prefs::kVirtualKeyboardEnabled)); 1303 pref_service->GetBoolean(prefs::kVirtualKeyboardEnabled));
1299 web_ui()->CallJavascriptFunction( 1304 web_ui()->CallJavascriptFunction(
1300 "BrowserOptions.setVirtualKeyboardCheckboxState", 1305 "BrowserOptions.setVirtualKeyboardCheckboxState",
1301 virtual_keyboard_enabled); 1306 virtual_keyboard_enabled);
1302
1303 PrefService* user_pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
1304 base::FundamentalValue screen_magnifier_enabled(
1305 user_pref_service->GetBoolean(prefs::kScreenMagnifierEnabled));
1306 web_ui()->CallJavascriptFunction(
1307 "BrowserOptions.setScreenMagnifierCheckboxState",
1308 screen_magnifier_enabled);
1309 } 1307 }
1310 #endif 1308 #endif
1311 1309
1312 void BrowserOptionsHandler::SetupMetricsReportingSettingVisibility() { 1310 void BrowserOptionsHandler::SetupMetricsReportingSettingVisibility() {
1313 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) 1311 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS)
1314 // Don't show the reporting setting if we are in the guest mode. 1312 // Don't show the reporting setting if we are in the guest mode.
1315 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) { 1313 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) {
1316 base::FundamentalValue visible(false); 1314 base::FundamentalValue visible(false);
1317 web_ui()->CallJavascriptFunction( 1315 web_ui()->CallJavascriptFunction(
1318 "BrowserOptions.setMetricsReportingSettingVisibility", visible); 1316 "BrowserOptions.setMetricsReportingSettingVisibility", visible);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 1401 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
1404 } 1402 }
1405 StringValue label(label_str); 1403 StringValue label(label_str);
1406 1404
1407 web_ui()->CallJavascriptFunction( 1405 web_ui()->CallJavascriptFunction(
1408 "BrowserOptions.setupProxySettingsSection", disabled, label); 1406 "BrowserOptions.setupProxySettingsSection", disabled, label);
1409 #endif // !defined(OS_CHROMEOS) 1407 #endif // !defined(OS_CHROMEOS)
1410 } 1408 }
1411 1409
1412 } // namespace options 1410 } // namespace options
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/preferences.cc ('k') | chrome/chrome_browser_chromeos.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698