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_VIEWS_WIDGET_DESKTOP_NATIVE_WIDGET_HELPER_AURA_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_NATIVE_WIDGET_HELPER_AURA_H_ |
6 #define UI_VIEWS_WIDGET_DESKTOP_NATIVE_WIDGET_HELPER_AURA_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_NATIVE_WIDGET_HELPER_AURA_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/aura/root_window_observer.h" | 9 #include "ui/aura/root_window_observer.h" |
10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
11 #include "ui/views/views_export.h" | 11 #include "ui/views/views_export.h" |
12 #include "ui/views/widget/native_widget_helper_aura.h" | 12 #include "ui/views/widget/native_widget_helper_aura.h" |
13 #include "ui/views/widget/widget.h" | 13 #include "ui/views/widget/widget.h" |
14 | 14 |
15 namespace aura { | 15 namespace aura { |
16 class RootWindow; | 16 class RootWindow; |
17 } | 17 } |
18 | 18 |
| 19 namespace ui { |
| 20 class HWNDSubclass; |
| 21 } |
| 22 |
19 namespace views { | 23 namespace views { |
20 class NativeWidgetAura; | 24 class NativeWidgetAura; |
| 25 class WidgetMessageFilter; |
21 | 26 |
22 // Implementation of non-Ash desktop integration code, allowing | 27 // Implementation of non-Ash desktop integration code, allowing |
23 // NativeWidgetAuras to work in a traditional desktop environment. | 28 // NativeWidgetAuras to work in a traditional desktop environment. |
24 class VIEWS_EXPORT DesktopNativeWidgetHelperAura | 29 class VIEWS_EXPORT DesktopNativeWidgetHelperAura |
25 : public NativeWidgetHelperAura, | 30 : public NativeWidgetHelperAura, |
26 public aura::RootWindowObserver { | 31 public aura::RootWindowObserver { |
27 public: | 32 public: |
28 explicit DesktopNativeWidgetHelperAura(NativeWidgetAura* widget); | 33 explicit DesktopNativeWidgetHelperAura(NativeWidgetAura* widget); |
29 virtual ~DesktopNativeWidgetHelperAura(); | 34 virtual ~DesktopNativeWidgetHelperAura(); |
30 | 35 |
31 // Overridden from aura::NativeWidgetHelperAura: | 36 // Overridden from aura::NativeWidgetHelperAura: |
32 virtual void PreInitialize(const Widget::InitParams& params) OVERRIDE; | 37 virtual void PreInitialize(const Widget::InitParams& params) OVERRIDE; |
| 38 virtual void PostInitialize() OVERRIDE; |
33 virtual void ShowRootWindow() OVERRIDE; | 39 virtual void ShowRootWindow() OVERRIDE; |
34 virtual aura::RootWindow* GetRootWindow() OVERRIDE; | 40 virtual aura::RootWindow* GetRootWindow() OVERRIDE; |
35 virtual gfx::Rect ModifyAndSetBounds(const gfx::Rect& bounds) OVERRIDE; | 41 virtual gfx::Rect ModifyAndSetBounds(const gfx::Rect& bounds) OVERRIDE; |
36 virtual gfx::Rect ChangeRootWindowBoundsToScreenBounds( | 42 virtual gfx::Rect ChangeRootWindowBoundsToScreenBounds( |
37 const gfx::Rect& bounds) OVERRIDE; | 43 const gfx::Rect& bounds) OVERRIDE; |
38 | 44 |
39 // Overridden from aura::RootWindowObserver: | 45 // Overridden from aura::RootWindowObserver: |
40 virtual void OnRootWindowResized(const aura::RootWindow* root, | 46 virtual void OnRootWindowResized(const aura::RootWindow* root, |
41 const gfx::Size& old_size) OVERRIDE; | 47 const gfx::Size& old_size) OVERRIDE; |
42 virtual void OnRootWindowHostClosed(const aura::RootWindow* root) OVERRIDE; | 48 virtual void OnRootWindowHostClosed(const aura::RootWindow* root) OVERRIDE; |
43 | 49 |
44 private: | 50 private: |
45 // A weak pointer back to our owning widget. | 51 // A weak pointer back to our owning widget. |
46 NativeWidgetAura* widget_; | 52 NativeWidgetAura* widget_; |
47 | 53 |
48 // Optionally, a RootWindow that we attach ourselves to. | 54 // Optionally, a RootWindow that we attach ourselves to. |
49 scoped_ptr<aura::RootWindow> root_window_; | 55 scoped_ptr<aura::RootWindow> root_window_; |
50 | 56 |
| 57 scoped_ptr<ui::HWNDSubclass> subclass_; |
| 58 |
51 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetHelperAura); | 59 DISALLOW_COPY_AND_ASSIGN(DesktopNativeWidgetHelperAura); |
52 }; | 60 }; |
53 | 61 |
54 } // namespace views | 62 } // namespace views |
55 | 63 |
56 #endif // UI_VIEWS_WIDGET_DESKTOP_NATIVE_WIDGET_HELPER_AURA_H_ | 64 #endif // UI_VIEWS_WIDGET_DESKTOP_NATIVE_WIDGET_HELPER_AURA_H_ |
OLD | NEW |