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

Issue 1964283002: MacViews: Implemented Drag & Drop (Closed)

Created:
4 years, 7 months ago by spqchan
Modified:
4 years, 6 months ago
CC:
dcheng, chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MacViews: Implemented Drag & Drop Created a Drag & Drop client on Mac that bridges between the Views and native OSX's drag and drop. This approach is based on the Aura approach. BUG=599585 TEST= Run the view unit test: DragDropClientMacTest Committed: https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198 Cr-Commit-Position: refs/heads/master@{#397801}

Patch Set 1 #

Total comments: 16

Patch Set 2 : Renamed #

Patch Set 3 : Added test #

Patch Set 4 : #

Patch Set 5 : comments #

Patch Set 6 : Clean up #

Patch Set 7 : Forgot to add the test #

Total comments: 78

Patch Set 8 : Fix for tapted #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Total comments: 17

Patch Set 12 : Added missing commit #

Patch Set 13 : fixes for tapted #

Patch Set 14 : PickledData format now supported #

Patch Set 15 : Added a runloop #

Patch Set 16 : Nit #

Total comments: 54

Patch Set 17 : #

Patch Set 18 : #

Total comments: 19

Patch Set 19 : more fixes for tapted #

Patch Set 20 : #

Total comments: 24

Patch Set 21 : #

Patch Set 22 : #

Patch Set 23 : Add missing file #

Total comments: 4

Patch Set 24 : fix for sky #

Total comments: 4

Patch Set 25 : fix for dcheng #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+681 lines, -73 lines) Patch
M base/mac/sdk_forward_declarations.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +7 lines, -0 lines 0 comments Download
M ui/base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +1 line, -9 lines 0 comments Download
M ui/base/dragdrop/drag_drop_types.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
A ui/base/dragdrop/drag_drop_types_mac.mm View 1 1 chunk +24 lines, -0 lines 0 comments Download
M ui/base/dragdrop/drag_utils.cc View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -0 lines 0 comments Download
D ui/base/dragdrop/drag_utils_aura.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -23 lines 0 comments Download
M ui/base/dragdrop/drag_utils_mac.mm View 1 2 3 4 5 6 7 1 chunk +0 lines, -23 lines 0 comments Download
M ui/base/dragdrop/os_exchange_data.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M ui/base/dragdrop/os_exchange_data_provider_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +24 lines, -0 lines 0 comments Download
M ui/base/dragdrop/os_exchange_data_provider_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +43 lines, -0 lines 0 comments Download
M ui/base/ui_base.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +1 line, -9 lines 0 comments Download
M ui/views/cocoa/bridged_content_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -2 lines 0 comments Download
M ui/views/cocoa/bridged_content_view.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 7 chunks +47 lines, -0 lines 0 comments Download
M ui/views/cocoa/bridged_native_widget.h View 1 3 chunks +4 lines, -0 lines 0 comments Download
M ui/views/cocoa/bridged_native_widget.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +4 lines, -0 lines 0 comments Download
A ui/views/cocoa/drag_drop_client_mac.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +90 lines, -0 lines 0 comments Download
A ui/views/cocoa/drag_drop_client_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +163 lines, -0 lines 2 comments Download
A ui/views/cocoa/drag_drop_client_mac_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +248 lines, -0 lines 0 comments Download
M ui/views/views.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +3 lines, -0 lines 0 comments Download
M ui/views/widget/native_widget_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +6 lines, -6 lines 0 comments Download

Messages

