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

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

Issue 11065008: Full Screen Magnifier: Add MagnificationManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo. 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
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 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1289 base::FundamentalValue spoken_feedback_enabled( 1289 base::FundamentalValue spoken_feedback_enabled(
1290 pref_service->GetBoolean(prefs::kSpokenFeedbackEnabled)); 1290 pref_service->GetBoolean(prefs::kSpokenFeedbackEnabled));
1291 web_ui()->CallJavascriptFunction( 1291 web_ui()->CallJavascriptFunction(
1292 "BrowserOptions.setSpokenFeedbackCheckboxState", 1292 "BrowserOptions.setSpokenFeedbackCheckboxState",
1293 spoken_feedback_enabled); 1293 spoken_feedback_enabled);
1294 base::FundamentalValue high_contrast_enabled( 1294 base::FundamentalValue high_contrast_enabled(
1295 pref_service->GetBoolean(prefs::kHighContrastEnabled)); 1295 pref_service->GetBoolean(prefs::kHighContrastEnabled));
1296 web_ui()->CallJavascriptFunction( 1296 web_ui()->CallJavascriptFunction(
1297 "BrowserOptions.setHighContrastCheckboxState", 1297 "BrowserOptions.setHighContrastCheckboxState",
1298 high_contrast_enabled); 1298 high_contrast_enabled);
1299 base::FundamentalValue screen_magnifier_enabled(
1300 pref_service->GetBoolean(prefs::kScreenMagnifierEnabled));
1301 web_ui()->CallJavascriptFunction(
1302 "BrowserOptions.setScreenMagnifierCheckboxState",
1303 screen_magnifier_enabled);
1304 base::FundamentalValue virtual_keyboard_enabled( 1299 base::FundamentalValue virtual_keyboard_enabled(
1305 pref_service->GetBoolean(prefs::kVirtualKeyboardEnabled)); 1300 pref_service->GetBoolean(prefs::kVirtualKeyboardEnabled));
1306 web_ui()->CallJavascriptFunction( 1301 web_ui()->CallJavascriptFunction(
1307 "BrowserOptions.setVirtualKeyboardCheckboxState", 1302 "BrowserOptions.setVirtualKeyboardCheckboxState",
1308 virtual_keyboard_enabled); 1303 virtual_keyboard_enabled);
1304
1305 PrefService* user_pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
James Hawkins 2012/10/11 15:42:33 Can you explain this change?
yoshiki 2012/10/12 15:00:55 This change makes the magnifier settings per-user
1306 base::FundamentalValue screen_magnifier_enabled(
1307 user_pref_service->GetBoolean(prefs::kScreenMagnifierEnabled));
1308 web_ui()->CallJavascriptFunction(
1309 "BrowserOptions.setScreenMagnifierCheckboxState",
1310 screen_magnifier_enabled);
1309 } 1311 }
1310 #endif 1312 #endif
1311 1313
1312 void BrowserOptionsHandler::SetupMetricsReportingSettingVisibility() { 1314 void BrowserOptionsHandler::SetupMetricsReportingSettingVisibility() {
1313 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS) 1315 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_CHROMEOS)
1314 // Don't show the reporting setting if we are in the guest mode. 1316 // Don't show the reporting setting if we are in the guest mode.
1315 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) { 1317 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) {
1316 base::FundamentalValue visible(false); 1318 base::FundamentalValue visible(false);
1317 web_ui()->CallJavascriptFunction( 1319 web_ui()->CallJavascriptFunction(
1318 "BrowserOptions.setMetricsReportingSettingVisibility", visible); 1320 "BrowserOptions.setMetricsReportingSettingVisibility", visible);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)); 1405 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
1404 } 1406 }
1405 StringValue label(label_str); 1407 StringValue label(label_str);
1406 1408
1407 web_ui()->CallJavascriptFunction( 1409 web_ui()->CallJavascriptFunction(
1408 "BrowserOptions.setupProxySettingsSection", disabled, label); 1410 "BrowserOptions.setupProxySettingsSection", disabled, label);
1409 #endif // !defined(OS_CHROMEOS) 1411 #endif // !defined(OS_CHROMEOS)
1410 } 1412 }
1411 1413
1412 } // namespace options 1414 } // namespace options
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698