| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 * @constructor | 6 * @constructor |
| 7 * @extends {WebInspector.Object} | 7 * @extends {WebInspector.Object} |
| 8 * @param {!Window} window |
| 8 * @param {!InspectorFrontendHostAPI} frontendHost | 9 * @param {!InspectorFrontendHostAPI} frontendHost |
| 9 */ | 10 */ |
| 10 WebInspector.ZoomManager = function(frontendHost) | 11 WebInspector.ZoomManager = function(window, frontendHost) |
| 11 { | 12 { |
| 12 this._frontendHost = frontendHost; | 13 this._frontendHost = frontendHost; |
| 13 this._zoomFactor = this._frontendHost.zoomFactor(); | 14 this._zoomFactor = this._frontendHost.zoomFactor(); |
| 14 window.addEventListener("resize", this._onWindowResize.bind(this), true); | 15 window.addEventListener("resize", this._onWindowResize.bind(this), true); |
| 15 }; | 16 }; |
| 16 | 17 |
| 17 WebInspector.ZoomManager.Events = { | 18 WebInspector.ZoomManager.Events = { |
| 18 ZoomChanged: "ZoomChanged" | 19 ZoomChanged: "ZoomChanged" |
| 19 }; | 20 }; |
| 20 | 21 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 35 this.dispatchEventToListeners(WebInspector.ZoomManager.Events.ZoomCh
anged, {from: oldZoomFactor, to: this._zoomFactor}); | 36 this.dispatchEventToListeners(WebInspector.ZoomManager.Events.ZoomCh
anged, {from: oldZoomFactor, to: this._zoomFactor}); |
| 36 }, | 37 }, |
| 37 | 38 |
| 38 __proto__: WebInspector.Object.prototype | 39 __proto__: WebInspector.Object.prototype |
| 39 }; | 40 }; |
| 40 | 41 |
| 41 /** | 42 /** |
| 42 * @type {!WebInspector.ZoomManager} | 43 * @type {!WebInspector.ZoomManager} |
| 43 */ | 44 */ |
| 44 WebInspector.zoomManager; | 45 WebInspector.zoomManager; |
| OLD | NEW |