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

Issue 2266603002: mus: Implement interwindow drag and drop (Closed)

Created:
4 years, 4 months ago by Elliot Glaysher
Modified:
4 years, 3 months ago
Reviewers:
Tom Sepez, sky
CC:
chromium-reviews, rjkroege, sadrul, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, tfarina, jam, dcheng, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, yzshen+watch_chromium.org, kalyank, darin (slow to review)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mash: Implements basic drag and drop IPC. This implements a new mus IPC protocol to allow inter-process drag and drop in mus. It handles the entire lifecycle of a drag between two mus Windows, possibly in different processes. This patch does not implement changing the mouse cursor or showing a drag representation, which is queued work. This patch is mus side only; it does not implement the views sided of this protocol, which is next. (With it, you can drag text from the chrome omnibox to the quick launcher and vice versa. You can drag text from the quick launcher to the content area. Etc.) BUG=614037 Committed: https://crrev.com/0873818c95cc607d8afe5a16b345fafe4109a735 Cr-Commit-Position: refs/heads/master@{#419005}

Patch Set 1 #

Patch Set 2 : format + blink works now? #

Patch Set 3 : Probably really fix unit test compile issues #

Patch Set 4 : Windows doesn't like casting pointers to bool. #

Patch Set 5 : Uploaded for a few comments. #

Total comments: 1

Patch Set 6 : Don't pass WindowTree to CurrentDragOperation via EventDispatcher. #

Patch Set 7 : Remove the passing of SkBitmaps over the wire for now. #

Patch Set 8 : Now CurrentDragOperation doesn't reference WindowTree at all. #

Patch Set 9 : Now with basic unit tests. #

Patch Set 10 : Fix ServerWindow lifetime issues. #

Patch Set 11 : Make start/finish so we only send the data once (and not at all for the source) #

Patch Set 12 : Don't crash when the source window goes away unexpectedly. #

Patch Set 13 : Remove all the views code from this patch; that's the next patch. #

Patch Set 14 : Remove stray mark #

Total comments: 26

Patch Set 15 : First round of review #

Patch Set 16 : Rebase to ToT #

Patch Set 17 : Clear the implicit pointer drags before start. #

Total comments: 20

Patch Set 18 : sky comments #

Total comments: 29

Patch Set 19 : next round of sky comments #

Patch Set 20 : Remove 'window &&' #

Total comments: 10

