OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_WAYLAND_WAYLAND_WINDOW_H_ | 5 #ifndef UI_OZONE_PLATFORM_WAYLAND_WAYLAND_WINDOW_H_ |
6 #define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_WINDOW_H_ | 6 #define UI_OZONE_PLATFORM_WAYLAND_WAYLAND_WINDOW_H_ |
7 | 7 |
8 #include "ui/gfx/geometry/rect.h" | 8 #include "ui/gfx/geometry/rect.h" |
9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
10 #include "ui/ozone/platform/wayland/wayland_object.h" | 10 #include "ui/ozone/platform/wayland/wayland_object.h" |
11 #include "ui/platform_window/platform_window.h" | 11 #include "ui/platform_window/platform_window.h" |
12 | 12 |
13 namespace ui { | 13 namespace ui { |
14 | 14 |
15 class WaylandDisplay; | 15 class WaylandDisplay; |
16 | 16 |
17 class WaylandWindow : public PlatformWindow { | 17 class WaylandWindow : public PlatformWindow { |
18 public: | 18 public: |
19 WaylandWindow(PlatformWindowDelegate* delegate, | 19 WaylandWindow(PlatformWindowDelegate* delegate, |
20 WaylandDisplay* display, | 20 WaylandDisplay* display, |
21 const gfx::Rect& bounds); | 21 const gfx::Rect& bounds); |
22 ~WaylandWindow() override; | 22 ~WaylandWindow() override; |
23 | 23 |
24 bool Initialize(); | 24 bool Initialize(); |
25 | 25 |
26 wl_surface* GetSurface(); | 26 wl_surface* surface() { return surface_.get(); } |
27 gfx::AcceleratedWidget GetWidget(); | |
28 | 27 |
29 // Apply the bounds specified in the most recent configure event. This should | 28 // Apply the bounds specified in the most recent configure event. This should |
30 // be called after processing all pending events in the wayland connection. | 29 // be called after processing all pending events in the wayland connection. |
31 void ApplyPendingBounds(); | 30 void ApplyPendingBounds(); |
32 | 31 |
33 // PlatformWindow | 32 // PlatformWindow |
34 void Show() override; | 33 void Show() override; |
35 void Hide() override; | 34 void Hide() override; |
36 void Close() override; | 35 void Close() override; |
37 void SetBounds(const gfx::Rect& bounds) override; | 36 void SetBounds(const gfx::Rect& bounds) override; |
(...skipping 29 matching lines...) Expand all Loading... |
67 gfx::Rect bounds_; | 66 gfx::Rect bounds_; |
68 gfx::Rect pending_bounds_; | 67 gfx::Rect pending_bounds_; |
69 uint32_t pending_configure_serial_; | 68 uint32_t pending_configure_serial_; |
70 | 69 |
71 DISALLOW_COPY_AND_ASSIGN(WaylandWindow); | 70 DISALLOW_COPY_AND_ASSIGN(WaylandWindow); |
72 }; | 71 }; |
73 | 72 |
74 } // namespace ui | 73 } // namespace ui |
75 | 74 |
76 #endif // UI_OZONE_PLATFORM_WAYLAND_WAYLAND_WINDOW_H_ | 75 #endif // UI_OZONE_PLATFORM_WAYLAND_WAYLAND_WINDOW_H_ |
OLD | NEW |