| 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 28 matching lines...) Expand all Loading... |
| 39 virtual ServerWindow* GetFocusedWindowForEventDispatcher() = 0; | 39 virtual ServerWindow* GetFocusedWindowForEventDispatcher() = 0; |
| 40 | 40 |
| 41 // Called when capture should be set on the native display. |window| is the | 41 // Called when capture should be set on the native display. |window| is the |
| 42 // window capture is being set on. | 42 // window capture is being set on. |
| 43 virtual void SetNativeCapture(ServerWindow* window) = 0; | 43 virtual void SetNativeCapture(ServerWindow* window) = 0; |
| 44 | 44 |
| 45 // Called when the native display is having capture released. There is no | 45 // Called when the native display is having capture released. There is no |
| 46 // longer a ServerWindow holding capture. | 46 // longer a ServerWindow holding capture. |
| 47 virtual void ReleaseNativeCapture() = 0; | 47 virtual void ReleaseNativeCapture() = 0; |
| 48 | 48 |
| 49 // Called when EventDispatcher has a new value for the cursor and our |
| 50 // delegate should perform the native updates. |
| 51 virtual void UpdateNativeCursorFromDispatcher() = 0; |
| 52 |
| 49 // Called when |window| has lost capture. The native display may still be | 53 // Called when |window| has lost capture. The native display may still be |
| 50 // holding capture. The delegate should not change native display capture. | 54 // holding capture. The delegate should not change native display capture. |
| 51 // ReleaseNativeCapture() is invoked if appropriate. | 55 // ReleaseNativeCapture() is invoked if appropriate. |
| 52 virtual void OnCaptureChanged(ServerWindow* new_capture, | 56 virtual void OnCaptureChanged(ServerWindow* new_capture, |
| 53 ServerWindow* old_capture) = 0; | 57 ServerWindow* old_capture) = 0; |
| 54 | 58 |
| 55 virtual void OnMouseCursorLocationChanged(const gfx::Point& point) = 0; | 59 virtual void OnMouseCursorLocationChanged(const gfx::Point& point) = 0; |
| 56 | 60 |
| 57 // Dispatches an event to the specific client. | 61 // Dispatches an event to the specific client. |
| 58 virtual void DispatchInputEventToWindow(ServerWindow* target, | 62 virtual void DispatchInputEventToWindow(ServerWindow* target, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 76 virtual void OnEventTargetNotFound(const ui::Event& event) = 0; | 80 virtual void OnEventTargetNotFound(const ui::Event& event) = 0; |
| 77 | 81 |
| 78 protected: | 82 protected: |
| 79 virtual ~EventDispatcherDelegate() {} | 83 virtual ~EventDispatcherDelegate() {} |
| 80 }; | 84 }; |
| 81 | 85 |
| 82 } // namespace ws | 86 } // namespace ws |
| 83 } // namespace ui | 87 } // namespace ui |
| 84 | 88 |
| 85 #endif // SERVICES_UI_WS_EVENT_DISPATCHER_DELEGATE_H_ | 89 #endif // SERVICES_UI_WS_EVENT_DISPATCHER_DELEGATE_H_ |
| OLD | NEW |