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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/options/browser_options.js
diff --git a/chrome/browser/resources/options/browser_options.js b/chrome/browser/resources/options/browser_options.js
index 96283c3d8b4cd069c9555a1113b6eace1f524bb4..c256d7178ed2945f5de7c0b20f4a5979fbf74137 100644
--- a/chrome/browser/resources/options/browser_options.js
+++ b/chrome/browser/resources/options/browser_options.js
@@ -682,6 +682,10 @@ cr.define('options', function() {
chrome.send('defaultZoomFactorAction',
[String(event.target.options[event.target.selectedIndex].value)]);
};
+ $('defaultZoomScope').onchange = function(event) {
+ chrome.send('defaultZoomScopeAction',
+ [event.target.checked]);
+ };
$('safeBrowsingExtendedReportingCheckbox').onchange = function(event) {
chrome.send('safeBrowsingExtendedReportingAction',
[event.target.checked]);
@@ -2020,6 +2024,15 @@ cr.define('options', function() {
},
/**
+ * Set the checked state of the default zoom scope checkbox.
+ * @param {boolean} checked Whether to check the checkbox.
+ * @private
+ */
+ setupZoomScopeCheckbox_: function(checked) {
+ $('defaultZoomScope').checked = checked;
+ },
+
+ /**
* Shows/hides the autoOpenFileTypesResetToDefault button and label, with
* animation.
* @param {boolean} display Whether to show the button and label or not.
@@ -2419,6 +2432,7 @@ cr.define('options', function() {
'setWallpaperManaged',
'setupPageZoomSelector',
'setupProxySettingsButton',
+ 'setupZoomScopeCheckbox',
'showCreateProfileError',
'showCreateProfileSuccess',
'showCreateProfileWarning',

Powered by Google App Engine
This is Rietveld 408576698