| 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 #ifndef SERVICES_UI_WS_EVENT_DISPATCHER_H_ | 5 #ifndef SERVICES_UI_WS_EVENT_DISPATCHER_H_ |
| 6 #define SERVICES_UI_WS_EVENT_DISPATCHER_H_ | 6 #define SERVICES_UI_WS_EVENT_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| 11 #include <memory> | 11 #include <memory> |
| 12 #include <utility> | 12 #include <utility> |
| 13 | 13 |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "services/ui/common/types.h" | 15 #include "services/ui/common/types.h" |
| 16 #include "services/ui/public/interfaces/cursor.mojom.h" |
| 16 #include "services/ui/public/interfaces/event_matcher.mojom.h" | 17 #include "services/ui/public/interfaces/event_matcher.mojom.h" |
| 17 #include "services/ui/ws/drag_cursor_updater.h" | 18 #include "services/ui/ws/drag_cursor_updater.h" |
| 18 #include "services/ui/ws/modal_window_controller.h" | 19 #include "services/ui/ws/modal_window_controller.h" |
| 19 #include "services/ui/ws/server_window_observer.h" | 20 #include "services/ui/ws/server_window_observer.h" |
| 20 #include "ui/gfx/geometry/rect_f.h" | 21 #include "ui/gfx/geometry/rect_f.h" |
| 21 | 22 |
| 22 namespace ui { | 23 namespace ui { |
| 23 class Event; | 24 class Event; |
| 24 class KeyEvent; | 25 class KeyEvent; |
| 25 class LocatedEvent; | 26 class LocatedEvent; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 // any events to the delegate. | 58 // any events to the delegate. |
| 58 void Reset(); | 59 void Reset(); |
| 59 | 60 |
| 60 void SetMousePointerScreenLocation(const gfx::Point& screen_location); | 61 void SetMousePointerScreenLocation(const gfx::Point& screen_location); |
| 61 const gfx::Point& mouse_pointer_last_location() const { | 62 const gfx::Point& mouse_pointer_last_location() const { |
| 62 return mouse_pointer_last_location_; | 63 return mouse_pointer_last_location_; |
| 63 } | 64 } |
| 64 | 65 |
| 65 // If we still have the window of the last mouse move, returns true and sets | 66 // If we still have the window of the last mouse move, returns true and sets |
| 66 // the current cursor to use to |cursor_out|. | 67 // the current cursor to use to |cursor_out|. |
| 67 bool GetCurrentMouseCursor(int32_t* cursor_out); | 68 bool GetCurrentMouseCursor(ui::mojom::Cursor* cursor_out); |
| 68 | 69 |
| 69 // |capture_window_| will receive all input. See window_tree.mojom for | 70 // |capture_window_| will receive all input. See window_tree.mojom for |
| 70 // details. | 71 // details. |
| 71 ServerWindow* capture_window() { return capture_window_; } | 72 ServerWindow* capture_window() { return capture_window_; } |
| 72 const ServerWindow* capture_window() const { return capture_window_; } | 73 const ServerWindow* capture_window() const { return capture_window_; } |
| 73 // Setting capture can fail if the window is blocked by a modal window | 74 // Setting capture can fail if the window is blocked by a modal window |
| 74 // (indicated by returning |false|). | 75 // (indicated by returning |false|). |
| 75 bool SetCaptureWindow(ServerWindow* capture_window, | 76 bool SetCaptureWindow(ServerWindow* capture_window, |
| 76 ClientSpecificId client_id); | 77 ClientSpecificId client_id); |
| 77 | 78 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 AcceleratorMatchPhase::ANY; | 271 AcceleratorMatchPhase::ANY; |
| 271 #endif | 272 #endif |
| 272 | 273 |
| 273 DISALLOW_COPY_AND_ASSIGN(EventDispatcher); | 274 DISALLOW_COPY_AND_ASSIGN(EventDispatcher); |
| 274 }; | 275 }; |
| 275 | 276 |
| 276 } // namespace ws | 277 } // namespace ws |
| 277 } // namespace ui | 278 } // namespace ui |
| 278 | 279 |
| 279 #endif // SERVICES_UI_WS_EVENT_DISPATCHER_H_ | 280 #endif // SERVICES_UI_WS_EVENT_DISPATCHER_H_ |
| OLD | NEW |