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

Unified Diff: chrome/common/extensions/extension_messages.h

Issue 8540012: Enable extension APIs for content scripts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 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: chrome/common/extensions/extension_messages.h
diff --git a/chrome/common/extensions/extension_messages.h b/chrome/common/extensions/extension_messages.h
index f77916bfeb5c26cecc8676517a4aa5c442d90ca2..29732592bfb73cf938609cbbeef66b5575288dec 100644
--- a/chrome/common/extensions/extension_messages.h
+++ b/chrome/common/extensions/extension_messages.h
@@ -25,7 +25,15 @@ IPC_STRUCT_BEGIN(ExtensionHostMsg_Request_Params)
// List of message arguments.
IPC_STRUCT_MEMBER(ListValue, arguments)
- // URL of the frame request was sent from.
+ // Extension ID this request was sent from. This can be empty, in the case
+ // where we expose APIs to normal web pages using the extension function
+ // system.
+ IPC_STRUCT_MEMBER(std::string, extension_id)
+
+ // URL of the frame the request was sent from. This isn't necessarily an
+ // extension url. Extension requests can also originate from content scripts,
+ // in which case extension_id will indicate the ID of the associated
+ // extension. Or, they can origiante from hosted apps or normal web pages.
IPC_STRUCT_MEMBER(GURL, source_url)
// Unique request id to match requests and responses.
« no previous file with comments | « chrome/common/extensions/api/extension_api_unittest.cc ('k') | chrome/renderer/chrome_content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698