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

Unified Diff: chrome/browser/resources/options/advanced_options.js

Issue 8528011: Page zoom improvements (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Minor cleanups Created 9 years, 1 month 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/advanced_options.js
===================================================================
--- chrome/browser/resources/options/advanced_options.js (revision 109526)
+++ chrome/browser/resources/options/advanced_options.js (working copy)
@@ -63,6 +63,11 @@
chrome.send('defaultFontSizeAction',
[String(event.target.options[event.target.selectedIndex].value)]);
};
+ $('defaultZoomFactor').onchange = function(event) {
+ chrome.send('defaultZoomFactorAction',
+ [String(event.target.options[event.target.selectedIndex].value)]);
+ };
+
$('language-button').onclick = function(event) {
OptionsPage.navigateToPage('languages');
chrome.send('coreOptionsUserMetricsAction',
@@ -171,6 +176,22 @@
$('Custom').selected = true;
};
+ AdvancedOptions.SetupPageZoomSelector = function(items) {
James Hawkins 2011/11/15 18:35:51 Document the method and |items|.
csilv 2011/11/19 00:17:45 Done.
+ var element = $('defaultZoomFactor');
+
+ // Remove any existing content.
+ element.textContent = '';
+
+ // Insert new child nodes into select element.
+ var value, title, selected;
+ for (var i = 0; i < items.length; i++) {
+ title = items[i][0];
+ value = items[i][1];
+ selected = items[i][2];
+ element.appendChild(new Option(title, value, false, selected));
+ }
+ };
+
// Set the enabled state for the autoOpenFileTypesResetToDefault button.
AdvancedOptions.SetAutoOpenFileTypesDisabledAttribute = function(disabled) {
if (!cr.isChromeOS) {

Powered by Google App Engine
This is Rietveld 408576698