blob: 911355613ca4f99d7337714f7497e3386555231f (
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
// Copyright 2014 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.
#include "extensions/shell/browser/shell_native_app_window.h"
#include "extensions/shell/browser/desktop_controller.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
namespace extensions {
ShellNativeAppWindow::ShellNativeAppWindow(
AppWindow* app_window,
const AppWindow::CreateParams& params)
: app_window_(app_window) {
}
ShellNativeAppWindow::~ShellNativeAppWindow() {
}
bool ShellNativeAppWindow::IsMaximized() const {
return false;
}
bool ShellNativeAppWindow::IsMinimized() const {
return false;
}
bool ShellNativeAppWindow::IsFullscreen() const {
// The window in app_shell is considered a "restored" window that happens to
// fill the display. This avoids special handling of fullscreen or maximized
// windows that app_shell doesn't need.
return false;
}
gfx::Rect ShellNativeAppWindow::GetRestoredBounds() const {
// app_shell windows cannot be maximized, so the current bounds are the
// restored bounds.
return GetBounds();
}
ui::WindowShowState ShellNativeAppWindow::GetRestoredState() const {
return ui::SHOW_STATE_NORMAL;
}
void ShellNativeAppWindow::ShowInactive() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::Close() {
DesktopController::instance()->RemoveAppWindow(app_window_);
app_window_->OnNativeClose();
}
void ShellNativeAppWindow::Maximize() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::Minimize() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::Restore() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::FlashFrame(bool flash) {
NOTIMPLEMENTED();
}
bool ShellNativeAppWindow::IsAlwaysOnTop() const {
return false;
}
void ShellNativeAppWindow::SetAlwaysOnTop(bool always_on_top) {
NOTIMPLEMENTED();
}
gfx::NativeView ShellNativeAppWindow::GetHostView() const {
NOTIMPLEMENTED();
return NULL;
}
gfx::Point ShellNativeAppWindow::GetDialogPosition(const gfx::Size& size) {
NOTIMPLEMENTED();
return gfx::Point();
}
void ShellNativeAppWindow::AddObserver(
web_modal::ModalDialogHostObserver* observer) {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::RemoveObserver(
web_modal::ModalDialogHostObserver* observer) {
NOTIMPLEMENTED();
}
gfx::Size ShellNativeAppWindow::GetMaximumDialogSize() {
NOTIMPLEMENTED();
return gfx::Size();
}
void ShellNativeAppWindow::SetFullscreen(int fullscreen_types) {
NOTIMPLEMENTED();
}
bool ShellNativeAppWindow::IsFullscreenOrPending() const {
// See comment in IsFullscreen().
return false;
}
void ShellNativeAppWindow::UpdateWindowIcon() {
// No icon to update.
}
void ShellNativeAppWindow::UpdateWindowTitle() {
// No window title to update.
}
void ShellNativeAppWindow::UpdateDraggableRegions(
const std::vector<DraggableRegion>& regions) {
NOTIMPLEMENTED();
}
SkRegion* ShellNativeAppWindow::GetDraggableRegion() {
NOTIMPLEMENTED();
return NULL;
}
void ShellNativeAppWindow::UpdateShape(scoped_ptr<SkRegion> region) {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::SetInterceptAllKeys(bool want_all_keys) {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::HandleKeyboardEvent(
const content::NativeWebKeyboardEvent& event) {
// No special handling. The WebContents will handle it.
}
bool ShellNativeAppWindow::IsFrameless() const {
NOTIMPLEMENTED();
return false;
}
bool ShellNativeAppWindow::HasFrameColor() const {
return false;
}
SkColor ShellNativeAppWindow::ActiveFrameColor() const {
return SkColor();
}
SkColor ShellNativeAppWindow::InactiveFrameColor() const {
return SkColor();
}
gfx::Insets ShellNativeAppWindow::GetFrameInsets() const {
return gfx::Insets();
}
void ShellNativeAppWindow::ShowWithApp() {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::HideWithApp() {
NOTIMPLEMENTED();
}
gfx::Size ShellNativeAppWindow::GetContentMinimumSize() const {
// Content fills the desktop and cannot be resized.
return DesktopController::instance()->GetWindowSize();
}
gfx::Size ShellNativeAppWindow::GetContentMaximumSize() const {
// Content fills the desktop and cannot be resized.
return DesktopController::instance()->GetWindowSize();
}
void ShellNativeAppWindow::SetContentSizeConstraints(
const gfx::Size& min_size,
const gfx::Size& max_size) {
NOTIMPLEMENTED();
}
void ShellNativeAppWindow::SetVisibleOnAllWorkspaces(bool always_visible) {
NOTIMPLEMENTED();
}
bool ShellNativeAppWindow::CanHaveAlphaEnabled() const {
// No background to display if the window was transparent.
return false;
}
} // namespace extensions
|