OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 * @implements {Protocol.OverlayDispatcher} | 6 * @implements {Protocol.OverlayDispatcher} |
7 */ | 7 */ |
8 SDK.OverlayModel = class extends SDK.SDKModel { | 8 SDK.OverlayModel = class extends SDK.SDKModel { |
9 /** | 9 /** |
10 * @param {!SDK.Target} target | 10 * @param {!SDK.Target} target |
| 11 * @param {!Protocol.Dispatcher} dispatcher |
11 */ | 12 */ |
12 constructor(target) { | 13 constructor(target, dispatcher) { |
13 super(target); | 14 super(target, dispatcher); |
14 this._domModel = /** @type {!SDK.DOMModel} */ (target.model(SDK.DOMModel)); | 15 this._domModel = /** @type {!SDK.DOMModel} */ (target.model(SDK.DOMModel)); |
15 | 16 |
16 target.registerOverlayDispatcher(this); | 17 dispatcher.registerOverlayDispatcher(this); |
17 this._overlayAgent = target.overlayAgent(); | 18 this._overlayAgent = dispatcher.overlayAgent(); |
18 this._overlayAgent.enable(); | 19 this._overlayAgent.enable(); |
19 this._overlayAgent.setShowViewportSizeOnResize(true); | 20 this._overlayAgent.setShowViewportSizeOnResize(true); |
20 | 21 |
21 this._debuggerModel = target.model(SDK.DebuggerModel); | 22 this._debuggerModel = target.model(SDK.DebuggerModel); |
22 if (this._debuggerModel) { | 23 if (this._debuggerModel) { |
23 Common.moduleSetting('disablePausedStateOverlay').addChangeListener(this._
updatePausedInDebuggerMessage, this); | 24 Common.moduleSetting('disablePausedStateOverlay').addChangeListener(this._
updatePausedInDebuggerMessage, this); |
24 this._debuggerModel.addEventListener( | 25 this._debuggerModel.addEventListener( |
25 SDK.DebuggerModel.Events.DebuggerPaused, this._updatePausedInDebuggerM
essage, this); | 26 SDK.DebuggerModel.Events.DebuggerPaused, this._updatePausedInDebuggerM
essage, this); |
26 this._debuggerModel.addEventListener( | 27 this._debuggerModel.addEventListener( |
27 SDK.DebuggerModel.Events.DebuggerResumed, this._updatePausedInDebugger
Message, this); | 28 SDK.DebuggerModel.Events.DebuggerResumed, this._updatePausedInDebugger
Message, this); |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 /** | 312 /** |
312 * @override | 313 * @override |
313 * @param {!Protocol.Page.FrameId} frameId | 314 * @param {!Protocol.Page.FrameId} frameId |
314 */ | 315 */ |
315 highlightFrame(frameId) { | 316 highlightFrame(frameId) { |
316 this._model._overlayAgent.highlightFrame( | 317 this._model._overlayAgent.highlightFrame( |
317 frameId, Common.Color.PageHighlight.Content.toProtocolRGBA(), | 318 frameId, Common.Color.PageHighlight.Content.toProtocolRGBA(), |
318 Common.Color.PageHighlight.ContentOutline.toProtocolRGBA()); | 319 Common.Color.PageHighlight.ContentOutline.toProtocolRGBA()); |
319 } | 320 } |
320 }; | 321 }; |
OLD | NEW |