OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WIN_H_ | 5 #ifndef UI_AURA_WINDOW_TREE_HOST_WIN_H_ |
6 #define UI_AURA_WINDOW_TREE_HOST_WIN_H_ | 6 #define UI_AURA_WINDOW_TREE_HOST_WIN_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "ui/aura/aura_export.h" | 10 #include "ui/aura/aura_export.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/platform_window/platform_window.h" | 13 #include "ui/platform_window/platform_window.h" |
14 #include "ui/platform_window/platform_window_delegate.h" | 14 #include "ui/platform_window/platform_window_delegate.h" |
15 | 15 |
16 namespace aura { | 16 namespace aura { |
17 | 17 |
18 class AURA_EXPORT WindowTreeHostWin | 18 class AURA_EXPORT WindowTreeHostWin |
19 : public WindowTreeHost, | 19 : public WindowTreeHost, |
20 public ui::EventSource, | 20 public ui::EventSource, |
21 public NON_EXPORTED_BASE(ui::PlatformWindowDelegate) { | 21 public NON_EXPORTED_BASE(ui::PlatformWindowDelegate) { |
22 public: | 22 public: |
23 explicit WindowTreeHostWin(const gfx::Rect& bounds); | 23 explicit WindowTreeHostWin(const gfx::Rect& bounds); |
24 virtual ~WindowTreeHostWin(); | 24 virtual ~WindowTreeHostWin(); |
25 | 25 |
26 // WindowTreeHost: | 26 // WindowTreeHost: |
27 virtual ui::EventSource* GetEventSource() OVERRIDE; | 27 virtual ui::EventSource* GetEventSource() override; |
28 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | 28 virtual gfx::AcceleratedWidget GetAcceleratedWidget() override; |
29 virtual void Show() OVERRIDE; | 29 virtual void Show() override; |
30 virtual void Hide() OVERRIDE; | 30 virtual void Hide() override; |
31 virtual gfx::Rect GetBounds() const OVERRIDE; | 31 virtual gfx::Rect GetBounds() const override; |
32 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | 32 virtual void SetBounds(const gfx::Rect& bounds) override; |
33 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; | 33 virtual gfx::Point GetLocationOnNativeScreen() const override; |
34 virtual void SetCapture() OVERRIDE; | 34 virtual void SetCapture() override; |
35 virtual void ReleaseCapture() OVERRIDE; | 35 virtual void ReleaseCapture() override; |
36 virtual void SetCursorNative(gfx::NativeCursor cursor) OVERRIDE; | 36 virtual void SetCursorNative(gfx::NativeCursor cursor) override; |
37 virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE; | 37 virtual void MoveCursorToNative(const gfx::Point& location) override; |
38 virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE; | 38 virtual void OnCursorVisibilityChangedNative(bool show) override; |
39 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE; | 39 virtual void PostNativeEvent(const base::NativeEvent& native_event) override; |
40 | 40 |
41 // ui::EventSource: | 41 // ui::EventSource: |
42 virtual ui::EventProcessor* GetEventProcessor() OVERRIDE; | 42 virtual ui::EventProcessor* GetEventProcessor() override; |
43 | 43 |
44 protected: | 44 protected: |
45 gfx::AcceleratedWidget hwnd() const { return widget_; } | 45 gfx::AcceleratedWidget hwnd() const { return widget_; } |
46 | 46 |
47 private: | 47 private: |
48 // ui::PlatformWindowDelegate: | 48 // ui::PlatformWindowDelegate: |
49 virtual void OnBoundsChanged(const gfx::Rect& new_bounds) OVERRIDE; | 49 virtual void OnBoundsChanged(const gfx::Rect& new_bounds) override; |
50 virtual void OnDamageRect(const gfx::Rect& damaged_region) OVERRIDE; | 50 virtual void OnDamageRect(const gfx::Rect& damaged_region) override; |
51 virtual void DispatchEvent(ui::Event* event) OVERRIDE; | 51 virtual void DispatchEvent(ui::Event* event) override; |
52 virtual void OnCloseRequest() OVERRIDE; | 52 virtual void OnCloseRequest() override; |
53 virtual void OnClosed() OVERRIDE; | 53 virtual void OnClosed() override; |
54 virtual void OnWindowStateChanged(ui::PlatformWindowState new_state) OVERRIDE; | 54 virtual void OnWindowStateChanged(ui::PlatformWindowState new_state) override; |
55 virtual void OnLostCapture() OVERRIDE; | 55 virtual void OnLostCapture() override; |
56 virtual void OnAcceleratedWidgetAvailable( | 56 virtual void OnAcceleratedWidgetAvailable( |
57 gfx::AcceleratedWidget widget) OVERRIDE; | 57 gfx::AcceleratedWidget widget) override; |
58 virtual void OnActivationChanged(bool active) OVERRIDE; | 58 virtual void OnActivationChanged(bool active) override; |
59 | 59 |
60 bool has_capture_; | 60 bool has_capture_; |
61 gfx::Rect bounds_; | 61 gfx::Rect bounds_; |
62 gfx::AcceleratedWidget widget_; | 62 gfx::AcceleratedWidget widget_; |
63 scoped_ptr<ui::PlatformWindow> window_; | 63 scoped_ptr<ui::PlatformWindow> window_; |
64 | 64 |
65 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostWin); | 65 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostWin); |
66 }; | 66 }; |
67 | 67 |
68 } // namespace aura | 68 } // namespace aura |
69 | 69 |
70 #endif // UI_AURA_WINDOW_TREE_HOST_WIN_H_ | 70 #endif // UI_AURA_WINDOW_TREE_HOST_WIN_H_ |
OLD | NEW |