From 8b6ff019c982f3929cf09b7090c9ec38c2751fc1 Mon Sep 17 00:00:00 2001 From: "paul@chromium.org" Date: Tue, 18 Aug 2009 22:29:58 +0000 Subject: Show or open downloaded items on the UI thread for Mac. This is required because NSWorkspace, which is used for the open or show operation, must be called on the main thread. BUG=19447 (http://crbug.com/19447) TEST=Repro steps fully described in the bug report. Review URL: http://codereview.chromium.org/172074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23667 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/download/download_file.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'chrome/browser/download/download_file.h') diff --git a/chrome/browser/download/download_file.h b/chrome/browser/download/download_file.h index 9706d4a..3527131 100644 --- a/chrome/browser/download/download_file.h +++ b/chrome/browser/download/download_file.h @@ -201,12 +201,18 @@ class DownloadFileManager void RemoveDownloadManager(DownloadManager* manager); void RemoveDownload(int id, DownloadManager* manager); +#if !defined(OS_MACOSX) + // The open and show methods run on the file thread, which does not work on + // Mac OS X (which uses the UI thread for opens). + // Handler for shell operations sent from the UI to the download thread. void OnShowDownloadInShell(const FilePath& full_path); + // Handler to open or execute a downloaded file. void OnOpenDownloadInShell(const FilePath& full_path, const GURL& url, gfx::NativeView parent_window); +#endif // The download manager has provided a final name for a download. Sent from // the UI thread and run on the download thread. -- cgit v1.1