Patch Set 21 : more comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1995 lines, -44 lines) Patch
M services/ui/public/cpp/in_flight_change.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +4 lines, -3 lines 0 comments Download
M services/ui/public/cpp/in_flight_change.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +7 lines, -9 lines 0 comments Download
M services/ui/public/cpp/tests/test_window_tree.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +6 lines, -0 lines 0 comments Download
M services/ui/public/cpp/tests/test_window_tree.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +10 lines, -0 lines 0 comments Download
M services/ui/public/cpp/window.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +19 lines, -0 lines 0 comments Download
M services/ui/public/cpp/window.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +19 lines, -0 lines 0 comments Download
A services/ui/public/cpp/window_drop_target.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +65 lines, -0 lines 0 comments Download
M services/ui/public/cpp/window_tree_client.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +47 lines, -3 lines 0 comments Download
M services/ui/public/cpp/window_tree_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 7 chunks +130 lines, -1 line 0 comments Download
M services/ui/public/interfaces/window_tree.mojom View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +54 lines, -0 lines 0 comments Download
M services/ui/public/interfaces/window_tree_constants.mojom View 1 chunk +6 lines, -0 lines 0 comments Download
M services/ui/ws/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +5 lines, -0 lines 0 comments Download
M services/ui/ws/access_policy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M services/ui/ws/default_access_policy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M services/ui/ws/default_access_policy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +12 lines, -0 lines 0 comments Download
A services/ui/ws/drag_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +125 lines, -0 lines 0 comments Download
A services/ui/ws/drag_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +290 lines, -0 lines 0 comments Download
A services/ui/ws/drag_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +583 lines, -0 lines 0 comments Download
A services/ui/ws/drag_source.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +36 lines, -0 lines 0 comments Download
A services/ui/ws/drag_target_connection.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +90 lines, -0 lines 0 comments Download
M services/ui/ws/event_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +21 lines, -0 lines 0 comments Download
M services/ui/ws/event_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +68 lines, -24 lines 0 comments Download
M services/ui/ws/server_window.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +7 lines, -0 lines 0 comments Download
M services/ui/ws/server_window.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -0 lines 0 comments Download
M services/ui/ws/test_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 3 chunks +39 lines, -0 lines 0 comments Download
M services/ui/ws/test_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +26 lines, -0 lines 0 comments Download
M services/ui/ws/window_manager_access_policy.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +2 lines, -0 lines 0 comments Download
M services/ui/ws/window_manager_access_policy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +11 lines, -0 lines 0 comments Download
M services/ui/ws/window_manager_state.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +9 lines, -0 lines 0 comments Download
M services/ui/ws/window_manager_state.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +18 lines, -0 lines 0 comments Download
M services/ui/ws/window_server.h View 1 2 3 4 5 6 7 8 4 chunks +12 lines, -0 lines 0 comments Download
M services/ui/ws/window_server.cc View 1 2 3 4 5 6 7 8 2 chunks +35 lines, -0 lines 0 comments Download
M services/ui/ws/window_tree.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 chunks +42 lines, -1 line 0 comments Download
M services/ui/ws/window_tree.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 5 chunks +159 lines, -3 lines 0 comments Download
M services/ui/ws/window_tree_client_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +30 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 100 (79 generated)
Elliot Glaysher
This patch isn't really ready for review (the patch works, but it needs significantly more ...
4 years, 4 months ago (2016-08-23 22:31:57 UTC) #15
sky
Good call on asking about the layering violation. I've tried to keep the dependencies of ...
4 years, 4 months ago (2016-08-24 00:08:57 UTC) #18
Elliot Glaysher
OK, this is ready for review. This patch isn't as large as it looks; about ...
4 years, 3 months ago (2016-09-06 19:11:38 UTC) #52
sky
I just looked at the changes to the window server side. Here's some initial feedback. ...
4 years, 3 months ago (2016-09-06 21:11:27 UTC) #53
Elliot Glaysher
https://codereview.chromium.org/2266603002/diff/260001/services/ui/public/interfaces/window_tree.mojom File services/ui/public/interfaces/window_tree.mojom (right): https://codereview.chromium.org/2266603002/diff/260001/services/ui/public/interfaces/window_tree.mojom#newcode283 services/ui/public/interfaces/window_tree.mojom:283: PerformDragDrop(uint32 change_id, On 2016/09/06 21:11:26, sky wrote: > Don't ...
4 years, 3 months ago (2016-09-07 21:42:23 UTC) #56
sky
https://codereview.chromium.org/2266603002/diff/260001/services/ui/ws/event_dispatcher.cc File services/ui/ws/event_dispatcher.cc (right): https://codereview.chromium.org/2266603002/diff/260001/services/ui/ws/event_dispatcher.cc#newcode189 services/ui/ws/event_dispatcher.cc:189: current_drag_drop_operation_.reset(new CurrentDragOperation( On 2016/09/07 21:42:23, Elliot Glaysher wrote: > ...
4 years, 3 months ago (2016-09-07 23:25:29 UTC) #61
Elliot Glaysher
Reset the implicit capture on start and rejected capture requests during drag as discussed in ...
4 years, 3 months ago (2016-09-08 21:18:27 UTC) #66
sky
I looked through more of this. Feel free to stop by if you have questions ...
4 years, 3 months ago (2016-09-08 23:37:21 UTC) #69
Elliot Glaysher
https://codereview.chromium.org/2266603002/diff/320001/services/ui/public/interfaces/window_tree.mojom File services/ui/public/interfaces/window_tree.mojom (right): https://codereview.chromium.org/2266603002/diff/320001/services/ui/public/interfaces/window_tree.mojom#newcode422 services/ui/public/interfaces/window_tree.mojom:422: OnDragStart(uint32 window, On 2016/09/08 23:37:20, sky wrote: > Based ...
4 years, 3 months ago (2016-09-13 00:14:20 UTC) #72
sky
I made it through the whole thing this time. Yay! It's almost there, the following ...
4 years, 3 months ago (2016-09-13 18:15:32 UTC) #75
Elliot Glaysher
https://codereview.chromium.org/2266603002/diff/340001/services/ui/ws/drag_controller.cc File services/ui/ws/drag_controller.cc (right): https://codereview.chromium.org/2266603002/diff/340001/services/ui/ws/drag_controller.cc#newcode198 services/ui/ws/drag_controller.cc:198: // This is the last event in queue; stop ...
4 years, 3 months ago (2016-09-14 22:19:16 UTC) #78
Elliot Glaysher
+tsepez for mojom security review
4 years, 3 months ago (2016-09-14 22:29:26 UTC) #82
sky
https://codereview.chromium.org/2266603002/diff/340001/services/ui/ws/drag_controller.cc File services/ui/ws/drag_controller.cc (right): https://codereview.chromium.org/2266603002/diff/340001/services/ui/ws/drag_controller.cc#newcode198 services/ui/ws/drag_controller.cc:198: // This is the last event in queue; stop ...
4 years, 3 months ago (2016-09-14 22:52:02 UTC) #83
Tom Sepez
Mojom LGTM.
4 years, 3 months ago (2016-09-15 17:07:20 UTC) #84
Elliot Glaysher
https://codereview.chromium.org/2266603002/diff/340001/services/ui/ws/drag_controller.cc File services/ui/ws/drag_controller.cc (right): https://codereview.chromium.org/2266603002/diff/340001/services/ui/ws/drag_controller.cc#newcode198 services/ui/ws/drag_controller.cc:198: // This is the last event in queue; stop ...
4 years, 3 months ago (2016-09-15 17:12:40 UTC) #86
sky
Almost there, mostly minor stuff now. https://codereview.chromium.org/2266603002/diff/340001/services/ui/ws/window_server.cc File services/ui/ws/window_server.cc (right): https://codereview.chromium.org/2266603002/diff/340001/services/ui/ws/window_server.cc#newcode504 services/ui/ws/window_server.cc:504: uint32_t WindowServer::GetCurrentDragLoopChangeId() { ...
4 years, 3 months ago (2016-09-15 18:10:47 UTC) #88
Elliot Glaysher
https://codereview.chromium.org/2266603002/diff/380001/services/ui/ws/drag_controller.cc File services/ui/ws/drag_controller.cc (right): https://codereview.chromium.org/2266603002/diff/380001/services/ui/ws/drag_controller.cc#newcode140 services/ui/ws/drag_controller.cc:140: size_t DragController::GetSizeOfQueueForWindow(ServerWindow* window) { On 2016/09/15 18:10:47, sky wrote: ...
4 years, 3 months ago (2016-09-15 19:14:33 UTC) #91
sky
LGTM
4 years, 3 months ago (2016-09-15 22:00:23 UTC) #94
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2266603002/400001
4 years, 3 months ago (2016-09-15 22:02:42 UTC) #97
commit-bot: I haz the power
Committed patchset #21 (id:400001)
4 years, 3 months ago (2016-09-15 22:08:59 UTC) #98
commit-bot: I haz the power
4 years, 3 months ago (2016-09-15 22:10:54 UTC) #100
Message was sent while issue was closed.
Patchset 21 (id:??) landed as
https://crrev.com/0873818c95cc607d8afe5a16b345fafe4109a735
Cr-Commit-Position: refs/heads/master@{#419005}

Powered by Google App Engine
This is Rietveld 408576698