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

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

Issue 2383743003: [DevTools] Auto-attach to cross-process subframes under experiment. (Closed)
Patch Set: some ui Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js b/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js
index 99b953db3e7d289337ae2dd297446968b48e538f..75602ea2da5a3f4127eb3f84fe0181d6cb7f40db 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/NavigatorView.js
@@ -62,6 +62,7 @@ WebInspector.NavigatorView = function()
WebInspector.targetManager.addModelListener(WebInspector.ResourceTreeModel, WebInspector.ResourceTreeModel.Events.FrameDetached, this._frameDetached, this);
WebInspector.persistence.addEventListener(WebInspector.Persistence.Events.BindingCreated, this._onBindingChanged, this);
WebInspector.persistence.addEventListener(WebInspector.Persistence.Events.BindingRemoved, this._onBindingChanged, this);
+ WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Events.NameChanged, this._targetNameChanged, this);
WebInspector.targetManager.observeTargets(this);
this._resetWorkspace(WebInspector.workspace);
@@ -814,6 +815,17 @@ WebInspector.NavigatorView.prototype = {
this._rootNode.removeChild(targetNode);
},
+ /**
+ * @param {!WebInspector.Event} event
+ */
+ _targetNameChanged: function(event)
+ {
+ var target = /** @type {!WebInspector.Target} */ (event.data);
+ var targetNode = this._rootNode.child("target:" + target.id());
+ if (targetNode)
+ targetNode.setTitle(target.name());
+ },
+
__proto__: WebInspector.VBox.prototype
}
@@ -1110,6 +1122,14 @@ WebInspector.NavigatorTreeNode.prototype = {
{
},
+ /**
+ * @param {string} title
+ */
+ setTitle: function(title)
+ {
+ throw "Not implemented";
+ },
+
populate: function()
{
if (this.isPopulated())
@@ -1638,5 +1658,16 @@ WebInspector.NavigatorGroupTreeNode.prototype = {
this._treeElement.collapse();
},
+ /**
+ * @param {string} title
+ * @override
+ */
+ setTitle: function(title)
+ {
+ this._title = title;
+ if (this._treeElement)
+ this._treeElement.title = this._title;
+ },
+
__proto__: WebInspector.NavigatorTreeNode.prototype
}

Powered by Google App Engine
This is Rietveld 408576698