| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 })(); |
| OLD | NEW |