Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/layers/LayerTreeModel.js

Issue 2851913002: [DevTools] Do not expose agents on Target
Patch Set: storage and tests.js Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 /** 31 /**
32 * @unrestricted 32 * @unrestricted
33 */ 33 */
34 Layers.LayerTreeModel = class extends SDK.SDKModel { 34 Layers.LayerTreeModel = class extends SDK.SDKModel {
35 constructor(target) { 35 /**
36 super(target); 36 * @param {!SDK.Target} target
37 this._layerTreeAgent = target.layerTreeAgent(); 37 * @param {!Protocol.Dispatcher} dispatcher
38 target.registerLayerTreeDispatcher(new Layers.LayerTreeDispatcher(this)); 38 */
39 constructor(target, dispatcher) {
40 super(target, dispatcher);
41 this._layerTreeAgent = dispatcher.layerTreeAgent();
42 dispatcher.registerLayerTreeDispatcher(new Layers.LayerTreeDispatcher(this)) ;
39 this._paintProfilerModel = /** @type {!SDK.PaintProfilerModel} */ (target.mo del(SDK.PaintProfilerModel)); 43 this._paintProfilerModel = /** @type {!SDK.PaintProfilerModel} */ (target.mo del(SDK.PaintProfilerModel));
40 var resourceTreeModel = target.model(SDK.ResourceTreeModel); 44 var resourceTreeModel = target.model(SDK.ResourceTreeModel);
41 if (resourceTreeModel) { 45 if (resourceTreeModel) {
42 resourceTreeModel.addEventListener( 46 resourceTreeModel.addEventListener(
43 SDK.ResourceTreeModel.Events.MainFrameNavigated, this._onMainFrameNavi gated, this); 47 SDK.ResourceTreeModel.Events.MainFrameNavigated, this._onMainFrameNavi gated, this);
44 } 48 }
45 /** @type {?SDK.LayerTreeBase} */ 49 /** @type {?SDK.LayerTreeBase} */
46 this._layerTree = null; 50 this._layerTree = null;
47 } 51 }
48 52
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 554
551 /** 555 /**
552 * @override 556 * @override
553 * @param {!Protocol.LayerTree.LayerId} layerId 557 * @param {!Protocol.LayerTree.LayerId} layerId
554 * @param {!Protocol.DOM.Rect} clipRect 558 * @param {!Protocol.DOM.Rect} clipRect
555 */ 559 */
556 layerPainted(layerId, clipRect) { 560 layerPainted(layerId, clipRect) {
557 this._layerTreeModel._layerPainted(layerId, clipRect); 561 this._layerTreeModel._layerPainted(layerId, clipRect);
558 } 562 }
559 }; 563 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698