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

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

Issue 6155008: DOMUI: Implement the new Fonts and Encoding page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fix 3. Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 6
7 ///////////////////////////////////////////////////////////////////////////// 7 /////////////////////////////////////////////////////////////////////////////
8 // MinimumFontSizeSelect class: 8 // MinimumFontSizeSelect class:
9 9
10 // Define a constructor that uses a select element as its underlying element. 10 // Define a constructor that uses a select element as its underlying element.
11 var MinimumFontSizeSelect = cr.ui.define('select'); 11 var MinimumFontSizeSelect = cr.ui.define('select');
12 12
13 MinimumFontSizeSelect.prototype = { 13 MinimumFontSizeSelect.prototype = {
14 // Set up the prototype chain
15 __proto__: HTMLSelectElement.prototype, 14 __proto__: HTMLSelectElement.prototype,
16 15
17 /** 16 /** @inheritDoc */
18 * Initialization function for the cr.ui framework.
19 */
20 decorate: function() { 17 decorate: function() {
21 var self = this; 18 var self = this;
22 19
23 // Listen to pref changes. 20 // Listen to pref changes.
24 Preferences.getInstance().addEventListener( 21 Preferences.getInstance().addEventListener(
25 'webkit.webprefs.minimum_font_size', function(event) { 22 'webkit.webprefs.minimum_font_size', function(event) {
26 var value = (event.value && event.value['value'] != undefined) 23 var value = (event.value && event.value['value'] != undefined)
27 ? event.value['value'] : event.value; 24 ? event.value['value'] : event.value;
28 self.managed = (event.value && event.value['managed'] != undefined) 25 self.managed = (event.value && event.value['managed'] != undefined)
29 ? event.value['managed'] : false; 26 ? event.value['managed'] : false;
(...skipping 30 matching lines...) Expand all
60 }, 57 },
61 }; 58 };
62 59
63 // Export 60 // Export
64 return { 61 return {
65 MinimumFontSizeSelect: MinimumFontSizeSelect 62 MinimumFontSizeSelect: MinimumFontSizeSelect
66 }; 63 };
67 64
68 }); 65 });
69 66
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/font_settings.js ('k') | chrome/browser/resources/options/options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698