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

Side by Side Diff: chrome/browser/resources/settings/appearance_page/appearance_fonts_page.js

Issue 2818163002: MD Settings: Move various non-Polymer properties outside of "properties". (Closed)
Patch Set: fix tests Created 3 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/resources/settings/people_page/change_picture.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 (function() { 5 (function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * This is the absolute difference maintained between standard and 9 * This is the absolute difference maintained between standard and
10 * fixed-width font sizes. http://crbug.com/91922. 10 * fixed-width font sizes. http://crbug.com/91922.
(...skipping 21 matching lines...) Expand all
32 * <settings-appearance-fonts-page prefs="{{prefs}}"> 32 * <settings-appearance-fonts-page prefs="{{prefs}}">
33 * </settings-appearance-fonts-page> 33 * </settings-appearance-fonts-page>
34 */ 34 */
35 Polymer({ 35 Polymer({
36 is: 'settings-appearance-fonts-page', 36 is: 'settings-appearance-fonts-page',
37 37
38 behaviors: [I18nBehavior, WebUIListenerBehavior], 38 behaviors: [I18nBehavior, WebUIListenerBehavior],
39 39
40 properties: { 40 properties: {
41 /** @private */ 41 /** @private */
42 advancedExtensionInstalled_: Boolean,
43
44 /** @private */
45 advancedExtensionSublabel_: String, 42 advancedExtensionSublabel_: String,
46 43
47 /** @private */
48 advancedExtensionUrl_: String,
49
50 /** @private {!DropdownMenuOptionList} */ 44 /** @private {!DropdownMenuOptionList} */
51 fontOptions_: Object, 45 fontOptions_: Object,
52 46
53 /** @private */ 47 /** @private */
54 isGuest_: { 48 isGuest_: {
55 type: Boolean, 49 type: Boolean,
56 value: function() { return loadTimeData.getBoolean('isGuest'); } 50 value: function() { return loadTimeData.getBoolean('isGuest'); }
57 }, 51 },
58 52
59 /** 53 /**
(...skipping 18 matching lines...) Expand all
78 72
79 /** 73 /**
80 * Preferences state. 74 * Preferences state.
81 */ 75 */
82 prefs: { 76 prefs: {
83 type: Object, 77 type: Object,
84 notify: true, 78 notify: true,
85 }, 79 },
86 }, 80 },
87 81
82 /** @private {?settings.FontsBrowserProxy} */
83 browserProxy_: null,
84
85 /** @private {boolean} */
86 advancedExtensionInstalled_: false,
87
88 /** @private {?string} */
89 advancedExtensionUrl_: null,
90
88 observers: [ 91 observers: [
89 'fontSizeChanged_(prefs.webkit.webprefs.default_font_size.value)', 92 'fontSizeChanged_(prefs.webkit.webprefs.default_font_size.value)',
90 ], 93 ],
91 94
92 /** @private {?settings.FontsBrowserProxy} */
93 browserProxy_: null,
94
95 /** @override */ 95 /** @override */
96 created: function() { 96 created: function() {
97 this.browserProxy_ = settings.FontsBrowserProxyImpl.getInstance(); 97 this.browserProxy_ = settings.FontsBrowserProxyImpl.getInstance();
98 }, 98 },
99 99
100 /** @override */ 100 /** @override */
101 ready: function() { 101 ready: function() {
102 this.addWebUIListener('advanced-font-settings-installed', 102 this.addWebUIListener('advanced-font-settings-installed',
103 this.setAdvancedExtensionInstalled_.bind(this)); 103 this.setAdvancedExtensionInstalled_.bind(this));
104 this.browserProxy_.observeAdvancedFontExtensionAvailable(); 104 this.browserProxy_.observeAdvancedFontExtensionAvailable();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 * Get the minimum font size, accounting for unset prefs. 159 * Get the minimum font size, accounting for unset prefs.
160 * @return {?} 160 * @return {?}
161 * @private 161 * @private
162 */ 162 */
163 computeMinimumFontSize_: function() { 163 computeMinimumFontSize_: function() {
164 return this.get('prefs.webkit.webprefs.minimum_font_size.value') || 164 return this.get('prefs.webkit.webprefs.minimum_font_size.value') ||
165 MINIMUM_FONT_SIZE_RANGE_[0]; 165 MINIMUM_FONT_SIZE_RANGE_[0];
166 }, 166 },
167 }); 167 });
168 })(); 168 })();
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/settings/people_page/change_picture.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698