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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 10 *
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 } 246 }
247 247
248 /** 248 /**
249 * @param {!Workspace.UISourceCode} uiSourceCode 249 * @param {!Workspace.UISourceCode} uiSourceCode
250 * @return {?SDK.ResourceTreeFrame} 250 * @return {?SDK.ResourceTreeFrame}
251 */ 251 */
252 _uiSourceCodeFrame(uiSourceCode) { 252 _uiSourceCodeFrame(uiSourceCode) {
253 var frame = Bindings.NetworkProject.frameForProject(uiSourceCode.project()); 253 var frame = Bindings.NetworkProject.frameForProject(uiSourceCode.project());
254 if (!frame) { 254 if (!frame) {
255 var target = Bindings.NetworkProject.targetForProject(uiSourceCode.project ()); 255 var target = Bindings.NetworkProject.targetForProject(uiSourceCode.project ());
256 var resourceTreeModel = target && SDK.ResourceTreeModel.fromTarget(target) ; 256 var resourceTreeModel = target && target.model(SDK.ResourceTreeModel);
257 frame = resourceTreeModel && resourceTreeModel.mainFrame; 257 frame = resourceTreeModel && resourceTreeModel.mainFrame;
258 } 258 }
259 return frame; 259 return frame;
260 } 260 }
261 261
262 /** 262 /**
263 * @param {!Workspace.UISourceCode} uiSourceCode 263 * @param {!Workspace.UISourceCode} uiSourceCode
264 */ 264 */
265 _addUISourceCode(uiSourceCode) { 265 _addUISourceCode(uiSourceCode) {
266 if (!this.accept(uiSourceCode)) 266 if (!this.accept(uiSourceCode))
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 this._frameNodes.set(frame, frameNode); 433 this._frameNodes.set(frame, frameNode);
434 this._frameNode(project, target, frame.parentFrame).appendChild(frameNode); 434 this._frameNode(project, target, frame.parentFrame).appendChild(frameNode);
435 if (!frame.parentFrame) 435 if (!frame.parentFrame)
436 frameNode.treeNode()._boostOrder = true; 436 frameNode.treeNode()._boostOrder = true;
437 437
438 /** 438 /**
439 * @param {boolean} hovered 439 * @param {boolean} hovered
440 */ 440 */
441 function hoverCallback(hovered) { 441 function hoverCallback(hovered) {
442 if (hovered) { 442 if (hovered) {
443 var domModel = SDK.DOMModel.fromTarget(target); 443 var domModel = target.model(SDK.DOMModel);
444 if (domModel) 444 if (domModel)
445 domModel.highlightFrame(frame.id); 445 domModel.highlightFrame(frame.id);
446 } else { 446 } else {
447 SDK.DOMModel.hideDOMNodeHighlight(); 447 SDK.DOMModel.hideDOMNodeHighlight();
448 } 448 }
449 } 449 }
450 return frameNode; 450 return frameNode;
451 } 451 }
452 452
453 /** 453 /**
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1612 /** 1612 /**
1613 * @param {string} title 1613 * @param {string} title
1614 * @override 1614 * @override
1615 */ 1615 */
1616 setTitle(title) { 1616 setTitle(title) {
1617 this._title = title; 1617 this._title = title;
1618 if (this._treeElement) 1618 if (this._treeElement)
1619 this._treeElement.title = this._title; 1619 this._treeElement.title = this._title;
1620 } 1620 }
1621 }; 1621 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698