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 /** | 6 /** |
7 * This is the absolute difference maintained between standard and | 7 * This is the absolute difference maintained between standard and |
8 * fixed-width font sizes. http://crbug.com/91922. | 8 * fixed-width font sizes. http://crbug.com/91922. |
9 * @const @private {number} | 9 * @const @private {number} |
10 */ | 10 */ |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 ready: function() { | 137 ready: function() { |
138 this.$.defaultFontSize.menuOptions = this.fontSizeOptions_; | 138 this.$.defaultFontSize.menuOptions = this.fontSizeOptions_; |
139 // TODO(dschuyler): Look into adding a listener for the | 139 // TODO(dschuyler): Look into adding a listener for the |
140 // default zoom percent. | 140 // default zoom percent. |
141 this.browserProxy_.getDefaultZoom().then(function(zoom) { | 141 this.browserProxy_.getDefaultZoom().then(function(zoom) { |
142 this.defaultZoom_ = zoom; | 142 this.defaultZoom_ = zoom; |
143 }.bind(this)); | 143 }.bind(this)); |
144 }, | 144 }, |
145 | 145 |
146 /** | 146 /** |
| 147 * @param {boolean|undefined} visibility |
| 148 * @return {boolean} |
| 149 * @private |
| 150 */ |
| 151 showPage_: function(visibility) { |
| 152 return visibility !== false; |
| 153 }, |
| 154 |
| 155 /** |
147 * @param {number} zoom | 156 * @param {number} zoom |
148 * @return {number} A zoom easier read by users. | 157 * @return {number} A zoom easier read by users. |
149 * @private | 158 * @private |
150 */ | 159 */ |
151 formatZoom_: function(zoom) { | 160 formatZoom_: function(zoom) { |
152 return Math.round(zoom * 100); | 161 return Math.round(zoom * 100); |
153 }, | 162 }, |
154 | 163 |
155 /** | 164 /** |
156 * @param {boolean} showHomepage Whether to show home page. | 165 * @param {boolean} showHomepage Whether to show home page. |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 * @see content::ZoomValuesEqual(). | 315 * @see content::ZoomValuesEqual(). |
307 * @param {number} zoom1 | 316 * @param {number} zoom1 |
308 * @param {number} zoom2 | 317 * @param {number} zoom2 |
309 * @return {boolean} | 318 * @return {boolean} |
310 * @private | 319 * @private |
311 */ | 320 */ |
312 zoomValuesEqual_: function(zoom1, zoom2) { | 321 zoomValuesEqual_: function(zoom1, zoom2) { |
313 return Math.abs(zoom1 - zoom2) <= 0.001; | 322 return Math.abs(zoom1 - zoom2) <= 0.001; |
314 }, | 323 }, |
315 }); | 324 }); |
OLD | NEW |