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_NATIVE_WIDGET_HELPER_AURA_H_ | 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_HELPER_AURA_H_ |
6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_HELPER_AURA_H_ | 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_HELPER_AURA_H_ |
7 | 7 |
8 #include "ui/views/views_export.h" | 8 #include "ui/views/views_export.h" |
9 #include "ui/views/widget/widget.h" | 9 #include "ui/views/widget/widget.h" |
10 | 10 |
11 namespace views { | 11 namespace views { |
12 | 12 |
13 // A special delegate that encapsulates all logic for use of NativeWidgetAura | 13 // A special delegate that encapsulates all logic for use of NativeWidgetAura |
14 // on the desktop. | 14 // on the desktop. |
15 class VIEWS_EXPORT NativeWidgetHelperAura { | 15 class VIEWS_EXPORT NativeWidgetHelperAura { |
16 public: | 16 public: |
17 virtual ~NativeWidgetHelperAura() {} | 17 virtual ~NativeWidgetHelperAura() {} |
18 | 18 |
19 // Called at the start of InitNativeWidget; determines whether we should | 19 // Called at the start of InitNativeWidget; determines whether we should |
20 // set up a root_window_ for this widget/window pair. | 20 // set up a root_window_ for this widget/window pair. |
21 virtual void PreInitialize(aura::Window* window, | 21 virtual void PreInitialize(aura::Window* window, |
22 const Widget::InitParams& params) = 0; | 22 const Widget::InitParams& params) = 0; |
23 | 23 |
24 // Called at the end of InitNativeWidget; i.e. after the NativeWidgetAura's | 24 // Called at the end of InitNativeWidget; i.e. after the NativeWidgetAura's |
25 // aura::Window has been initialized. | 25 // aura::Window has been initialized. |
26 virtual void PostInitialize() = 0; | 26 virtual void PostInitialize() = 0; |
27 | 27 |
28 // Passes through a message to show the RootWindow, if it exists. | |
29 virtual void ShowRootWindow() = 0; | |
30 | |
31 // If we own a RootWindow, return it. Otherwise NULL. | 28 // If we own a RootWindow, return it. Otherwise NULL. |
32 virtual aura::RootWindow* GetRootWindow() = 0; | 29 virtual aura::RootWindow* GetRootWindow() = 0; |
33 | 30 |
34 // If this NativeWidgetAura has its own RootWindow, sets the position at the | 31 // If this NativeWidgetAura has its own RootWindow, sets the position at the |
35 // |root_window_|, and returns modified bounds to set the origin to | 32 // |root_window_|, and returns modified bounds to set the origin to |
36 // zero. Otherwise, pass through in_bounds. | 33 // zero. Otherwise, pass through in_bounds. |
37 virtual gfx::Rect ModifyAndSetBounds(const gfx::Rect& bounds) = 0; | 34 virtual gfx::Rect ModifyAndSetBounds(const gfx::Rect& bounds) = 0; |
38 }; | 35 }; |
39 | 36 |
40 } // namespace views | 37 } // namespace views |
41 | 38 |
42 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_HELPER_AURA_H_ | 39 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_HELPER_AURA_H_ |
OLD | NEW |