OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ | 5 #ifndef UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ |
6 #define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ | 6 #define UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/display/types/display_snapshot.h" | 9 #include "ui/display/types/display_snapshot.h" |
10 #include "ui/events/platform/platform_event_dispatcher.h" | 10 #include "ui/events/platform/platform_event_dispatcher.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 EventFactoryEvdev* event_factory, | 32 EventFactoryEvdev* event_factory, |
33 DriCursor* cursor, | 33 DriCursor* cursor, |
34 DriWindowManager* window_manager, | 34 DriWindowManager* window_manager, |
35 DisplayManager* display_manager); | 35 DisplayManager* display_manager); |
36 ~DriWindow() override; | 36 ~DriWindow() override; |
37 | 37 |
38 void Initialize(); | 38 void Initialize(); |
39 | 39 |
40 gfx::AcceleratedWidget GetAcceleratedWidget(); | 40 gfx::AcceleratedWidget GetAcceleratedWidget(); |
41 | 41 |
| 42 gfx::Rect GetCursorConfinedBounds() const; |
| 43 |
42 // PlatformWindow: | 44 // PlatformWindow: |
43 void Show() override; | 45 void Show() override; |
44 void Hide() override; | 46 void Hide() override; |
45 void Close() override; | 47 void Close() override; |
46 void SetBounds(const gfx::Rect& bounds) override; | 48 void SetBounds(const gfx::Rect& bounds) override; |
47 gfx::Rect GetBounds() override; | 49 gfx::Rect GetBounds() override; |
48 void SetCapture() override; | 50 void SetCapture() override; |
49 void ReleaseCapture() override; | 51 void ReleaseCapture() override; |
50 void ToggleFullscreen() override; | 52 void ToggleFullscreen() override; |
51 void Maximize() override; | 53 void Maximize() override; |
52 void Minimize() override; | 54 void Minimize() override; |
53 void Restore() override; | 55 void Restore() override; |
54 void SetCursor(PlatformCursor cursor) override; | 56 void SetCursor(PlatformCursor cursor) override; |
55 void MoveCursorTo(const gfx::Point& location) override; | 57 void MoveCursorTo(const gfx::Point& location) override; |
| 58 void ConfineCursorToBounds(const gfx::Rect& bounds) override; |
56 | 59 |
57 // PlatformEventDispatcher: | 60 // PlatformEventDispatcher: |
58 bool CanDispatchEvent(const PlatformEvent& event) override; | 61 bool CanDispatchEvent(const PlatformEvent& event) override; |
59 uint32_t DispatchEvent(const PlatformEvent& event) override; | 62 uint32_t DispatchEvent(const PlatformEvent& event) override; |
60 | 63 |
61 // ChannelObserver: | 64 // ChannelObserver: |
62 void OnChannelEstablished() override; | 65 void OnChannelEstablished() override; |
63 void OnChannelDestroyed() override; | 66 void OnChannelDestroyed() override; |
64 | 67 |
65 private: | 68 private: |
66 void SendBoundsChange(); | 69 void SendBoundsChange(); |
67 | 70 |
68 PlatformWindowDelegate* delegate_; // Not owned. | 71 PlatformWindowDelegate* delegate_; // Not owned. |
69 DriGpuPlatformSupportHost* sender_; // Not owned. | 72 DriGpuPlatformSupportHost* sender_; // Not owned. |
70 EventFactoryEvdev* event_factory_; // Not owned. | 73 EventFactoryEvdev* event_factory_; // Not owned. |
71 DriCursor* cursor_; // Not owned. | 74 DriCursor* cursor_; // Not owned. |
72 DriWindowManager* window_manager_; // Not owned. | 75 DriWindowManager* window_manager_; // Not owned. |
73 DisplayManager* display_manager_; // Not owned. | 76 DisplayManager* display_manager_; // Not owned. |
74 | 77 |
75 gfx::Rect bounds_; | 78 gfx::Rect bounds_; |
76 gfx::AcceleratedWidget widget_; | 79 gfx::AcceleratedWidget widget_; |
77 | 80 |
| 81 gfx::Rect cursor_confined_bounds_; |
| 82 |
78 DISALLOW_COPY_AND_ASSIGN(DriWindow); | 83 DISALLOW_COPY_AND_ASSIGN(DriWindow); |
79 }; | 84 }; |
80 | 85 |
81 } // namespace ui | 86 } // namespace ui |
82 | 87 |
83 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ | 88 #endif // UI_OZONE_PLATFORM_DRI_DRI_WINDOW_H_ |
OLD | NEW |