Chromium Code Reviews| 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_DELEGATE_H_ | 5 #ifndef SERVICES_UI_WS_EVENT_DISPATCHER_DELEGATE_H_ |
| 6 #define SERVICES_UI_WS_EVENT_DISPATCHER_DELEGATE_H_ | 6 #define SERVICES_UI_WS_EVENT_DISPATCHER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "services/ui/common/types.h" | 10 #include "services/ui/common/types.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 ServerWindow* old_capture) = 0; | 56 ServerWindow* old_capture) = 0; |
| 57 | 57 |
| 58 virtual void OnMouseCursorLocationChanged(const gfx::Point& point) = 0; | 58 virtual void OnMouseCursorLocationChanged(const gfx::Point& point) = 0; |
| 59 | 59 |
| 60 // Dispatches an event to the specific client. | 60 // Dispatches an event to the specific client. |
| 61 virtual void DispatchInputEventToWindow(ServerWindow* target, | 61 virtual void DispatchInputEventToWindow(ServerWindow* target, |
| 62 ClientSpecificId client_id, | 62 ClientSpecificId client_id, |
| 63 const ui::Event& event, | 63 const ui::Event& event, |
| 64 Accelerator* accelerator) = 0; | 64 Accelerator* accelerator) = 0; |
| 65 | 65 |
| 66 virtual void ProcessNextEventFromQueue() = 0; | |
|
sky
2017/05/22 16:06:56
Add description.
riajiang
2017/05/29 23:38:07
Done.
| |
| 67 | |
| 66 // Returns the id of the client to send events to. |in_nonclient_area| is | 68 // Returns the id of the client to send events to. |in_nonclient_area| is |
| 67 // true if the event occurred in the non-client area of the window. | 69 // true if the event occurred in the non-client area of the window. |
| 68 virtual ClientSpecificId GetEventTargetClientId(const ServerWindow* window, | 70 virtual ClientSpecificId GetEventTargetClientId(const ServerWindow* window, |
| 69 bool in_nonclient_area) = 0; | 71 bool in_nonclient_area) = 0; |
| 70 | 72 |
| 71 // Returns the window to start searching from at the specified location, or | 73 // Returns the window to start searching from at the specified location, or |
| 72 // null if there is a no window containing |location|. |location| should be in | 74 // null if there is a no window containing |location|. |location| should be in |
| 73 // screen coordinates and if a window is returned then |location| will be | 75 // screen coordinates and if a window is returned then |location| will be |
| 74 // updated to be relative to the origin of the window. | 76 // updated to be relative to the origin of the window. |
| 75 virtual ServerWindow* GetRootWindowContaining(gfx::Point* location) = 0; | 77 virtual ServerWindow* GetRootWindowContaining(gfx::Point* location) = 0; |
| 76 | 78 |
| 77 // Called when event dispatch could not find a target. OnAccelerator may still | 79 // Called when event dispatch could not find a target. OnAccelerator may still |
| 78 // be called. | 80 // be called. |
| 79 virtual void OnEventTargetNotFound(const ui::Event& event) = 0; | 81 virtual void OnEventTargetNotFound(const ui::Event& event) = 0; |
| 80 | 82 |
| 81 protected: | 83 protected: |
| 82 virtual ~EventDispatcherDelegate() {} | 84 virtual ~EventDispatcherDelegate() {} |
| 83 }; | 85 }; |
| 84 | 86 |
| 85 } // namespace ws | 87 } // namespace ws |
| 86 } // namespace ui | 88 } // namespace ui |
| 87 | 89 |
| 88 #endif // SERVICES_UI_WS_EVENT_DISPATCHER_DELEGATE_H_ | 90 #endif // SERVICES_UI_WS_EVENT_DISPATCHER_DELEGATE_H_ |
| OLD | NEW |