From c70f9b84b30986220dc58993a9a41d6fdebefac2 Mon Sep 17 00:00:00 2001 From: "bauerb@chromium.org" Date: Wed, 21 Apr 2010 07:31:11 +0000 Subject: Close a newly opened (by cmd-clicking on a link) tab if it resulted in a download. To test this, the CL adds an automation message AutomationMsg_NavigateAsyncWithDisposition, and a method NavigateToURLAsyncWithDisposition to TabProxy. The only functional change is in TabContents::OnStartDownload, the rest of the changes is for testing. BUG=10764 TEST=DownloadTest.CloseNewTab Manual test: go to http://build.chromium.org/buildbot/continuous/mac/LATEST/, open the link "chrome-mac.zip" in a new tab. The tab should close as soon as the download starts. Review URL: http://codereview.chromium.org/1151007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45158 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/automation/automation_provider.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'chrome/browser/automation/automation_provider.h') diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index cb07f1c..e4256c0 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -220,6 +220,10 @@ class AutomationProvider : public base::RefCounted, int number_of_navigations, IPC::Message* reply_message); void NavigationAsync(int handle, const GURL& url, bool* status); + void NavigationAsyncWithDisposition(int handle, + const GURL& url, + WindowOpenDisposition disposition, + bool* status); void GoBack(int handle, IPC::Message* reply_message); void GoForward(int handle, IPC::Message* reply_message); void Reload(int handle, IPC::Message* reply_message); -- cgit v1.1