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

Unified Diff: Source/devtools/front_end/extensions/ExtensionAPI.js

Issue 712403002: [DevTools] Move extension embedder message to InspectorFrontentAPI. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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: Source/devtools/front_end/extensions/ExtensionAPI.js
diff --git a/Source/devtools/front_end/extensions/ExtensionAPI.js b/Source/devtools/front_end/extensions/ExtensionAPI.js
index 40edba7df78d0700122801d50ab1742fcdf1a865..93456c90737e7b34278a044407d8d8e01f24ca0e 100644
--- a/Source/devtools/front_end/extensions/ExtensionAPI.js
+++ b/Source/devtools/front_end/extensions/ExtensionAPI.js
@@ -1023,26 +1023,28 @@ function platformExtensionAPI(coreAPI)
/**
* @param {!ExtensionDescriptor} extensionInfo
+ * @param {string} inspectedTabId
* @return {string}
*/
-function buildPlatformExtensionAPI(extensionInfo)
+function buildPlatformExtensionAPI(extensionInfo, inspectedTabId)
{
return "var extensionInfo = " + JSON.stringify(extensionInfo) + ";" +
- "var tabId = " + WebInspector._inspectedTabId + ";" +
+ "var tabId = " + inspectedTabId + ";" +
platformExtensionAPI.toString();
}
/**
* @param {!ExtensionDescriptor} extensionInfo
+ * @param {string} inspectedTabId
* @return {string}
*/
-function buildExtensionAPIInjectedScript(extensionInfo)
+function buildExtensionAPIInjectedScript(extensionInfo, inspectedTabId)
{
return "(function(injectedScriptId){ " +
"var extensionServer;" +
defineCommonExtensionSymbols.toString() + ";" +
injectedExtensionAPI.toString() + ";" +
- buildPlatformExtensionAPI(extensionInfo) + ";" +
+ buildPlatformExtensionAPI(extensionInfo, inspectedTabId) + ";" +
"platformExtensionAPI(injectedExtensionAPI(injectedScriptId));" +
"return {};" +
"})";
« no previous file with comments | « Source/devtools/front_end/devtools_app/DevToolsApp.js ('k') | Source/devtools/front_end/extensions/ExtensionServer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698