OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_AURA_WINDOW_TREE_HOST_OZONE_H_ | 5 #ifndef UI_AURA_WINDOW_TREE_HOST_OZONE_H_ |
6 #define UI_AURA_WINDOW_TREE_HOST_OZONE_H_ | 6 #define UI_AURA_WINDOW_TREE_HOST_OZONE_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/aura/window_tree_host.h" | 9 #include "ui/aura/window_tree_host.h" |
10 #include "ui/events/event_source.h" | 10 #include "ui/events/event_source.h" |
11 #include "ui/gfx/rect.h" | 11 #include "ui/gfx/rect.h" |
12 #include "ui/platform_window/platform_window_delegate.h" | 12 #include "ui/platform_window/platform_window_delegate.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 class PlatformWindow; | 15 class PlatformWindow; |
16 } | 16 } |
17 | 17 |
18 namespace aura { | 18 namespace aura { |
19 | 19 |
20 class AURA_EXPORT WindowTreeHostOzone : public WindowTreeHost, | 20 class AURA_EXPORT WindowTreeHostOzone : public WindowTreeHost, |
21 public ui::EventSource, | 21 public ui::EventSource, |
22 public ui::PlatformWindowDelegate { | 22 public ui::PlatformWindowDelegate { |
23 public: | 23 public: |
24 explicit WindowTreeHostOzone(const gfx::Rect& bounds); | 24 explicit WindowTreeHostOzone(const gfx::Rect& bounds); |
25 virtual ~WindowTreeHostOzone(); | 25 virtual ~WindowTreeHostOzone(); |
26 | 26 |
27 private: | |
28 // ui::PlatformWindowDelegate: | |
29 virtual void OnBoundsChanged(const gfx::Rect&) override; | |
30 virtual void OnDamageRect(const gfx::Rect& damaged_region) override; | |
31 virtual void DispatchEvent(ui::Event* event) override; | |
32 virtual void OnCloseRequest() override; | |
33 virtual void OnClosed() override; | |
34 virtual void OnWindowStateChanged(ui::PlatformWindowState new_state) override; | |
35 virtual void OnLostCapture() override; | |
36 virtual void OnAcceleratedWidgetAvailable( | |
37 gfx::AcceleratedWidget widget) override; | |
38 virtual void OnActivationChanged(bool active) override; | |
39 | |
40 // WindowTreeHost: | 27 // WindowTreeHost: |
dnicoara
2014/11/10 21:44:06
Do all of these need to be public? I think you onl
llandwerlin-old
2014/11/11 11:03:53
Done.
| |
41 virtual ui::EventSource* GetEventSource() override; | 28 virtual ui::EventSource* GetEventSource() override; |
42 virtual gfx::AcceleratedWidget GetAcceleratedWidget() override; | 29 virtual gfx::AcceleratedWidget GetAcceleratedWidget() override; |
43 virtual void Show() override; | 30 virtual void Show() override; |
44 virtual void Hide() override; | 31 virtual void Hide() override; |
45 virtual gfx::Rect GetBounds() const override; | 32 virtual gfx::Rect GetBounds() const override; |
46 virtual void SetBounds(const gfx::Rect& bounds) override; | 33 virtual void SetBounds(const gfx::Rect& bounds) override; |
47 virtual gfx::Point GetLocationOnNativeScreen() const override; | 34 virtual gfx::Point GetLocationOnNativeScreen() const override; |
48 virtual void SetCapture() override; | 35 virtual void SetCapture() override; |
49 virtual void ReleaseCapture() override; | 36 virtual void ReleaseCapture() override; |
50 virtual void SetCursorNative(gfx::NativeCursor cursor_type) override; | 37 virtual void SetCursorNative(gfx::NativeCursor cursor_type) override; |
51 virtual void MoveCursorToNative(const gfx::Point& location) override; | 38 virtual void MoveCursorToNative(const gfx::Point& location) override; |
52 virtual void OnCursorVisibilityChangedNative(bool show) override; | 39 virtual void OnCursorVisibilityChangedNative(bool show) override; |
53 | 40 |
41 private: | |
42 // ui::PlatformWindowDelegate: | |
43 virtual void OnBoundsChanged(const gfx::Rect&) override; | |
44 virtual void OnDamageRect(const gfx::Rect& damaged_region) override; | |
45 virtual void DispatchEvent(ui::Event* event) override; | |
46 virtual void OnCloseRequest() override; | |
47 virtual void OnClosed() override; | |
48 virtual void OnWindowStateChanged(ui::PlatformWindowState new_state) override; | |
49 virtual void OnLostCapture() override; | |
50 virtual void OnAcceleratedWidgetAvailable( | |
51 gfx::AcceleratedWidget widget) override; | |
52 virtual void OnActivationChanged(bool active) override; | |
53 | |
54 // ui::EventSource overrides. | 54 // ui::EventSource overrides. |
55 virtual ui::EventProcessor* GetEventProcessor() override; | 55 virtual ui::EventProcessor* GetEventProcessor() override; |
56 | 56 |
57 // Platform-specific part of this WindowTreeHost. | 57 // Platform-specific part of this WindowTreeHost. |
58 scoped_ptr<ui::PlatformWindow> platform_window_; | 58 scoped_ptr<ui::PlatformWindow> platform_window_; |
59 | 59 |
60 // The identifier used to create a compositing surface. | 60 // The identifier used to create a compositing surface. |
61 gfx::AcceleratedWidget widget_; | 61 gfx::AcceleratedWidget widget_; |
62 | 62 |
63 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostOzone); | 63 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostOzone); |
64 }; | 64 }; |
65 | 65 |
66 } // namespace aura | 66 } // namespace aura |
67 | 67 |
68 #endif // UI_AURA_WINDOW_TREE_HOST_OZONE_H_ | 68 #endif // UI_AURA_WINDOW_TREE_HOST_OZONE_H_ |
OLD | NEW |