diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-29 23:18:19 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-29 23:18:19 +0000 |
commit | f7a684345d7bfa3ebcabdadecef3c720c7ac6812 (patch) | |
tree | 6eefab3ee058ca672f82f8996061fee8148d768f /chrome/test | |
parent | a17a034a71a63dbc8eadaf6d27c647f46b584bd2 (diff) | |
download | chromium_src-f7a684345d7bfa3ebcabdadecef3c720c7ac6812.zip chromium_src-f7a684345d7bfa3ebcabdadecef3c720c7ac6812.tar.gz chromium_src-f7a684345d7bfa3ebcabdadecef3c720c7ac6812.tar.bz2 |
Added automation messages and corresponding handlers to support operations like
1. SelectAll
2. Cut/Copy/Paste
3. Reload :- Added an asynchronous version of this IPC
4. Stop.
Review URL: http://codereview.chromium.org/159609
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22017 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/automation/automation_messages_internal.h | 17 | ||||
-rw-r--r-- | chrome/test/automation/tab_proxy.cc | 24 | ||||
-rw-r--r-- | chrome/test/automation/tab_proxy.h | 13 |
3 files changed, 54 insertions, 0 deletions
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h index 39ce010..9d67065 100644 --- a/chrome/test/automation/automation_messages_internal.h +++ b/chrome/test/automation/automation_messages_internal.h @@ -965,4 +965,21 @@ IPC_BEGIN_MESSAGES(Automation) GURL /* url */, std::string /* cookie */) + IPC_MESSAGE_ROUTED1(AutomationMsg_SelectAll, + int /* tab handle */) + + IPC_MESSAGE_ROUTED1(AutomationMsg_Cut, + int /* tab handle */) + + IPC_MESSAGE_ROUTED1(AutomationMsg_Copy, + int /* tab handle */) + + IPC_MESSAGE_ROUTED1(AutomationMsg_Paste, + int /* tab handle */) + + IPC_MESSAGE_ROUTED1(AutomationMsg_ReloadAsync, + int /* tab handle */) + + IPC_MESSAGE_ROUTED1(AutomationMsg_StopAsync, + int /* tab handle */) IPC_END_MESSAGES(Automation) diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc index 89bbf26..f52f16f 100644 --- a/chrome/test/automation/tab_proxy.cc +++ b/chrome/test/automation/tab_proxy.cc @@ -637,6 +637,30 @@ void TabProxy::SendContextMenuCommand(int selected_command) { #endif // defined(OS_WIN) +void TabProxy::SelectAll() { + sender_->Send(new AutomationMsg_SelectAll(0, handle_)); +} + +void TabProxy::Cut() { + sender_->Send(new AutomationMsg_Cut(0, handle_)); +} + +void TabProxy::Copy() { + sender_->Send(new AutomationMsg_Copy(0, handle_)); +} + +void TabProxy::Paste() { + sender_->Send(new AutomationMsg_Paste(0, handle_)); +} + +void TabProxy::ReloadAsync() { + sender_->Send(new AutomationMsg_ReloadAsync(0, handle_)); +} + +void TabProxy::StopAsync() { + sender_->Send(new AutomationMsg_StopAsync(0, handle_)); +} + void TabProxy::AddObserver(TabProxyDelegate* observer) { AutoLock lock(list_lock_); observers_list_.AddObserver(observer); diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h index a04f496..5e83227 100644 --- a/chrome/test/automation/tab_proxy.h +++ b/chrome/test/automation/tab_proxy.h @@ -300,6 +300,19 @@ class TabProxy : public AutomationResourceProxy { #endif // defined(OS_WIN) + // Selects all contents on the page. + void SelectAll(); + + // Edit operations on the page. + void Cut(); + void Copy(); + void Paste(); + + // These handlers issue asynchronous Reload and Stop notifications to the + // chrome instance. + void ReloadAsync(); + void StopAsync(); + // Calls delegates void AddObserver(TabProxyDelegate* observer); void RemoveObserver(TabProxyDelegate* observer); |