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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js

Issue 2137773002: [DevTools] Replace the target type with capabilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 * @param {!WebInspector.Target} target 392 * @param {!WebInspector.Target} target
393 * @return {!WebInspector.NavigatorTreeNode} 393 * @return {!WebInspector.NavigatorTreeNode}
394 */ 394 */
395 _targetNode: function(project, target) 395 _targetNode: function(project, target)
396 { 396 {
397 if (target === WebInspector.targetManager.mainTarget()) 397 if (target === WebInspector.targetManager.mainTarget())
398 return this._rootNode; 398 return this._rootNode;
399 399
400 var targetNode = this._rootNode.child("target:" + target.id()); 400 var targetNode = this._rootNode.child("target:" + target.id());
401 if (!targetNode) { 401 if (!targetNode) {
402 targetNode = new WebInspector.NavigatorGroupTreeNode(this, project, "target:" + target.id(), target.isWorker() ? WebInspector.NavigatorView.Types.Wo rker : WebInspector.NavigatorView.Types.NetworkFolder, target.name()); 402 targetNode = new WebInspector.NavigatorGroupTreeNode(this, project, "target:" + target.id(), !target.hasBrowserCapability() ? WebInspector.Navigator View.Types.Worker : WebInspector.NavigatorView.Types.NetworkFolder, target.name( ));
403 this._rootNode.appendChild(targetNode); 403 this._rootNode.appendChild(targetNode);
404 } 404 }
405 return targetNode; 405 return targetNode;
406 }, 406 },
407 407
408 /** 408 /**
409 * @param {!WebInspector.Target} target 409 * @param {!WebInspector.Target} target
410 * @param {string} projectOrigin 410 * @param {string} projectOrigin
411 * @return {string} 411 * @return {string}
412 */ 412 */
(...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after
1564 { 1564 {
1565 if (this._treeElement) 1565 if (this._treeElement)
1566 return this._treeElement; 1566 return this._treeElement;
1567 this._treeElement = new WebInspector.NavigatorFolderTreeElement(this._na vigatorView, this._type, this._title, this._hoverCallback); 1567 this._treeElement = new WebInspector.NavigatorFolderTreeElement(this._na vigatorView, this._type, this._title, this._hoverCallback);
1568 this._treeElement.setNode(this); 1568 this._treeElement.setNode(this);
1569 return this._treeElement; 1569 return this._treeElement;
1570 }, 1570 },
1571 1571
1572 __proto__: WebInspector.NavigatorTreeNode.prototype 1572 __proto__: WebInspector.NavigatorTreeNode.prototype
1573 } 1573 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698