summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authortommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-09 19:48:37 +0000
committertommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-09 19:48:37 +0000
commit2879092e01ea4ebb93c1b80925c81e059b24607b (patch)
tree53638b170c3c9c3146d13238d1ed20993cdb4257 /chrome/common
parent12a6f036f3859f88b439dba009172f5c1dd03dc9 (diff)
downloadchromium_src-2879092e01ea4ebb93c1b80925c81e059b24607b.zip
chromium_src-2879092e01ea4ebb93c1b80925c81e059b24607b.tar.gz
chromium_src-2879092e01ea4ebb93c1b80925c81e059b24607b.tar.bz2
Changing ForwardMessageToExternalHost to postMessage and passing a proper
MessageEvent object to the onmessage handler. Also adding support for origin and target parameters. The origin parameter is implicit but target can be specified when calling postMessage. If no target is specified we default to "*". At the moment I'm only allowing target == "*" messages to pass through since I haven't implemented support for matching more complicated patterns :) Review URL: http://codereview.chromium.org/40128 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11275 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/render_messages_internal.h12
-rw-r--r--chrome/common/temp_scaffolding_stubs.cc3
2 files changed, 10 insertions, 5 deletions
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index e0fd20c..80b78e1 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -457,8 +457,10 @@ IPC_BEGIN_MESSAGES(View)
std::string /* event arguments */)
#endif
// Posts a message to the renderer.
- IPC_MESSAGE_ROUTED1(ViewMsg_HandleMessageFromExternalHost,
- std::string /* The message */)
+ IPC_MESSAGE_ROUTED3(ViewMsg_HandleMessageFromExternalHost,
+ std::string /* The message */,
+ std::string /* The origin */,
+ std::string /* The target*/)
// Sent to the renderer when a popup window should no longer count against
// the current popup count (either because it's not a popup or because it was
@@ -807,8 +809,10 @@ IPC_BEGIN_MESSAGES(ViewHost)
std::string /* args (as a JSON string) */)
// A message for an external host.
- IPC_MESSAGE_ROUTED1(ViewHostMsg_ForwardMessageToExternalHost,
- std::string /* message */)
+ IPC_MESSAGE_ROUTED3(ViewHostMsg_ForwardMessageToExternalHost,
+ std::string /* message */,
+ std::string /* origin */,
+ std::string /* target */)
#ifdef CHROME_PERSONALIZATION
IPC_MESSAGE_ROUTED2(ViewHostMsg_PersonalizationEvent,
diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc
index 969c615..3dd9cef 100644
--- a/chrome/common/temp_scaffolding_stubs.cc
+++ b/chrome/common/temp_scaffolding_stubs.cc
@@ -161,7 +161,8 @@ void AutomationProvider::AutocompleteEditIsQueryInProgress(
}
void AutomationProvider::OnMessageFromExternalHost(
- int handle, const std::string& message) {
+ int handle, const std::string& message, const std::string& origin,
+ const std::string& target) {
NOTIMPLEMENTED();
}