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