OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "services/ui/ws/event_dispatcher.h" | 5 #include "services/ui/ws/event_dispatcher.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 } | 167 } |
168 | 168 |
169 return true; | 169 return true; |
170 } | 170 } |
171 | 171 |
172 void EventDispatcher::SetDragDropSourceWindow( | 172 void EventDispatcher::SetDragDropSourceWindow( |
173 DragSource* drag_source, | 173 DragSource* drag_source, |
174 ServerWindow* window, | 174 ServerWindow* window, |
175 DragTargetConnection* source_connection, | 175 DragTargetConnection* source_connection, |
176 int32_t drag_pointer, | 176 int32_t drag_pointer, |
177 mojo::Map<mojo::String, mojo::Array<uint8_t>> mime_data, | 177 std::unordered_map<std::string, std::vector<uint8_t>> mime_data, |
178 uint32_t drag_operations) { | 178 uint32_t drag_operations) { |
179 CancelImplicitCaptureExcept(nullptr); | 179 CancelImplicitCaptureExcept(nullptr); |
180 drag_controller_ = base::MakeUnique<DragController>( | 180 drag_controller_ = base::MakeUnique<DragController>( |
181 this, drag_source, window, source_connection, drag_pointer, | 181 this, drag_source, window, source_connection, drag_pointer, |
182 std::move(mime_data), drag_operations); | 182 std::move(mime_data), drag_operations); |
183 } | 183 } |
184 | 184 |
185 void EventDispatcher::CancelDragDrop() { | 185 void EventDispatcher::CancelDragDrop() { |
186 if (drag_controller_) | 186 if (drag_controller_) |
187 drag_controller_->Cancel(); | 187 drag_controller_->Cancel(); |
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 if (mouse_cursor_source_window_ == window) | 617 if (mouse_cursor_source_window_ == window) |
618 mouse_cursor_source_window_ = nullptr; | 618 mouse_cursor_source_window_ = nullptr; |
619 } | 619 } |
620 | 620 |
621 void EventDispatcher::OnDragCursorUpdated() { | 621 void EventDispatcher::OnDragCursorUpdated() { |
622 delegate_->UpdateNativeCursorFromDispatcher(); | 622 delegate_->UpdateNativeCursorFromDispatcher(); |
623 } | 623 } |
624 | 624 |
625 } // namespace ws | 625 } // namespace ws |
626 } // namespace ui | 626 } // namespace ui |
OLD | NEW |