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 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * 'settings-ui' implements the UI for the Settings page. | 7 * 'settings-ui' implements the UI for the Settings page. |
8 * | 8 * |
9 * Example: | 9 * Example: |
10 * | 10 * |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 }, | 98 }, |
99 passwordsAndForms: false, | 99 passwordsAndForms: false, |
100 downloads: { | 100 downloads: { |
101 googleDrive: false, | 101 googleDrive: false, |
102 }, | 102 }, |
103 </if> | 103 </if> |
104 }; | 104 }; |
105 } | 105 } |
106 }, | 106 }, |
107 | 107 |
| 108 /** @override */ |
| 109 attached: function() { |
| 110 // Preload bold Roboto so it doesn't load and flicker the first time used. |
| 111 document.fonts.load('bold 12px Roboto'); |
| 112 }, |
| 113 |
108 /** | 114 /** |
109 * @param {Event} event | 115 * @param {Event} event |
110 * @private | 116 * @private |
111 */ | 117 */ |
112 onIronActivate_: function(event) { | 118 onIronActivate_: function(event) { |
113 if (event.detail.item.id != 'advancedPage') | 119 if (event.detail.item.id != 'advancedPage') |
114 this.$$('app-drawer').close(); | 120 this.$$('app-drawer').close(); |
115 }, | 121 }, |
116 | 122 |
117 /** @private */ | 123 /** @private */ |
118 onMenuButtonTap_: function() { | 124 onMenuButtonTap_: function() { |
119 this.$$('app-drawer').toggle(); | 125 this.$$('app-drawer').toggle(); |
120 }, | 126 }, |
121 | 127 |
122 /** @private */ | 128 /** @private */ |
123 directionDelegateChanged_: function() { | 129 directionDelegateChanged_: function() { |
124 this.$$('app-drawer').align = this.directionDelegate.isRtl() ? | 130 this.$$('app-drawer').align = this.directionDelegate.isRtl() ? |
125 'right' : 'left'; | 131 'right' : 'left'; |
126 }, | 132 }, |
127 }); | 133 }); |
OLD | NEW |