diff options
author | paul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 22:29:58 +0000 |
---|---|---|
committer | paul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-18 22:29:58 +0000 |
commit | 8b6ff019c982f3929cf09b7090c9ec38c2751fc1 (patch) | |
tree | 015a4b4a26fd5c8729fa1f3a3f57e25e8666e586 /chrome/browser/download/download_file.cc | |
parent | 7c23cfc44c6fa5d224acd7cae942dc7310138c7b (diff) | |
download | chromium_src-8b6ff019c982f3929cf09b7090c9ec38c2751fc1.zip chromium_src-8b6ff019c982f3929cf09b7090c9ec38c2751fc1.tar.gz chromium_src-8b6ff019c982f3929cf09b7090c9ec38c2751fc1.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/download/download_file.cc')
-rw-r--r-- | chrome/browser/download/download_file.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/download/download_file.cc b/chrome/browser/download/download_file.cc index 970cc49..bf439f0 100644 --- a/chrome/browser/download/download_file.cc +++ b/chrome/browser/download/download_file.cc @@ -526,14 +526,17 @@ void DownloadFileManager::OnDownloadUrl(const GURL& url, // Open a download, or show it in a file explorer window. We run on this // thread to avoid blocking the UI with (potentially) slow Shell operations. // TODO(paulg): File 'stat' operations. +#if !defined(OS_MACOSX) void DownloadFileManager::OnShowDownloadInShell(const FilePath& full_path) { DCHECK(MessageLoop::current() == file_loop_); platform_util::ShowItemInFolder(full_path); } +#endif // Launches the selected download using ShellExecute 'open' verb. For windows, // if there is a valid parent window, the 'safer' version will be used which can // display a modal dialog asking for user consent on dangerous files. +#if !defined(OS_MACOSX) void DownloadFileManager::OnOpenDownloadInShell(const FilePath& full_path, const GURL& url, gfx::NativeView parent_window) { @@ -545,9 +548,9 @@ void DownloadFileManager::OnOpenDownloadInShell(const FilePath& full_path, return; } #endif - platform_util::OpenItem(full_path); } +#endif // OS_MACOSX // The DownloadManager in the UI thread has provided a final name for the // download specified by 'id'. Rename the in progress download, and remove it |