summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authorpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-17 18:01:55 +0000
committerpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-17 18:01:55 +0000
commitaf066a6a6f9859764a62071a00a401edf76b8024 (patch)
treef8ab2e801a4d65c7314e183b5493b74a5ebfcddd /chrome/browser/dom_ui
parente68d6578f6c64a9120eb224aa594eca1c5960df3 (diff)
downloadchromium_src-af066a6a6f9859764a62071a00a401edf76b8024.zip
chromium_src-af066a6a6f9859764a62071a00a401edf76b8024.tar.gz
chromium_src-af066a6a6f9859764a62071a00a401edf76b8024.tar.bz2
Implement drag and drop of downloads for the Mac downloads page.
BUG=15776 (http://crbug.com/15776) TEST=Download an item, open the download page, drag the icon of the download to the desktop. Review URL: http://codereview.chromium.org/164459 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23548 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/downloads_dom_handler.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/dom_ui/downloads_dom_handler.cc b/chrome/browser/dom_ui/downloads_dom_handler.cc
index 703d2fb6..aa646c0 100644
--- a/chrome/browser/dom_ui/downloads_dom_handler.cc
+++ b/chrome/browser/dom_ui/downloads_dom_handler.cc
@@ -16,13 +16,14 @@
#include "chrome/browser/dom_ui/fileicon_source.h"
#include "chrome/browser/metrics/user_metrics.h"
#include "chrome/browser/profile.h"
+#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/time_format.h"
#include "chrome/common/url_constants.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
-#if defined(TOOLKIT_VIEWS)
+#if defined(TOOLKIT_VIEWS) || defined(OS_MACOSX)
// TODO(port): re-enable when download_util is ported
#include "chrome/browser/download/download_util.h"
#else
@@ -169,7 +170,8 @@ void DownloadsDOMHandler::HandleDrag(const Value* value) {
if (file) {
IconManager* im = g_browser_process->icon_manager();
SkBitmap* icon = im->LookupIcon(file->full_path(), IconLoader::NORMAL);
- download_util::DragDownload(file, icon);
+ gfx::NativeView view = dom_ui_->tab_contents()->GetNativeView();
+ download_util::DragDownload(file, icon, view);
}
}