diff options
author | huanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-16 02:46:33 +0000 |
---|---|---|
committer | huanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-16 02:46:33 +0000 |
commit | 4f6381eea783e82117fd2b68f2a5a2945edc8e4b (patch) | |
tree | 6f6b10aa55297286cc1ffad490d7e8ceee0adee0 /chrome/browser/automation/automation_provider.cc | |
parent | b68d5ed3f9d1b49b24713431bfe212b7601b75b1 (diff) | |
download | chromium_src-4f6381eea783e82117fd2b68f2a5a2945edc8e4b.zip chromium_src-4f6381eea783e82117fd2b68f2a5a2945edc8e4b.tar.gz chromium_src-4f6381eea783e82117fd2b68f2a5a2945edc8e4b.tar.bz2 |
Consolidate ApplyAccelerator and RunCommand code
paths which do the same thing.
- On browser side, remove
AutomationMsg_ApplyAccelerator IPC message
and ApplyAccelerator function in
automation_provider.
- On client side, let ApplyAccelerator simply
call RunCommandAsync.
With the change, converting all commands to
synchronous mode should benefit both.
Review URL: http://codereview.chromium.org/67152
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13825 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation/automation_provider.cc')
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 68fb904a..bac531e5 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -909,9 +909,9 @@ void AutomationProvider::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(AutomationMsg_WindowHWND, GetWindowHWND) #endif // defined(OS_WIN) IPC_MESSAGE_HANDLER(AutomationMsg_WindowExecuteCommandAsync, - ExecuteBrowserCommand) + ExecuteBrowserCommandAsync) IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_WindowExecuteCommand, - ExecuteBrowserCommandWithNotification) + ExecuteBrowserCommand) IPC_MESSAGE_HANDLER(AutomationMsg_WindowViewBounds, WindowGetViewBounds) IPC_MESSAGE_HANDLER(AutomationMsg_SetWindowVisible, @@ -1379,8 +1379,8 @@ void AutomationProvider::GetWindowHWND(int handle, HWND* win32_handle) { } #endif // defined(OS_WIN) -void AutomationProvider::ExecuteBrowserCommand(int handle, int command, - bool* success) { +void AutomationProvider::ExecuteBrowserCommandAsync(int handle, int command, + bool* success) { *success = false; if (browser_tracker_->ContainsHandle(handle)) { Browser* browser = browser_tracker_->GetResource(handle); @@ -1392,7 +1392,7 @@ void AutomationProvider::ExecuteBrowserCommand(int handle, int command, } } -void AutomationProvider::ExecuteBrowserCommandWithNotification( +void AutomationProvider::ExecuteBrowserCommand( int handle, int command, IPC::Message* reply_message) { if (browser_tracker_->ContainsHandle(handle)) { Browser* browser = browser_tracker_->GetResource(handle); @@ -1858,10 +1858,8 @@ void AutomationProvider::GetTabProcessID(int handle, int* process_id) { } void AutomationProvider::ApplyAccelerator(int handle, int id) { - if (browser_tracker_->ContainsHandle(handle)) { - Browser* browser = browser_tracker_->GetResource(handle); - browser->ExecuteCommand(id); - } + NOTREACHED() << "This function has been deprecated. " + << "Please use ExecuteBrowserCommandAsync instead."; } void AutomationProvider::ExecuteJavascript(int handle, |