diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-04 23:10:00 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-04 23:10:00 +0000 |
commit | 673fd2c0970496cf45b4724510590c9bc2c313bc (patch) | |
tree | f7782e423be391ab2377c9bb2019e107a191ecfb /chrome/browser/automation | |
parent | ccd22a77a320bb0fc414a97d758fc002f40a907e (diff) | |
download | chromium_src-673fd2c0970496cf45b4724510590c9bc2c313bc.zip chromium_src-673fd2c0970496cf45b4724510590c9bc2c313bc.tar.gz chromium_src-673fd2c0970496cf45b4724510590c9bc2c313bc.tar.bz2 |
Add support for the IE File->Save As command. This eventually ends up in Chrome via the new automation
message AutomationMsg_SaveAsAsync. Rest of the changes are to plumb this message across from IE to Chrome.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=24039
Bug=24039
Test=Launch IE with OptinUrls set to *. Navigate to google.com and select File->Save As. The dialog should
popup.
Review URL: http://codereview.chromium.org/563025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38145 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 9 | ||||
-rw-r--r-- | chrome/browser/automation/automation_provider.h | 1 | ||||
-rw-r--r-- | chrome/browser/automation/chrome_frame_automation_provider.cc | 3 |
3 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index a0c3d3c..9a02f04 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -462,6 +462,7 @@ void AutomationProvider::OnMessageReceived(const IPC::Message& message) { LoadExpandedExtension) IPC_MESSAGE_HANDLER(AutomationMsg_ShutdownSessionService, ShutdownSessionService) + IPC_MESSAGE_HANDLER(AutomationMsg_SaveAsAsync, SaveAsAsync) IPC_END_MESSAGE_MAP() } @@ -2236,3 +2237,11 @@ void AutomationProvider::LoadExpandedExtension( Send(reply_message); } } + +void AutomationProvider::SaveAsAsync(int tab_handle) { + NavigationController* tab = NULL; + TabContents* tab_contents = GetTabContentsForHandle(tab_handle, &tab); + if (tab_contents) + tab_contents->OnSavePage(); +} + diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index 08df2e2..de371f8 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -488,6 +488,7 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>, void ReloadAsync(int tab_handle); void StopAsync(int tab_handle); + void SaveAsAsync(int tab_handle); void WaitForBrowserWindowCountToBecome(int target_count, IPC::Message* reply_message); diff --git a/chrome/browser/automation/chrome_frame_automation_provider.cc b/chrome/browser/automation/chrome_frame_automation_provider.cc index 08b5d5c..f9e82f7 100644 --- a/chrome/browser/automation/chrome_frame_automation_provider.cc +++ b/chrome/browser/automation/chrome_frame_automation_provider.cc @@ -59,7 +59,8 @@ bool ChromeFrameAutomationProvider::IsValidMessage(uint32 type) { case AutomationMsg_HandleMessageFromExternalHost::ID: case AutomationMsg_RequestStarted::ID: case AutomationMsg_RequestData::ID: - case AutomationMsg_RequestEnd::ID: { + case AutomationMsg_RequestEnd::ID: + case AutomationMsg_SaveAsAsync::ID: { is_valid_message = true; break; } |