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

Unified Diff: third_party/WebKit/Source/devtools/front_end/profiler/TargetsComboBoxController.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 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 1942cbd80fcd152da0859284d4bcc68619f73f49..c703eacbd3ba549813163c4bd56a1b6338e52204 100644
--- a/third_party/WebKit/Source/devtools/front_end/profiler/TargetsComboBoxController.js
+++ b/third_party/WebKit/Source/devtools/front_end/profiler/TargetsComboBoxController.js
@@ -18,7 +18,7 @@ WebInspector.TargetsComboBoxController = function(selectElement, elementToHide)
this._targetToOption = new Map();
WebInspector.context.addFlavorChangeListener(WebInspector.Target, this._targetChangedExternally, this);
- WebInspector.targetManager.observeTargets(this);
+ WebInspector.targetManager.observeTargets(this, WebInspector.Target.Capability.JS);
}
WebInspector.TargetsComboBoxController.prototype = {
@@ -29,8 +29,6 @@ WebInspector.TargetsComboBoxController.prototype = {
*/
targetAdded: function(target)
{
- if (!target.hasJSContext())
- return;
var option = this._selectElement.createChild("option");
option.text = target.name();
option.__target = target;
@@ -47,8 +45,6 @@ WebInspector.TargetsComboBoxController.prototype = {
*/
targetRemoved: function(target)
{
- if (!target.hasJSContext())
- return;
var option = this._targetToOption.remove(target);
this._selectElement.removeChild(option);
this._updateVisibility();

Powered by Google App Engine
This is Rietveld 408576698