summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorjoshia@google.com <joshia@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-21 20:34:45 +0000
committerjoshia@google.com <joshia@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-21 20:34:45 +0000
commit18cb257530f2a7b6a5d8ce74d3486c1784fcdbf0 (patch)
treedaa421607577ba79de24e9d9d8c62f60dff60a29 /chrome/test
parent8c026e7a5ab2077eb8381e7b79a78020624a5a64 (diff)
downloadchromium_src-18cb257530f2a7b6a5d8ce74d3486c1784fcdbf0.zip
chromium_src-18cb257530f2a7b6a5d8ce74d3486c1784fcdbf0.tar.gz
chromium_src-18cb257530f2a7b6a5d8ce74d3486c1784fcdbf0.tar.bz2
Code review changes. Incorporated all the suggestions from previous review.
One item not changed yet is to rename 'receiver' in ForwardMessageToExternalHost. The idea is to invoke receiver("message") at the other end. So for example if the args to ForwardMessageToExternalHost("hello", "world") then we will invoke a script hello("world") on the other side. 'receiver' doesn't really describe the first argument here so if there is a better suggestion, I would be happy to change it :) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1176 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/automation/automation_messages_internal.h6
-rw-r--r--chrome/test/automation/tab_proxy.cc10
-rw-r--r--chrome/test/automation/tab_proxy.h6
3 files changed, 12 insertions, 10 deletions
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h
index 9c029c4..d05f82e 100644
--- a/chrome/test/automation/automation_messages_internal.h
+++ b/chrome/test/automation/automation_messages_internal.h
@@ -737,8 +737,8 @@ IPC_BEGIN_MESSAGES(Automation, 0)
IPC_MESSAGE_ROUTED1(AutomationMsg_OpenFindInPageRequest,
int /* tab_handle */)
- // Posts a message to the chrome renderer.
- IPC_MESSAGE_ROUTED3(AutomationMsg_PostMessage,
+ // Posts a message from external host to chrome renderer.
+ IPC_MESSAGE_ROUTED3(AutomationMsg_HandleMessageFromExternalHost,
int /* automation handle */,
std::string /* target */,
std::string /* message */ )
@@ -746,7 +746,7 @@ IPC_BEGIN_MESSAGES(Automation, 0)
// A message for an external host.
// |receiver| can be a receiving script and |message| is any
// arbitrary string that makes sense to the receiver.
- IPC_MESSAGE_ROUTED2(AutomationMsg_SendExternalHostMessage,
+ IPC_MESSAGE_ROUTED2(AutomationMsg_ForwardMessageToExternalHost,
std::string /* receiver*/,
std::string /* message*/)
diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc
index 6171ddb..7c82b5c 100644
--- a/chrome/test/automation/tab_proxy.cc
+++ b/chrome/test/automation/tab_proxy.cc
@@ -929,13 +929,15 @@ bool TabProxy::SavePage(const std::wstring& file_name,
return succeeded;
}
-void TabProxy::PostMessage(AutomationHandle handle,
- const std::string& target,
- const std::string& message) {
+void TabProxy::HandleMessageFromExternalHost(AutomationHandle handle,
+ const std::string& target,
+ const std::string& message) {
if (!is_valid())
return;
bool succeeded =
- sender_->Send(new AutomationMsg_PostMessage(0, handle, target, message));
+ sender_->Send(new AutomationMsg_HandleMessageFromExternalHost(0, handle,
+ target,
+ message));
DCHECK(succeeded);
}
diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h
index 24f2cb3..bbb96d0 100644
--- a/chrome/test/automation/tab_proxy.h
+++ b/chrome/test/automation/tab_proxy.h
@@ -266,9 +266,9 @@ class TabProxy : public AutomationResourceProxy {
SavePackage::SavePackageType type);
// Posts a message to the external tab.
- void PostMessage(AutomationHandle handle,
- const std::string& target,
- const std::string& message);
+ void HandleMessageFromExternalHost(AutomationHandle handle,
+ const std::string& target,
+ const std::string& message);
private:
DISALLOW_EVIL_CONSTRUCTORS(TabProxy);