Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1191)

Unified Diff: chrome/browser/dom_ui/downloads_dom_handler.cc

Issue 164459: Implement drag and drop of downloads for the Mac downloads page (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/cocoa/download_util_mac_unittest.mm ('k') | chrome/browser/download/download_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/downloads_dom_handler.cc
===================================================================
--- chrome/browser/dom_ui/downloads_dom_handler.cc (revision 23544)
+++ chrome/browser/dom_ui/downloads_dom_handler.cc (working copy)
@@ -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 @@
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);
}
}
« no previous file with comments | « chrome/browser/cocoa/download_util_mac_unittest.mm ('k') | chrome/browser/download/download_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698