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} |