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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/LayerTreeBase.js

Issue 2782773002: [DevTools] Remove SDKModels' fromTarget methods (Closed)
Patch Set: addressed review comments Created 3 years, 8 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 /** @typedef {!{ 4 /** @typedef {!{
5 rect: !Protocol.DOM.Rect, 5 rect: !Protocol.DOM.Rect,
6 snapshot: !SDK.PaintProfilerSnapshot 6 snapshot: !SDK.PaintProfilerSnapshot
7 }} 7 }}
8 */ 8 */
9 SDK.SnapshotWithRect; 9 SDK.SnapshotWithRect;
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 139
140 /** 140 /**
141 * @unrestricted 141 * @unrestricted
142 */ 142 */
143 SDK.LayerTreeBase = class { 143 SDK.LayerTreeBase = class {
144 /** 144 /**
145 * @param {?SDK.Target} target 145 * @param {?SDK.Target} target
146 */ 146 */
147 constructor(target) { 147 constructor(target) {
148 this._target = target; 148 this._target = target;
149 this._domModel = target ? SDK.DOMModel.fromTarget(target) : null; 149 this._domModel = target ? target.model(SDK.DOMModel) : null;
150 this._layersById = {}; 150 this._layersById = {};
151 this._root = null; 151 this._root = null;
152 this._contentRoot = null; 152 this._contentRoot = null;
153 /** @type {!Map<number, ?SDK.DOMNode>} */ 153 /** @type {!Map<number, ?SDK.DOMNode>} */
154 this._backendNodeIdToNode = new Map(); 154 this._backendNodeIdToNode = new Map();
155 } 155 }
156 156
157 /** 157 /**
158 * @return {?SDK.Target} 158 * @return {?SDK.Target}
159 */ 159 */
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 } 260 }
261 261
262 /** 262 /**
263 * @param {number} id 263 * @param {number} id
264 * @return {?SDK.DOMNode} 264 * @return {?SDK.DOMNode}
265 */ 265 */
266 _nodeForId(id) { 266 _nodeForId(id) {
267 return this._domModel ? this._domModel.nodeForId(id) : null; 267 return this._domModel ? this._domModel.nodeForId(id) : null;
268 } 268 }
269 }; 269 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698