| 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 "components/mus/ws/event_dispatcher.h" | 5 #include "components/mus/ws/event_dispatcher.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "components/mus/ws/accelerator.h" | 10 #include "components/mus/ws/accelerator.h" |
| 11 #include "components/mus/ws/display.h" | 11 #include "components/mus/ws/display.h" |
| 12 #include "components/mus/ws/event_dispatcher_delegate.h" | 12 #include "components/mus/ws/event_dispatcher_delegate.h" |
| 13 #include "components/mus/ws/server_window.h" | 13 #include "components/mus/ws/server_window.h" |
| 14 #include "components/mus/ws/server_window_delegate.h" | 14 #include "components/mus/ws/server_window_delegate.h" |
| 15 #include "components/mus/ws/window_coordinate_conversions.h" | 15 #include "components/mus/ws/window_coordinate_conversions.h" |
| 16 #include "components/mus/ws/window_finder.h" | 16 #include "components/mus/ws/window_finder.h" |
| 17 #include "ui/events/event_utils.h" | 17 #include "ui/events/event_utils.h" |
| 18 #include "ui/events/mojo/input_events_type_converters.h" | |
| 19 #include "ui/gfx/geometry/point.h" | 18 #include "ui/gfx/geometry/point.h" |
| 20 #include "ui/gfx/geometry/point_conversions.h" | 19 #include "ui/gfx/geometry/point_conversions.h" |
| 21 | 20 |
| 22 namespace mus { | 21 namespace mus { |
| 23 namespace ws { | 22 namespace ws { |
| 24 namespace { | 23 namespace { |
| 25 | 24 |
| 26 bool IsOnlyOneMouseButtonDown(int flags) { | 25 bool IsOnlyOneMouseButtonDown(int flags) { |
| 27 const uint32_t button_only_flags = | 26 const uint32_t button_only_flags = |
| 28 flags & (ui::EF_LEFT_MOUSE_BUTTON | ui::EF_MIDDLE_MOUSE_BUTTON | | 27 flags & (ui::EF_LEFT_MOUSE_BUTTON | ui::EF_MIDDLE_MOUSE_BUTTON | |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 | 528 |
| 530 void EventDispatcher::OnWindowDestroyed(ServerWindow* window) { | 529 void EventDispatcher::OnWindowDestroyed(ServerWindow* window) { |
| 531 CancelPointerEventsToTarget(window); | 530 CancelPointerEventsToTarget(window); |
| 532 | 531 |
| 533 if (mouse_cursor_source_window_ == window) | 532 if (mouse_cursor_source_window_ == window) |
| 534 mouse_cursor_source_window_ = nullptr; | 533 mouse_cursor_source_window_ = nullptr; |
| 535 } | 534 } |
| 536 | 535 |
| 537 } // namespace ws | 536 } // namespace ws |
| 538 } // namespace mus | 537 } // namespace mus |
| OLD | NEW |