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

Side by Side Diff: chrome/browser/resources/options/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: Fixed PrefCheckbox. Created 8 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/resources/options/chromeos/network_list.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 359
360 // Web Content section. 360 // Web Content section.
361 $('fontSettingsCustomizeFontsButton').onclick = function(event) { 361 $('fontSettingsCustomizeFontsButton').onclick = function(event) {
362 OptionsPage.navigateToPage('fonts'); 362 OptionsPage.navigateToPage('fonts');
363 chrome.send('coreOptionsUserMetricsAction', ['Options_FontSettings']); 363 chrome.send('coreOptionsUserMetricsAction', ['Options_FontSettings']);
364 }; 364 };
365 $('defaultFontSize').onchange = function(event) { 365 $('defaultFontSize').onchange = function(event) {
366 var value = event.target.options[event.target.selectedIndex].value; 366 var value = event.target.options[event.target.selectedIndex].value;
367 Preferences.setIntegerPref( 367 Preferences.setIntegerPref(
368 'webkit.webprefs.default_fixed_font_size', 368 'webkit.webprefs.default_fixed_font_size',
369 value - OptionsPage.SIZE_DIFFERENCE_FIXED_STANDARD, ''); 369 value - OptionsPage.SIZE_DIFFERENCE_FIXED_STANDARD, true);
370 chrome.send('defaultFontSizeAction', [String(value)]); 370 chrome.send('defaultFontSizeAction', [String(value)]);
371 }; 371 };
372 $('defaultZoomFactor').onchange = function(event) { 372 $('defaultZoomFactor').onchange = function(event) {
373 chrome.send('defaultZoomFactorAction', 373 chrome.send('defaultZoomFactorAction',
374 [String(event.target.options[event.target.selectedIndex].value)]); 374 [String(event.target.options[event.target.selectedIndex].value)]);
375 }; 375 };
376 376
377 // Languages section. 377 // Languages section.
378 $('language-button').onclick = function(event) { 378 $('language-button').onclick = function(event) {
379 OptionsPage.navigateToPage('languages'); 379 OptionsPage.navigateToPage('languages');
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 BrowserOptions.getLoggedInUsername = function() { 1353 BrowserOptions.getLoggedInUsername = function() {
1354 return BrowserOptions.getInstance().username_; 1354 return BrowserOptions.getInstance().username_;
1355 }; 1355 };
1356 } 1356 }
1357 1357
1358 // Export 1358 // Export
1359 return { 1359 return {
1360 BrowserOptions: BrowserOptions 1360 BrowserOptions: BrowserOptions
1361 }; 1361 };
1362 }); 1362 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/options/chromeos/network_list.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698