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

Unified Diff: Source/devtools/front_end/sdk/Target.js

Issue 338283004: DevTools: Use TargetsToolbar instead of ThreadToolbar (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address vsevik's comments Created 6 years, 6 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
« no previous file with comments | « Source/devtools/front_end/main/Main.js ('k') | Source/devtools/front_end/sdk/WorkerTargetManager.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/Target.js
diff --git a/Source/devtools/front_end/sdk/Target.js b/Source/devtools/front_end/sdk/Target.js
index 1e354875d6daa93acc3acfc15f83fe63366aa56d..d257fda6d769c21590fc2db0432bff03a2c19c12 100644
--- a/Source/devtools/front_end/sdk/Target.js
+++ b/Source/devtools/front_end/sdk/Target.js
@@ -7,12 +7,14 @@
/**
* @constructor
* @extends {Protocol.Agents}
+ * @param {string} name
* @param {!InspectorBackendClass.Connection} connection
* @param {function(!WebInspector.Target)=} callback
*/
-WebInspector.Target = function(connection, callback)
+WebInspector.Target = function(name, connection, callback)
{
Protocol.Agents.call(this, connection.agentsMap());
+ this._name = name;
this._connection = connection;
/** @type {boolean} */
this.isMainFrontend = false;
@@ -47,6 +49,15 @@ WebInspector.Target.prototype = {
},
/**
+ *
+ * @return {string}
+ */
+ name: function()
+ {
+ return this._name;
+ },
+
+ /**
* @param {string} name
* @param {function()|null} callback
* @param {?Protocol.Error} error
@@ -244,12 +255,13 @@ WebInspector.TargetManager.prototype = {
},
/**
+ * @param {string} name
* @param {!InspectorBackendClass.Connection} connection
* @param {function(!WebInspector.Target)=} callback
*/
- createTarget: function(connection, callback)
+ createTarget: function(name, connection, callback)
{
- var target = new WebInspector.Target(connection, callbackWrapper.bind(this));
+ var target = new WebInspector.Target(name, connection, callbackWrapper.bind(this));
/**
* @this {WebInspector.TargetManager}
« no previous file with comments | « Source/devtools/front_end/main/Main.js ('k') | Source/devtools/front_end/sdk/WorkerTargetManager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698