summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation/tab_proxy.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-10 21:51:52 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-10 21:51:52 +0000
commit52415f845c07904de5e22b901c86fa5ddea05102 (patch)
tree9701556a907004422b23ded0e100e2c3a20c96ba /chrome/test/automation/tab_proxy.cc
parent9c53a338c232cddc09838f1e2e927dcfe08abb00 (diff)
downloadchromium_src-52415f845c07904de5e22b901c86fa5ddea05102.zip
chromium_src-52415f845c07904de5e22b901c86fa5ddea05102.tar.gz
chromium_src-52415f845c07904de5e22b901c86fa5ddea05102.tar.bz2
Clean up external-tab related code in automation provider and automation proxy.
BUG=44695 TEST=compile Review URL: http://codereview.chromium.org/2743006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49448 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation/tab_proxy.cc')
-rw-r--r--chrome/test/automation/tab_proxy.cc72
1 files changed, 36 insertions, 36 deletions
diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc
index 8e31e00..a4711ca 100644
--- a/chrome/test/automation/tab_proxy.cc
+++ b/chrome/test/automation/tab_proxy.cc
@@ -97,28 +97,6 @@ AutomationMsg_NavigationResponseValues
return navigate_response;
}
-AutomationMsg_NavigationResponseValues TabProxy::NavigateInExternalTab(
- const GURL& url, const GURL& referrer) {
- if (!is_valid())
- return AUTOMATION_MSG_NAVIGATION_ERROR;
-
- AutomationMsg_NavigationResponseValues rv = AUTOMATION_MSG_NAVIGATION_ERROR;
- sender_->Send(new AutomationMsg_NavigateInExternalTab(0, handle_, url,
- referrer, &rv));
- return rv;
-}
-
-AutomationMsg_NavigationResponseValues TabProxy::NavigateExternalTabAtIndex(
- int index) {
- if (!is_valid())
- return AUTOMATION_MSG_NAVIGATION_ERROR;
-
- AutomationMsg_NavigationResponseValues rv = AUTOMATION_MSG_NAVIGATION_ERROR;
- sender_->Send(new AutomationMsg_NavigateExternalTabAtIndex(0, handle_, index,
- &rv));
- return rv;
-}
-
bool TabProxy::SetAuth(const std::wstring& username,
const std::wstring& password) {
if (!is_valid())
@@ -537,25 +515,59 @@ bool TabProxy::Close(bool wait_until_closed) {
}
#if defined(OS_WIN)
-// TODO(port): Remove windowsisms.
bool TabProxy::ProcessUnhandledAccelerator(const MSG& msg) {
if (!is_valid())
return false;
+
return sender_->Send(
new AutomationMsg_ProcessUnhandledAccelerator(0, handle_, msg));
// This message expects no response
}
-#endif // defined(OS_WIN)
bool TabProxy::SetInitialFocus(bool reverse, bool restore_focus_to_view) {
if (!is_valid())
return false;
+
return sender_->Send(
new AutomationMsg_SetInitialFocus(0, handle_, reverse,
restore_focus_to_view));
// This message expects no response
}
+AutomationMsg_NavigationResponseValues TabProxy::NavigateInExternalTab(
+ const GURL& url, const GURL& referrer) {
+ if (!is_valid())
+ return AUTOMATION_MSG_NAVIGATION_ERROR;
+
+ AutomationMsg_NavigationResponseValues rv = AUTOMATION_MSG_NAVIGATION_ERROR;
+ sender_->Send(new AutomationMsg_NavigateInExternalTab(0, handle_, url,
+ referrer, &rv));
+ return rv;
+}
+
+AutomationMsg_NavigationResponseValues TabProxy::NavigateExternalTabAtIndex(
+ int index) {
+ if (!is_valid())
+ return AUTOMATION_MSG_NAVIGATION_ERROR;
+
+ AutomationMsg_NavigationResponseValues rv = AUTOMATION_MSG_NAVIGATION_ERROR;
+ sender_->Send(new AutomationMsg_NavigateExternalTabAtIndex(0, handle_, index,
+ &rv));
+ return rv;
+}
+
+void TabProxy::HandleMessageFromExternalHost(const std::string& message,
+ const std::string& origin,
+ const std::string& target) {
+ if (!is_valid())
+ return;
+
+ sender_->Send(
+ new AutomationMsg_HandleMessageFromExternalHost(
+ 0, handle_, message, origin, target));
+}
+#endif // defined(OS_WIN)
+
bool TabProxy::WaitForTabToBeRestored(uint32 timeout_ms) {
if (!is_valid())
return false;
@@ -631,18 +643,6 @@ bool TabProxy::SavePage(const FilePath& file_name,
return succeeded;
}
-void TabProxy::HandleMessageFromExternalHost(const std::string& message,
- const std::string& origin,
- const std::string& target) {
- if (!is_valid())
- return;
-
- bool succeeded =
- sender_->Send(new AutomationMsg_HandleMessageFromExternalHost(0, handle_,
- message, origin, target));
- DCHECK(succeeded);
-}
-
bool TabProxy::GetInfoBarCount(int* count) {
if (!is_valid())
return false;