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

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

Issue 10827141: Move handling of dialog preferences to Preferences class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix my rushed copy & paste :( Created 8 years, 4 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 cr.define('options', function() { 5 cr.define('options', function() {
6 var OptionsPage = options.OptionsPage; 6 var OptionsPage = options.OptionsPage;
7 var ArrayDataModel = cr.ui.ArrayDataModel; 7 var ArrayDataModel = cr.ui.ArrayDataModel;
8 var RepeatingButton = cr.ui.RepeatingButton; 8 var RepeatingButton = cr.ui.RepeatingButton;
9 9
10 // 10 //
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 358
359 // Web Content section. 359 // Web Content section.
360 $('fontSettingsCustomizeFontsButton').onclick = function(event) { 360 $('fontSettingsCustomizeFontsButton').onclick = function(event) {
361 OptionsPage.navigateToPage('fonts'); 361 OptionsPage.navigateToPage('fonts');
362 chrome.send('coreOptionsUserMetricsAction', ['Options_FontSettings']); 362 chrome.send('coreOptionsUserMetricsAction', ['Options_FontSettings']);
363 }; 363 };
364 $('defaultFontSize').onchange = function(event) { 364 $('defaultFontSize').onchange = function(event) {
365 var value = event.target.options[event.target.selectedIndex].value; 365 var value = event.target.options[event.target.selectedIndex].value;
366 Preferences.setIntegerPref( 366 Preferences.setIntegerPref(
367 'webkit.webprefs.default_fixed_font_size', 367 'webkit.webprefs.default_fixed_font_size',
368 value - OptionsPage.SIZE_DIFFERENCE_FIXED_STANDARD, ''); 368 value - OptionsPage.SIZE_DIFFERENCE_FIXED_STANDARD,
369 true);
James Hawkins 2012/08/02 20:33:32 Optional nit: Condense parameters to save a line,
bartfab (slow) 2012/08/31 14:14:30 Done.
369 chrome.send('defaultFontSizeAction', [String(value)]); 370 chrome.send('defaultFontSizeAction', [String(value)]);
370 }; 371 };
371 $('defaultZoomFactor').onchange = function(event) { 372 $('defaultZoomFactor').onchange = function(event) {
372 chrome.send('defaultZoomFactorAction', 373 chrome.send('defaultZoomFactorAction',
373 [String(event.target.options[event.target.selectedIndex].value)]); 374 [String(event.target.options[event.target.selectedIndex].value)]);
374 }; 375 };
375 376
376 // Languages section. 377 // Languages section.
377 $('language-button').onclick = function(event) { 378 $('language-button').onclick = function(event) {
378 OptionsPage.navigateToPage('languages'); 379 OptionsPage.navigateToPage('languages');
(...skipping 966 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 BrowserOptions.getLoggedInUsername = function() { 1346 BrowserOptions.getLoggedInUsername = function() {
1346 return BrowserOptions.getInstance().username_; 1347 return BrowserOptions.getInstance().username_;
1347 }; 1348 };
1348 } 1349 }
1349 1350
1350 // Export 1351 // Export
1351 return { 1352 return {
1352 BrowserOptions: BrowserOptions 1353 BrowserOptions: BrowserOptions
1353 }; 1354 };
1354 }); 1355 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698