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

Issue 164119: Items in the Downloads page should be loaded like a normal OS file when dragg... (Closed)

Created:
11 years, 4 months ago by pierre.lafayette
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Items in the Downloads page should be loaded like a normal OS file when dragged to a Tab content area. We need the URL to be set to the file path in the IDataObject so that WebDropData can properly handle the file. BUG=9266 TEST=Drag an item with a supported MIME type from the Downloads page to a Tab content area. It should load within the browser. Drag an item with an unsupported MIME type and it should not open it.

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 1

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 4

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -3 lines) Patch
M chrome/browser/download/download_util.cc View 1 2 3 4 5 6 2 chunks +16 lines, -3 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
pierre.lafayette
11 years, 4 months ago (2009-08-07 01:00:58 UTC) #1
Evan Stade
Paul, could you take a look? http://codereview.chromium.org/164119/diff/5/1005 File chrome/browser/download/download_util.cc (right): http://codereview.chromium.org/164119/diff/5/1005#newcode251 Line 251: download->file_name().ToWStringHack()); this ...
11 years, 4 months ago (2009-08-07 02:47:12 UTC) #2
pierre.lafayette
Never liked those *Hack functions.
11 years, 4 months ago (2009-08-07 03:34:32 UTC) #3
Paul Godavari
Would you explain the use case this patch solves (provide an example of why we'd ...
11 years, 4 months ago (2009-08-07 20:52:00 UTC) #4
pierre.lafayette
Sorry I wasn't clear in the TEST section. Try dragging an image you've downloaded or ...
11 years, 4 months ago (2009-08-07 21:05:24 UTC) #5
Paul Godavari
That use case sounds reasonable to me, but the side effect of your change is ...
11 years, 4 months ago (2009-08-07 21:27:04 UTC) #6
pierre.lafayette
Okay, Lei pointed me to mime_util. Now only supported types will have the additional URL ...
11 years, 4 months ago (2009-08-07 23:35:28 UTC) #7
Paul Godavari
LGTM, thanks for the mime fix. Just a few nits to fix, listed below. I ...
11 years, 4 months ago (2009-08-08 01:18:32 UTC) #8
pierre.lafayette
Done. I've created the second bug at http://crbug.com/18818.
11 years, 4 months ago (2009-08-08 02:33:23 UTC) #9
pierre.lafayette
Do you think it's a bug that dragging a local file with unsupported MIME type ...
11 years, 4 months ago (2009-08-08 02:41:09 UTC) #10
pierre.lafayette
11 years, 4 months ago (2009-08-09 17:27:50 UTC) #11
We could only add the URL to the data when the file is of a certain type. Is
there an enum or something that lists files that can be opened within the
browser?

2009/8/7 <paul@chromium.org>

> That use case sounds reasonable to me, but the side effect of your
> change is re-downloading exe and other file types when dragged onto the
> tab contents. Can you make this change work for only file types that can
> be displayed / loaded?
>
>
> http://codereview.chromium.org/164119
>



-- 
Pierre.

Powered by Google App Engine
This is Rietveld 408576698