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

Unified Diff: third_party/WebKit/Source/devtools/front_end/profiler/TargetsComboBoxController.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/profiler/TargetsComboBoxController.js
diff --git a/third_party/WebKit/Source/devtools/front_end/profiler/TargetsComboBoxController.js b/third_party/WebKit/Source/devtools/front_end/profiler/TargetsComboBoxController.js
index c703eacbd3ba549813163c4bd56a1b6338e52204..72bab20ee3194c8f55d45a6d814498cdf236f93f 100644
--- a/third_party/WebKit/Source/devtools/front_end/profiler/TargetsComboBoxController.js
+++ b/third_party/WebKit/Source/devtools/front_end/profiler/TargetsComboBoxController.js
@@ -18,6 +18,7 @@ WebInspector.TargetsComboBoxController = function(selectElement, elementToHide)
this._targetToOption = new Map();
WebInspector.context.addFlavorChangeListener(WebInspector.Target, this._targetChangedExternally, this);
+ WebInspector.targetManager.addEventListener(WebInspector.TargetManager.Events.NameChanged, this._targetNameChanged, this);
WebInspector.targetManager.observeTargets(this, WebInspector.Target.Capability.JS);
}
@@ -50,6 +51,16 @@ WebInspector.TargetsComboBoxController.prototype = {
this._updateVisibility();
},
+ /**
+ * @param {!WebInspector.Event} event
+ */
+ _targetNameChanged: function(event)
+ {
+ var target = /** @type {!WebInspector.Target} */ (event.data);
+ var option = this._targetToOption.get(target);
+ option.text = target.name();
+ },
+
_onComboBoxSelectionChange: function()
{
var selectedOption = this._selectElement[this._selectElement.selectedIndex];

Powered by Google App Engine
This is Rietveld 408576698