Total messages: 49 (17 generated)
spqchan
Hey Trent, Can you have a look at what I have right now for drag ...
4 years, 7 months ago (2016-05-11 00:29:47 UTC) #3
tapted
This looks awesome! I think your approach is spot-on. Just some high-level comments (held back ...
4 years, 7 months ago (2016-05-11 12:36:15 UTC) #4
spqchan
I cleaned up the code and wrote DragDropTestNativeWidgetMac A good chunk of the set up ...
4 years, 7 months ago (2016-05-23 21:26:22 UTC) #5
tapted
I played around a bit - the main thing I noticed: dragging text from a ...
4 years, 7 months ago (2016-05-24 08:06:02 UTC) #7
spqchan
Good catch! I dug into it and found out that the reason why that was ...
4 years, 7 months ago (2016-05-26 01:56:55 UTC) #11
tapted
Ooh - the async thing is interesting. I think on Windows the OS requires it ...
4 years, 7 months ago (2016-05-26 12:31:42 UTC) #12
spqchan
Sounds good, I managed to get a runloop working by copying some of the code ...
4 years, 6 months ago (2016-05-27 23:25:48 UTC) #13
spqchan
One thing I forgot to mention, I added a "x-os-exchange-data" format to OSExchangeDataProvider so that ...
4 years, 6 months ago (2016-05-27 23:29:23 UTC) #14
tapted
https://codereview.chromium.org/1964283002/diff/300001/ui/base/dragdrop/os_exchange_data_provider_mac.mm File ui/base/dragdrop/os_exchange_data_provider_mac.mm (right): https://codereview.chromium.org/1964283002/diff/300001/ui/base/dragdrop/os_exchange_data_provider_mac.mm#newcode22 ui/base/dragdrop/os_exchange_data_provider_mac.mm:22: const std::string kClipboardFormatString = "chromium/x-os-exchange-data"; I don't really understand ...
4 years, 6 months ago (2016-05-31 11:49:59 UTC) #15
spqchan
PTAL https://codereview.chromium.org/1964283002/diff/300001/ui/base/dragdrop/os_exchange_data_provider_mac.mm File ui/base/dragdrop/os_exchange_data_provider_mac.mm (right): https://codereview.chromium.org/1964283002/diff/300001/ui/base/dragdrop/os_exchange_data_provider_mac.mm#newcode22 ui/base/dragdrop/os_exchange_data_provider_mac.mm:22: const std::string kClipboardFormatString = "chromium/x-os-exchange-data"; On 2016/05/31 11:49:57, ...
4 years, 6 months ago (2016-05-31 23:06:13 UTC) #16
tapted
https://codereview.chromium.org/1964283002/diff/340001/base/mac/sdk_forward_declarations.h File base/mac/sdk_forward_declarations.h (right): https://codereview.chromium.org/1964283002/diff/340001/base/mac/sdk_forward_declarations.h#newcode251 base/mac/sdk_forward_declarations.h:251: typedef NSUInteger NSSpringLoadingHighlight; hm https://developer.apple.com/library/mac/documentation/Cocoa/Reference/ApplicationKit/Protocols/NSDraggingInfo_Protocol/#//apple_ref/doc/c_ref/NSSpringLoadingHighlight lists this as `NSUInteger`, ...
4 years, 6 months ago (2016-06-01 01:57:01 UTC) #17
spqchan
PTAL https://codereview.chromium.org/1964283002/diff/340001/base/mac/sdk_forward_declarations.h File base/mac/sdk_forward_declarations.h (right): https://codereview.chromium.org/1964283002/diff/340001/base/mac/sdk_forward_declarations.h#newcode251 base/mac/sdk_forward_declarations.h:251: typedef NSUInteger NSSpringLoadingHighlight; On 2016/06/01 01:57:00, tapted wrote: ...
4 years, 6 months ago (2016-06-01 19:09:29 UTC) #18
tapted
lgtm - the rest is just mechanical stuff. When it's ready, we should rope in ...
4 years, 6 months ago (2016-06-02 00:24:51 UTC) #19
spqchan
PTAL https://codereview.chromium.org/1964283002/diff/380001/ui/base/dragdrop/os_exchange_data_provider_mac.h File ui/base/dragdrop/os_exchange_data_provider_mac.h (right): https://codereview.chromium.org/1964283002/diff/380001/ui/base/dragdrop/os_exchange_data_provider_mac.h#newcode16 ui/base/dragdrop/os_exchange_data_provider_mac.h:16: @class NSArray; On 2016/06/02 00:24:50, tapted wrote: > ...
4 years, 6 months ago (2016-06-02 22:01:19 UTC) #20
tapted
I think drag_drop_client_mac_unittest.mm fell off the CL :) (git add?)
4 years, 6 months ago (2016-06-02 23:18:52 UTC) #21
spqchan
On 2016/06/02 23:18:52, tapted wrote: > I think drag_drop_client_mac_unittest.mm fell off the CL :) (git ...
4 years, 6 months ago (2016-06-02 23:44:55 UTC) #22
tapted
awesome lgtm
4 years, 6 months ago (2016-06-02 23:59:27 UTC) #23
spqchan
Awesome, thanks! +sky for OWNERS
4 years, 6 months ago (2016-06-03 00:08:13 UTC) #25
sky
LGTM https://codereview.chromium.org/1964283002/diff/440001/base/mac/sdk_forward_declarations.h File base/mac/sdk_forward_declarations.h (right): https://codereview.chromium.org/1964283002/diff/440001/base/mac/sdk_forward_declarations.h#newcode251 base/mac/sdk_forward_declarations.h:251: typedef NSUInteger NSSpringLoadingHighlight; using? https://codereview.chromium.org/1964283002/diff/440001/ui/base/dragdrop/os_exchange_data_provider_mac.h File ui/base/dragdrop/os_exchange_data_provider_mac.h (right): ...
4 years, 6 months ago (2016-06-03 15:18:37 UTC) #26
spqchan
https://codereview.chromium.org/1964283002/diff/440001/base/mac/sdk_forward_declarations.h File base/mac/sdk_forward_declarations.h (right): https://codereview.chromium.org/1964283002/diff/440001/base/mac/sdk_forward_declarations.h#newcode251 base/mac/sdk_forward_declarations.h:251: typedef NSUInteger NSSpringLoadingHighlight; On 2016/06/03 15:18:37, sky wrote: > ...
4 years, 6 months ago (2016-06-03 16:55:45 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1964283002/440002
4 years, 6 months ago (2016-06-03 16:56:30 UTC) #30
dcheng
https://codereview.chromium.org/1964283002/diff/440002/ui/base/dragdrop/os_exchange_data_provider_mac.mm File ui/base/dragdrop/os_exchange_data_provider_mac.mm (right): https://codereview.chromium.org/1964283002/diff/440002/ui/base/dragdrop/os_exchange_data_provider_mac.mm#newcode202 ui/base/dragdrop/os_exchange_data_provider_mac.mm:202: return base::WrapUnique(new OSExchangeData(provider)); Nit: just use base::MakeUnique<OSExchangeData>(provider); https://codereview.chromium.org/1964283002/diff/440002/ui/base/dragdrop/os_exchange_data_provider_mac.mm#newcode209 ui/base/dragdrop/os_exchange_data_provider_mac.mm:209: ...
4 years, 6 months ago (2016-06-03 17:41:07 UTC) #32
dcheng
(I'm going to uncheck the CQ for now. If you feel my comments are in ...
4 years, 6 months ago (2016-06-03 17:46:50 UTC) #33
spqchan
dcheng, PTAL https://codereview.chromium.org/1964283002/diff/440002/ui/base/dragdrop/os_exchange_data_provider_mac.mm File ui/base/dragdrop/os_exchange_data_provider_mac.mm (right): https://codereview.chromium.org/1964283002/diff/440002/ui/base/dragdrop/os_exchange_data_provider_mac.mm#newcode202 ui/base/dragdrop/os_exchange_data_provider_mac.mm:202: return base::WrapUnique(new OSExchangeData(provider)); On 2016/06/03 17:41:07, dcheng ...
4 years, 6 months ago (2016-06-03 18:24:57 UTC) #35
dcheng
lgtm
4 years, 6 months ago (2016-06-03 18:31:09 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1964283002/470001
4 years, 6 months ago (2016-06-03 18:33:04 UTC) #40
commit-bot: I haz the power
Committed patchset #25 (id:470001)
4 years, 6 months ago (2016-06-03 21:17:43 UTC) #42
commit-bot: I haz the power
Patchset 25 (id:??) landed as https://crrev.com/cf5eeb5c035be5a986fa1a6488f2189e7aebe198 Cr-Commit-Position: refs/heads/master@{#397801}
4 years, 6 months ago (2016-06-03 21:19:13 UTC) #44
Scott Hess - ex-Googler
Of course, I could be wrong! But this is the change in the window that ...
4 years, 6 months ago (2016-06-05 20:11:51 UTC) #46
tapted
https://codereview.chromium.org/1964283002/diff/470001/ui/views/cocoa/drag_drop_client_mac.mm File ui/views/cocoa/drag_drop_client_mac.mm (right): https://codereview.chromium.org/1964283002/diff/470001/ui/views/cocoa/drag_drop_client_mac.mm#newcode24 ui/views/cocoa/drag_drop_client_mac.mm:24: std::unique_ptr<ui::OSExchangeData> data_; On 2016/06/05 20:11:51, Scott Hess wrote: > ...
4 years, 6 months ago (2016-06-05 23:37:35 UTC) #47
tapted
On 2016/06/05 23:37:35, tapted wrote: > https://codereview.chromium.org/1964283002/diff/470001/ui/views/cocoa/drag_drop_client_mac.mm > File ui/views/cocoa/drag_drop_client_mac.mm (right): > > https://codereview.chromium.org/1964283002/diff/470001/ui/views/cocoa/drag_drop_client_mac.mm#newcode24 > ...
4 years, 6 months ago (2016-06-06 01:52:37 UTC) #48
Scott Hess - ex-Googler
4 years, 6 months ago (2016-06-06 03:38:53 UTC) #49
Message was sent while issue was closed.
On 2016/06/06 01:52:37, tapted wrote:
> On 2016/06/05 23:37:35, tapted wrote:
> >
>
https://codereview.chromium.org/1964283002/diff/470001/ui/views/cocoa/drag_dr...
> > File ui/views/cocoa/drag_drop_client_mac.mm (right):
> > 
> >
>
https://codereview.chromium.org/1964283002/diff/470001/ui/views/cocoa/drag_dr...
> > ui/views/cocoa/drag_drop_client_mac.mm:24:
std::unique_ptr<ui::OSExchangeData>
> > data_;
> > On 2016/06/05 20:11:51, Scott Hess wrote:
> > > Dollars to donuts this is responsible for the waterfall failing OSX
"sizes"
> > step
> > > starting in:
> > >    https://build.chromium.org/p/chromium/builders/Mac/builds/16375
> > 
> > Ah doh - it just needs curlies around it. I'll submit a fix.
> 
> Cleared up in https://build.chromium.org/p/chromium/builders/Mac/builds/16418
> (cl -> http://crrev.com/2039723002 ).

Thanks!

Powered by Google App Engine
This is Rietveld 408576698