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_AURA_DESKTOP_WINDOW_TREE_HOST_H_ | 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_H_ |
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_H_ | 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "ui/aura/window_event_dispatcher.h" | 9 #include "ui/aura/window_event_dispatcher.h" |
10 #include "ui/base/ui_base_types.h" | 10 #include "ui/base/ui_base_types.h" |
11 #include "ui/views/views_export.h" | 11 #include "ui/views/views_export.h" |
12 #include "ui/views/widget/widget.h" | 12 #include "ui/views/widget/widget.h" |
13 | 13 |
14 namespace aura { | 14 namespace aura { |
15 class WindowTreeHost; | 15 class WindowTreeHost; |
16 class Window; | 16 class Window; |
17 | 17 |
18 namespace client { | 18 namespace client { |
19 class DragDropClient; | 19 class DragDropClient; |
20 } | 20 } |
21 } | 21 } |
22 | 22 |
23 namespace gfx { | 23 namespace gfx { |
24 class ImageSkia; | 24 class ImageSkia; |
25 class Rect; | 25 class Rect; |
26 } | 26 } |
27 | 27 |
28 namespace ui { | 28 namespace ui { |
| 29 class ContextFactory; |
29 class NativeTheme; | 30 class NativeTheme; |
30 } | 31 } |
31 | 32 |
32 namespace views { | 33 namespace views { |
33 namespace corewm { | 34 namespace corewm { |
34 class Tooltip; | 35 class Tooltip; |
35 } | 36 } |
36 | 37 |
37 namespace internal { | 38 namespace internal { |
38 class NativeWidgetDelegate; | 39 class NativeWidgetDelegate; |
39 } | 40 } |
40 | 41 |
41 class DesktopNativeCursorManager; | 42 class DesktopNativeCursorManager; |
42 class DesktopNativeWidgetAura; | 43 class DesktopNativeWidgetAura; |
43 | 44 |
44 class VIEWS_EXPORT DesktopWindowTreeHost { | 45 class VIEWS_EXPORT DesktopWindowTreeHost { |
45 public: | 46 public: |
46 virtual ~DesktopWindowTreeHost() {} | 47 virtual ~DesktopWindowTreeHost() {} |
47 | 48 |
48 static DesktopWindowTreeHost* Create( | 49 static DesktopWindowTreeHost* Create( |
49 internal::NativeWidgetDelegate* native_widget_delegate, | 50 internal::NativeWidgetDelegate* native_widget_delegate, |
50 DesktopNativeWidgetAura* desktop_native_widget_aura); | 51 DesktopNativeWidgetAura* desktop_native_widget_aura); |
51 | 52 |
52 // Return the NativeTheme to use for |window|. WARNING: |window| may be NULL. | 53 // Return the NativeTheme to use for |window|. WARNING: |window| may be NULL. |
53 static ui::NativeTheme* GetNativeTheme(aura::Window* window); | 54 static ui::NativeTheme* GetNativeTheme(aura::Window* window); |
54 | 55 |
55 // Sets up resources needed before the WindowEventDispatcher has been created. | 56 // Sets up resources needed before the WindowEventDispatcher has been created. |
56 virtual void Init(aura::Window* content_window, | 57 virtual void Init(aura::Window* content_window, |
57 const Widget::InitParams& params) = 0; | 58 const Widget::InitParams& params, |
| 59 ui::ContextFactory* context_factory) = 0; |
58 | 60 |
59 // Invoked once the DesktopNativeWidgetAura has been created. | 61 // Invoked once the DesktopNativeWidgetAura has been created. |
60 virtual void OnNativeWidgetCreated(const Widget::InitParams& params) = 0; | 62 virtual void OnNativeWidgetCreated(const Widget::InitParams& params) = 0; |
61 | 63 |
62 // Creates and returns the Tooltip implementation to use. Return value is | 64 // Creates and returns the Tooltip implementation to use. Return value is |
63 // owned by DesktopNativeWidgetAura and lives as long as | 65 // owned by DesktopNativeWidgetAura and lives as long as |
64 // DesktopWindowTreeHost. | 66 // DesktopWindowTreeHost. |
65 virtual scoped_ptr<corewm::Tooltip> CreateTooltip() = 0; | 67 virtual scoped_ptr<corewm::Tooltip> CreateTooltip() = 0; |
66 | 68 |
67 // Creates and returns the DragDropClient implementation to use. Return value | 69 // Creates and returns the DragDropClient implementation to use. Return value |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 virtual void OnNativeWidgetBlur() = 0; | 153 virtual void OnNativeWidgetBlur() = 0; |
152 | 154 |
153 // Returns true if the Widget was closed but is still showing because of | 155 // Returns true if the Widget was closed but is still showing because of |
154 // animations. | 156 // animations. |
155 virtual bool IsAnimatingClosed() const = 0; | 157 virtual bool IsAnimatingClosed() const = 0; |
156 }; | 158 }; |
157 | 159 |
158 } // namespace views | 160 } // namespace views |
159 | 161 |
160 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_H_ | 162 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_WINDOW_TREE_HOST_H_ |
OLD | NEW |