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 <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "ui/aura/window_tree_host.h" | 11 #include "ui/aura/window_tree_host.h" |
12 #include "ui/events/event_source.h" | 12 #include "ui/events/event_source.h" |
13 #include "ui/events/platform/platform_event_dispatcher.h" | 13 #include "ui/events/platform/platform_event_dispatcher.h" |
14 #include "ui/gfx/insets.h" | 14 #include "ui/gfx/insets.h" |
15 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
16 #include "ui/platform_window/platform_window_delegate.h" | |
17 | |
18 namespace ui { | |
19 class PlatformWindow; | |
20 } | |
16 | 21 |
17 namespace aura { | 22 namespace aura { |
18 | 23 |
19 class AURA_EXPORT WindowTreeHostOzone : public WindowTreeHost, | 24 class AURA_EXPORT WindowTreeHostOzone : public WindowTreeHost, |
20 public ui::EventSource, | 25 public ui::EventSource, |
21 public ui::PlatformEventDispatcher { | 26 public ui::PlatformEventDispatcher, |
sadrul
2014/07/14 22:58:07
It should no longer be necessary for WindowTreeHos
spang
2014/07/14 23:17:41
Done.
| |
27 public ui::PlatformWindowDelegate { | |
22 public: | 28 public: |
23 explicit WindowTreeHostOzone(const gfx::Rect& bounds); | 29 explicit WindowTreeHostOzone(const gfx::Rect& bounds); |
24 virtual ~WindowTreeHostOzone(); | 30 virtual ~WindowTreeHostOzone(); |
25 | 31 |
26 private: | 32 private: |
27 // ui::PlatformEventDispatcher: | 33 // ui::PlatformEventDispatcher: |
28 virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE; | 34 virtual bool CanDispatchEvent(const ui::PlatformEvent& event) OVERRIDE; |
29 virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE; | 35 virtual uint32_t DispatchEvent(const ui::PlatformEvent& event) OVERRIDE; |
30 | 36 |
37 // ui::PlatformWindowDelegate: | |
38 virtual void OnBoundsChanged(const gfx::Rect&) OVERRIDE; | |
39 virtual void OnDamageRect(const gfx::Rect& damaged_region) OVERRIDE; | |
40 virtual void DispatchEvent(ui::Event* event) OVERRIDE; | |
41 virtual void OnCloseRequest() OVERRIDE; | |
42 virtual void OnClosed() OVERRIDE; | |
43 virtual void OnWindowStateChanged(ui::PlatformWindowState new_state) OVERRIDE; | |
44 virtual void OnLostCapture() OVERRIDE; | |
45 virtual void OnAcceleratedWidgetAvailable( | |
46 gfx::AcceleratedWidget widget) OVERRIDE; | |
47 | |
31 // WindowTreeHost: | 48 // WindowTreeHost: |
32 virtual ui::EventSource* GetEventSource() OVERRIDE; | 49 virtual ui::EventSource* GetEventSource() OVERRIDE; |
33 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 50 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
34 virtual void Show() OVERRIDE; | 51 virtual void Show() OVERRIDE; |
35 virtual void Hide() OVERRIDE; | 52 virtual void Hide() OVERRIDE; |
36 virtual gfx::Rect GetBounds() const OVERRIDE; | 53 virtual gfx::Rect GetBounds() const OVERRIDE; |
37 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 54 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; |
38 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; | 55 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; |
39 virtual void SetCapture() OVERRIDE; | 56 virtual void SetCapture() OVERRIDE; |
40 virtual void ReleaseCapture() OVERRIDE; | 57 virtual void ReleaseCapture() OVERRIDE; |
41 virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE; | 58 virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE; |
42 virtual void SetCursorNative(gfx::NativeCursor cursor_type) OVERRIDE; | 59 virtual void SetCursorNative(gfx::NativeCursor cursor_type) OVERRIDE; |
43 virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE; | 60 virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE; |
44 virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE; | 61 virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE; |
45 | 62 |
46 // ui::EventSource overrides. | 63 // ui::EventSource overrides. |
47 virtual ui::EventProcessor* GetEventProcessor() OVERRIDE; | 64 virtual ui::EventProcessor* GetEventProcessor() OVERRIDE; |
48 | 65 |
66 // Platform-specific part of this WindowTreeHost. | |
67 scoped_ptr<ui::PlatformWindow> platform_window_; | |
68 | |
69 // The identifier used to create a compositing surface. | |
49 gfx::AcceleratedWidget widget_; | 70 gfx::AcceleratedWidget widget_; |
50 gfx::Rect bounds_; | |
51 | 71 |
52 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostOzone); | 72 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostOzone); |
53 }; | 73 }; |
54 | 74 |
55 } // namespace aura | 75 } // namespace aura |
56 | 76 |
57 #endif // UI_AURA_WINDOW_TREE_HOST_OZONE_H_ | 77 #endif // UI_AURA_WINDOW_TREE_HOST_OZONE_H_ |
OLD | NEW |