Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/sdk/Target.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/Target.js b/third_party/WebKit/Source/devtools/front_end/sdk/Target.js |
| index d36d8c10897c9cae966cd180361266fe84fe0c8b..97de81f6b3d0acf7e135e51c174510ee032412eb 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/Target.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/Target.js |
| @@ -18,6 +18,7 @@ WebInspector.Target = function(targetManager, name, capabilitiesMask, connection |
| Protocol.Agents.call(this, connection.agentsMap()); |
| this._targetManager = targetManager; |
| this._name = name; |
| + this._inspectedURL = ""; |
| this._capabilitiesMask = capabilitiesMask; |
| this._connection = connection; |
| this._parentTarget = parentTarget; |
| @@ -189,6 +190,33 @@ WebInspector.Target.prototype = { |
| return this._modelByConstructor.valuesArray(); |
| }, |
| + /** |
| + * @return {string} |
| + */ |
| + inspectedURL: function() |
| + { |
| + return this._inspectedURL; |
| + }, |
| + |
| + /** |
| + * @return {string} |
| + */ |
| + inspectedDomain: function() |
|
dgozman
2016/07/27 20:24:23
Maybe we should inline this at call sites?
eostroukhov-old
2016/07/27 21:39:46
Done.
|
| + { |
| + var parsedURL = this._inspectedURL ? this._inspectedURL.asParsedURL() : null; |
| + return parsedURL ? parsedURL.host : ""; |
| + }, |
| + |
| + /** |
| + * @param {string} inspectedURL |
| + */ |
| + setInspectedURL: function(inspectedURL) |
| + { |
| + this._inspectedURL = inspectedURL; |
| + InspectorFrontendHost.inspectedURLChanged(inspectedURL || ""); |
| + this._targetManager.dispatchEventToListeners(WebInspector.TargetManager.Events.InspectedURLChanged, this); |
| + }, |
| + |
| __proto__: Protocol.Agents.prototype |
| } |