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 "base/message_loop/message_pump_dispatcher.h" | 11 #include "base/message_loop/message_pump_dispatcher.h" |
12 #include "ui/aura/window_tree_host.h" | 12 #include "ui/aura/window_tree_host.h" |
13 #include "ui/events/event_source.h" | 13 #include "ui/events/event_source.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 | 16 |
| 17 namespace ui { |
| 18 class OzoneWindow; |
| 19 } |
| 20 |
17 namespace aura { | 21 namespace aura { |
18 | 22 |
19 class WindowTreeHostOzone : public WindowTreeHost, | 23 class WindowTreeHostOzone : public WindowTreeHost, |
20 public ui::EventSource, | 24 public ui::EventSource, |
21 public base::MessagePumpDispatcher { | 25 public base::MessagePumpDispatcher { |
22 public: | 26 public: |
23 explicit WindowTreeHostOzone(const gfx::Rect& bounds); | 27 explicit WindowTreeHostOzone(scoped_ptr<ui::OzoneWindow> ozone_window); |
24 virtual ~WindowTreeHostOzone(); | 28 virtual ~WindowTreeHostOzone(); |
25 | 29 |
26 private: | 30 private: |
27 // Overridden from Dispatcher overrides: | 31 // Overridden from Dispatcher overrides: |
28 virtual uint32_t Dispatch(const base::NativeEvent& event) OVERRIDE; | 32 virtual uint32_t Dispatch(const base::NativeEvent& event) OVERRIDE; |
29 | 33 |
30 // WindowTreeHost Overrides. | 34 // WindowTreeHost Overrides. |
31 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 35 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; |
32 virtual void Show() OVERRIDE; | 36 virtual void Show() OVERRIDE; |
33 virtual void Hide() OVERRIDE; | 37 virtual void Hide() OVERRIDE; |
(...skipping 11 matching lines...) Expand all Loading... |
45 virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE; | 49 virtual void PostNativeEvent(const base::NativeEvent& event) OVERRIDE; |
46 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | 50 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; |
47 virtual void PrepareForShutdown() OVERRIDE; | 51 virtual void PrepareForShutdown() OVERRIDE; |
48 virtual void SetCursorNative(gfx::NativeCursor cursor_type) OVERRIDE; | 52 virtual void SetCursorNative(gfx::NativeCursor cursor_type) OVERRIDE; |
49 virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE; | 53 virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE; |
50 virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE; | 54 virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE; |
51 | 55 |
52 // ui::EventSource overrides. | 56 // ui::EventSource overrides. |
53 virtual ui::EventProcessor* GetEventProcessor() OVERRIDE; | 57 virtual ui::EventProcessor* GetEventProcessor() OVERRIDE; |
54 | 58 |
55 gfx::AcceleratedWidget widget_; | 59 scoped_ptr<ui::OzoneWindow> ozone_window_; |
56 gfx::Rect bounds_; | |
57 | 60 |
58 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostOzone); | 61 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostOzone); |
59 }; | 62 }; |
60 | 63 |
61 } // namespace aura | 64 } // namespace aura |
62 | 65 |
63 #endif // UI_AURA_WINDOW_TREE_HOST_OZONE_H_ | 66 #endif // UI_AURA_WINDOW_TREE_HOST_OZONE_H_ |
OLD | NEW |