OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/drag_controller.h" | 5 #include "services/ui/ws/drag_controller.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <memory> | 8 #include <memory> |
9 #include <queue> | 9 #include <queue> |
10 #include <utility> | 10 #include <utility> |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 position, position, ui::EventTimeForNow(), flags, 0)); | 174 position, position, ui::EventTimeForNow(), flags, 0)); |
175 drag_operation_->DispatchPointerEvent(event, | 175 drag_operation_->DispatchPointerEvent(event, |
176 window ? window->window() : nullptr); | 176 window ? window->window() : nullptr); |
177 } | 177 } |
178 | 178 |
179 void DispatchDragWithPointer(DragTestWindow* window, | 179 void DispatchDragWithPointer(DragTestWindow* window, |
180 int32_t drag_pointer, | 180 int32_t drag_pointer, |
181 bool mouse_released, | 181 bool mouse_released, |
182 uint32_t flags, | 182 uint32_t flags, |
183 const gfx::Point& position) { | 183 const gfx::Point& position) { |
184 ui::PointerEvent event(ET_POINTER_DOWN, position, position, flags, | 184 ui::PointerEvent event( |
185 drag_pointer, 0, PointerDetails(), | 185 ET_POINTER_DOWN, position, position, flags, 0, |
186 base::TimeTicks()); | 186 PointerDetails(ui::EventPointerType::POINTER_TYPE_MOUSE, drag_pointer), |
| 187 base::TimeTicks()); |
187 drag_operation_->DispatchPointerEvent(event, | 188 drag_operation_->DispatchPointerEvent(event, |
188 window ? window->window() : nullptr); | 189 window ? window->window() : nullptr); |
189 } | 190 } |
190 | 191 |
191 void OnTestWindowDestroyed(DragTestWindow* test_window) { | 192 void OnTestWindowDestroyed(DragTestWindow* test_window) { |
192 drag_operation_->OnWillDestroyDragTargetConnection(test_window); | 193 drag_operation_->OnWillDestroyDragTargetConnection(test_window); |
193 server_window_by_id_.erase(test_window->window()->id()); | 194 server_window_by_id_.erase(test_window->window()->id()); |
194 connection_by_window_.erase(test_window->window()); | 195 connection_by_window_.erase(test_window->window()); |
195 } | 196 } |
196 | 197 |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 | 678 |
678 // Window 2 responding negatively to its queued messages shouldn't change the | 679 // Window 2 responding negatively to its queued messages shouldn't change the |
679 // cursor. | 680 // cursor. |
680 window2->Respond(false); | 681 window2->Respond(false); |
681 | 682 |
682 EXPECT_EQ(ui::mojom::Cursor::COPY, cursor()); | 683 EXPECT_EQ(ui::mojom::Cursor::COPY, cursor()); |
683 } | 684 } |
684 | 685 |
685 } // namespace ws | 686 } // namespace ws |
686 } // namespace ui | 687 } // namespace ui |
OLD | NEW |