| 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 52b892ca54e6b606ad4a24676606f5cbc61c947d..1e354875d6daa93acc3acfc15f83fe63366aa56d 100644
|
| --- a/Source/devtools/front_end/sdk/Target.js
|
| +++ b/Source/devtools/front_end/sdk/Target.js
|
| @@ -257,17 +257,35 @@ WebInspector.TargetManager.prototype = {
|
| */
|
| function callbackWrapper(newTarget)
|
| {
|
| - this._targets.push(newTarget);
|
| - var copy = this._observers;
|
| - for (var i = 0; i < copy.length; ++i)
|
| - copy[i].targetAdded(newTarget);
|
| -
|
| + this.addTarget(newTarget);
|
| if (callback)
|
| callback(newTarget);
|
| }
|
| },
|
|
|
| /**
|
| + * @param {!WebInspector.Target} newTarget
|
| + */
|
| + addTarget: function(newTarget)
|
| + {
|
| + this._targets.push(newTarget);
|
| + var copy = this._observers;
|
| + for (var i = 0; i < copy.length; ++i)
|
| + copy[i].targetAdded(newTarget);
|
| + },
|
| +
|
| + /**
|
| + * @param {!WebInspector.Target} target
|
| + */
|
| + removeTarget: function(target)
|
| + {
|
| + this._targets.remove(target);
|
| + var copy = this._observers;
|
| + for (var i = 0; i < copy.length; ++i)
|
| + copy[i].targetRemoved(target);
|
| + },
|
| +
|
| + /**
|
| * @return {!Array.<!WebInspector.Target>}
|
| */
|
| targets: function()
|
|
|