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

Unified Diff: ui/aura/mus/drag_drop_controller_mus.cc

Issue 2739213003: aura-mus: wire up drag and drop. (Closed)
Patch Set: msvc doesn't understand that this is impossible. Created 3 years, 9 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
Index: ui/aura/mus/drag_drop_controller_mus.cc
diff --git a/ui/aura/mus/drag_drop_controller_mus.cc b/ui/aura/mus/drag_drop_controller_mus.cc
index a82841c80c09d3adf4b280a76d33b85f18a78242..ccb364dd4101763b0c30907fe863955c8123fbe4 100644
--- a/ui/aura/mus/drag_drop_controller_mus.cc
+++ b/ui/aura/mus/drag_drop_controller_mus.cc
@@ -137,23 +137,25 @@ int DragDropControllerMus::StartDragAndDrop(
// we start showing an image representation of the drag under he cursor.
base::RunLoop run_loop;
- WindowMus* source_window_mus = WindowMus::Get(source_window);
+ WindowMus* root_window_mus = WindowMus::Get(root_window);
const uint32_t change_id =
- drag_drop_controller_host_->CreateChangeIdForDrag(source_window_mus);
- CurrentDragState current_drag_state = {source_window_mus->server_id(),
+ drag_drop_controller_host_->CreateChangeIdForDrag(root_window_mus);
+ CurrentDragState current_drag_state = {root_window_mus->server_id(),
change_id, ui::mojom::kDropEffectNone,
data, run_loop.QuitClosure()};
base::AutoReset<CurrentDragState*> resetter(&current_drag_state_,
&current_drag_state);
+
+ base::MessageLoop* loop = base::MessageLoop::current();
+ base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop);
+
std::map<std::string, std::vector<uint8_t>> drag_data =
static_cast<const aura::OSExchangeDataProviderMus&>(data.provider())
.GetData();
- window_tree_->PerformDragDrop(change_id, source_window_mus->server_id(),
+ window_tree_->PerformDragDrop(change_id, root_window_mus->server_id(),
mojo::MapToUnorderedMap(drag_data),
drag_operations);
- base::MessageLoop* loop = base::MessageLoop::current();
- base::MessageLoop::ScopedNestableTaskAllower allow_nested(loop);
run_loop.Run();
return current_drag_state.completed_action;

Powered by Google App Engine
This is Rietveld 408576698