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

Issue 160083: Enable dragging of images to desktop (Finder), Preview, etc. (on Mac).... (Closed)

Created:
11 years, 5 months ago by viettrungluu-gmail
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, John Grabowski, brettw, Ben Goodger (Google)
Visibility:
Public.

Description

Enable dragging of images to desktop (Finder), Preview, etc. (on Mac). This hooks up drag-and-drop of file promises, lazy writing to the drag pasteboard, drag-sourcing of TIFF images (via Cocoa) and file contents. Patch Set 5 improvements: Adds asynchronous writing of promised files. Patch Set 4 improvements: Big refactoring -- drag source stuff is now handled by the WebDragSource (Cocoa) object, with messages proxied through the TabContentsViewCocoa object. The WebDragSource object carries a weak reference to the TCVC, owns the WebDropData, and keeps track of the drag pasteboard types/promises. Patch Set 3 improvements over Patch Set 2: It shouldn't crash anymore. Made drop_data_ reference counted, in anticipation of asynchronous file writing. TODO #1: Testing. Still need a unit test, maybe. Should make sure that dragging by file contents actually works. TODO #2 (in some other patch): Refactor some of the WebDropData extraction code out, e.g., file name extraction should be made common with other platforms. TODO #3 (in some other patch): We really should make WebDropData cheaper to copy around and retain. I'm not convinced it's a good idea to push out the entire thing over IPC, especially since the data pushed could be very big and may not even be used. BUG=15640 TEST=drag images to various applications Patch by viettrungluu@gmail.com

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Total comments: 6

Patch Set 7 : '' #

Patch Set 8 : '' #

Total comments: 28

Patch Set 9 : '' #

Total comments: 8

Patch Set 10 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+456 lines, -139 lines) Patch
A chrome/browser/cocoa/web_drag_source.h View 4 5 6 7 8 1 chunk +57 lines, -0 lines 0 comments Download
A chrome/browser/cocoa/web_drag_source.mm View 4 5 6 7 8 9 1 chunk +346 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_view_mac.h View 1 2 3 4 5 6 7 8 9 4 chunks +8 lines, -5 lines 0 comments Download
M chrome/browser/tab_contents/tab_contents_view_mac.mm View 1 2 3 4 5 6 7 8 9 8 chunks +39 lines, -134 lines 0 comments Download
M chrome/chrome.gyp View 4 5 6 7 8 9 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Avi (use Gerrit)
Looks reasonable to me; have to leave it to Pink for the final OK. http://codereview.chromium.org/160083/diff/23/26 ...
11 years, 5 months ago (2009-07-27 18:33:01 UTC) #1
viettrungluu-gmail
Thanks Avi. Everything corrected/clarified as per your comments. http://codereview.chromium.org/160083/diff/23/27 File chrome/browser/cocoa/web_drag_source.mm (right): http://codereview.chromium.org/160083/diff/23/27#newcode69 Line 69: ...
11 years, 5 months ago (2009-07-27 18:44:36 UTC) #2
pink (ping after 24hrs)
http://codereview.chromium.org/160083/diff/1025/40 File chrome/browser/cocoa/web_drag_source.h (right): http://codereview.chromium.org/160083/diff/1025/40#newcode17 Line 17: TabContentsViewCocoa* tcvc_; when reading the code, nobody would ...
11 years, 5 months ago (2009-07-27 21:12:24 UTC) #3
viettrungluu-gmail
Thanks. I made the suggested changes (and a couple more). Say the word, and I'll ...
11 years, 5 months ago (2009-07-28 00:20:59 UTC) #4
pink (ping after 24hrs)
LGTM with these addressed. http://codereview.chromium.org/160083/diff/45/49 File chrome/browser/cocoa/web_drag_source.mm (right): http://codereview.chromium.org/160083/diff/45/49#newcode45 Line 45: const WebDropData& drop_data, unsigned ...
11 years, 4 months ago (2009-07-30 16:49:28 UTC) #5
viettrungluu-gmail
Everything addressed. Could you re^2-review (or should that be re^3-view?) and land it for me? ...
11 years, 4 months ago (2009-07-30 17:09:20 UTC) #6
viettrungluu-gmail
11 years, 4 months ago (2009-08-01 05:18:30 UTC) #7
Pushed by thakis as r22187.

Powered by Google App Engine
This is Rietveld 408576698