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

Side by Side Diff: chrome/browser/resources/options/browser_options.js

Issue 2630583002: Add setting to isolate zoom changes by default. (Closed)
Patch Set: Use code review comments for questions instead of TODOs. Created 3 years, 10 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
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 cr.exportPath('options'); 5 cr.exportPath('options');
6 6
7 /** 7 /**
8 * @typedef {{actionLinkText: (string|undefined), 8 * @typedef {{actionLinkText: (string|undefined),
9 * accountInfo: (string|undefined), 9 * accountInfo: (string|undefined),
10 * childUser: (boolean|undefined), 10 * childUser: (boolean|undefined),
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 var value = event.target.options[event.target.selectedIndex].value; 675 var value = event.target.options[event.target.selectedIndex].value;
676 Preferences.setIntegerPref( 676 Preferences.setIntegerPref(
677 'webkit.webprefs.default_fixed_font_size', 677 'webkit.webprefs.default_fixed_font_size',
678 value - OptionsPage.SIZE_DIFFERENCE_FIXED_STANDARD, true); 678 value - OptionsPage.SIZE_DIFFERENCE_FIXED_STANDARD, true);
679 chrome.send('defaultFontSizeAction', [String(value)]); 679 chrome.send('defaultFontSizeAction', [String(value)]);
680 }; 680 };
681 $('defaultZoomFactor').onchange = function(event) { 681 $('defaultZoomFactor').onchange = function(event) {
682 chrome.send('defaultZoomFactorAction', 682 chrome.send('defaultZoomFactorAction',
683 [String(event.target.options[event.target.selectedIndex].value)]); 683 [String(event.target.options[event.target.selectedIndex].value)]);
684 }; 684 };
685 $('defaultZoomScope').onchange = function(event) {
686 chrome.send('defaultZoomScopeAction',
687 [event.target.checked]);
688 };
685 $('safeBrowsingExtendedReportingCheckbox').onchange = function(event) { 689 $('safeBrowsingExtendedReportingCheckbox').onchange = function(event) {
686 chrome.send('safeBrowsingExtendedReportingAction', 690 chrome.send('safeBrowsingExtendedReportingAction',
687 [event.target.checked]); 691 [event.target.checked]);
688 }; 692 };
689 693
690 // Languages section. 694 // Languages section.
691 var showLanguageOptions = function(event) { 695 var showLanguageOptions = function(event) {
692 PageManager.showPageByName('languages'); 696 PageManager.showPageByName('languages');
693 chrome.send('coreOptionsUserMetricsAction', 697 chrome.send('coreOptionsUserMetricsAction',
694 ['Options_LanuageAndSpellCheckSettings']); 698 ['Options_LanuageAndSpellCheckSettings']);
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 var value, title, selected; 2017 var value, title, selected;
2014 for (var i = 0; i < items.length; i++) { 2018 for (var i = 0; i < items.length; i++) {
2015 title = items[i][0]; 2019 title = items[i][0];
2016 value = items[i][1]; 2020 value = items[i][1];
2017 selected = items[i][2]; 2021 selected = items[i][2];
2018 element.appendChild(new Option(title, value, false, selected)); 2022 element.appendChild(new Option(title, value, false, selected));
2019 } 2023 }
2020 }, 2024 },
2021 2025
2022 /** 2026 /**
2027 * Set the checked state of the default zoom scope checkbox.
2028 * @param {boolean} checked Whether to check the checkbox.
2029 * @private
2030 */
2031 setupZoomScopeCheckbox_: function(checked) {
2032 $('defaultZoomScope').checked = checked;
2033 },
2034
2035 /**
2023 * Shows/hides the autoOpenFileTypesResetToDefault button and label, with 2036 * Shows/hides the autoOpenFileTypesResetToDefault button and label, with
2024 * animation. 2037 * animation.
2025 * @param {boolean} display Whether to show the button and label or not. 2038 * @param {boolean} display Whether to show the button and label or not.
2026 * @private 2039 * @private
2027 */ 2040 */
2028 setAutoOpenFileTypesDisplayed_: function(display) { 2041 setAutoOpenFileTypesDisplayed_: function(display) {
2029 if ($('advanced-settings').hidden) { 2042 if ($('advanced-settings').hidden) {
2030 // If the Advanced section is hidden, don't animate the transition. 2043 // If the Advanced section is hidden, don't animate the transition.
2031 $('auto-open-file-types-section').hidden = !display; 2044 $('auto-open-file-types-section').hidden = !display;
2032 } else { 2045 } else {
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
2412 'setNowSectionVisible', 2425 'setNowSectionVisible',
2413 'setProfilesInfo', 2426 'setProfilesInfo',
2414 'setSpokenFeedbackCheckboxState', 2427 'setSpokenFeedbackCheckboxState',
2415 'setSystemTimezoneAutomaticDetectionManaged', 2428 'setSystemTimezoneAutomaticDetectionManaged',
2416 'setSystemTimezoneManaged', 2429 'setSystemTimezoneManaged',
2417 'setThemesResetButtonEnabled', 2430 'setThemesResetButtonEnabled',
2418 'setVirtualKeyboardCheckboxState', 2431 'setVirtualKeyboardCheckboxState',
2419 'setWallpaperManaged', 2432 'setWallpaperManaged',
2420 'setupPageZoomSelector', 2433 'setupPageZoomSelector',
2421 'setupProxySettingsButton', 2434 'setupProxySettingsButton',
2435 'setupZoomScopeCheckbox',
2422 'showCreateProfileError', 2436 'showCreateProfileError',
2423 'showCreateProfileSuccess', 2437 'showCreateProfileSuccess',
2424 'showCreateProfileWarning', 2438 'showCreateProfileWarning',
2425 'showHotwordAlwaysOnSection', 2439 'showHotwordAlwaysOnSection',
2426 'showHotwordNoDspSection', 2440 'showHotwordNoDspSection',
2427 'showHotwordSection', 2441 'showHotwordSection',
2428 'showMouseControls', 2442 'showMouseControls',
2429 'showSupervisedUserImportError', 2443 'showSupervisedUserImportError',
2430 'showSupervisedUserImportSuccess', 2444 'showSupervisedUserImportSuccess',
2431 'showTouchpadControls', 2445 'showTouchpadControls',
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
2471 2485
2472 settings.hidden = !isVisible; 2486 settings.hidden = !isVisible;
2473 }; 2487 };
2474 } 2488 }
2475 2489
2476 // Export 2490 // Export
2477 return { 2491 return {
2478 BrowserOptions: BrowserOptions 2492 BrowserOptions: BrowserOptions
2479 }; 2493 };
2480 }); 2494 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698