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

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

Issue 2186753002: [DevTools] Track URL through the target (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/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..b06f3162169d6904f4766388e30623579d4a791e 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()
+ {
+ 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, inspectedURL);
+ },
+
__proto__: Protocol.Agents.prototype
}

Powered by Google App Engine
This is Rietveld 408576698