OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef UI_VIEWS_WIDGET_DESKTOP_ROOT_WINDOW_HOST_H_ | |
6 #define UI_VIEWS_WIDGET_DESKTOP_ROOT_WINDOW_HOST_H_ | |
7 | |
8 #include "ui/base/ui_base_types.h" | |
9 #include "ui/views/views_export.h" | |
10 #include "ui/views/widget/widget.h" | |
11 | |
12 namespace aura { | |
13 class RootWindowHost; | |
14 class Window; | |
15 } | |
16 | |
17 namespace gfx { | |
18 class ImageSkia; | |
19 class Rect; | |
20 } | |
21 | |
22 namespace ui { | |
23 class NativeTheme; | |
24 } | |
25 | |
26 namespace views { | |
27 class DesktopNativeWidgetAura; | |
28 namespace internal { | |
29 class InputMethodDelegate; | |
30 class NativeWidgetDelegate; | |
31 } | |
32 | |
33 class VIEWS_EXPORT DesktopRootWindowHost { | |
34 public: | |
35 virtual ~DesktopRootWindowHost() {} | |
36 | |
37 static DesktopRootWindowHost* Create( | |
38 internal::NativeWidgetDelegate* native_widget_delegate, | |
39 DesktopNativeWidgetAura* desktop_native_widget_aura, | |
40 const gfx::Rect& initial_bounds); | |
41 | |
42 // Return the NativeTheme to use for |window|. | |
43 static ui::NativeTheme* GetNativeTheme(aura::Window* window); | |
44 | |
45 // Creates the aura resources associated with the native window we built. | |
46 // Caller takes ownership of returned RootWindow. | |
47 virtual aura::RootWindow* Init(aura::Window* content_window, | |
48 const Widget::InitParams& params) = 0; | |
49 | |
50 virtual void Close() = 0; | |
51 virtual void CloseNow() = 0; | |
52 | |
53 virtual aura::RootWindowHost* AsRootWindowHost() = 0; | |
54 | |
55 virtual void ShowWindowWithState(ui::WindowShowState show_state) = 0; | |
56 virtual void ShowMaximizedWithBounds(const gfx::Rect& restored_bounds) = 0; | |
57 | |
58 virtual bool IsVisible() const = 0; | |
59 | |
60 virtual void SetSize(const gfx::Size& size) = 0; | |
61 virtual void CenterWindow(const gfx::Size& size) = 0; | |
62 virtual void GetWindowPlacement(gfx::Rect* bounds, | |
63 ui::WindowShowState* show_state) const = 0; | |
64 virtual gfx::Rect GetWindowBoundsInScreen() const = 0; | |
65 virtual gfx::Rect GetClientAreaBoundsInScreen() const = 0; | |
66 virtual gfx::Rect GetRestoredBounds() const = 0; | |
67 | |
68 virtual gfx::Rect GetWorkAreaBoundsInScreen() const = 0; | |
69 | |
70 virtual void SetShape(gfx::NativeRegion native_region) = 0; | |
71 | |
72 virtual void Activate() = 0; | |
73 virtual void Deactivate() = 0; | |
74 virtual bool IsActive() const = 0; | |
75 virtual void Maximize() = 0; | |
76 virtual void Minimize() = 0; | |
77 virtual void Restore() = 0; | |
78 virtual bool IsMaximized() const = 0; | |
79 virtual bool IsMinimized() const = 0; | |
80 | |
81 virtual bool HasCapture() const = 0; | |
82 | |
83 virtual void SetAlwaysOnTop(bool always_on_top) = 0; | |
84 | |
85 virtual InputMethod* CreateInputMethod() = 0; | |
86 virtual internal::InputMethodDelegate* GetInputMethodDelegate() = 0; | |
87 | |
88 virtual void SetWindowTitle(const string16& title) = 0; | |
89 | |
90 virtual void ClearNativeFocus() = 0; | |
91 | |
92 virtual Widget::MoveLoopResult RunMoveLoop( | |
93 const gfx::Vector2d& drag_offset) = 0; | |
94 virtual void EndMoveLoop() = 0; | |
95 | |
96 virtual void SetVisibilityChangedAnimationsEnabled(bool value) = 0; | |
97 | |
98 virtual bool ShouldUseNativeFrame() = 0; | |
99 virtual void FrameTypeChanged() = 0; | |
100 virtual NonClientFrameView* CreateNonClientFrameView() = 0; | |
101 | |
102 virtual void SetFullscreen(bool fullscreen) = 0; | |
103 virtual bool IsFullscreen() const = 0; | |
104 | |
105 virtual void SetOpacity(unsigned char opacity) = 0; | |
106 | |
107 virtual void SetWindowIcons(const gfx::ImageSkia& window_icon, | |
108 const gfx::ImageSkia& app_icon) = 0; | |
109 | |
110 virtual void SetAccessibleName(const string16& name) = 0; | |
111 virtual void SetAccessibleRole(ui::AccessibilityTypes::Role role) = 0; | |
112 virtual void SetAccessibleState(ui::AccessibilityTypes::State state) = 0; | |
113 | |
114 virtual void InitModalType(ui::ModalType modal_type) = 0; | |
115 | |
116 virtual void FlashFrame(bool flash_frame) = 0; | |
117 | |
118 // Called when the DesktopNativeWidgetAura's aura::Window is focused and | |
119 // blurred. | |
120 virtual void OnNativeWidgetFocus() = 0; | |
121 virtual void OnNativeWidgetBlur() = 0; | |
122 }; | |
123 | |
124 } // namespace views | |
125 | |
126 #endif // UI_VIEWS_WIDGET_DESKTOP_ROOT_WINDOW_HOST_H_ | |
OLD | NEW |