Remove unused parameter.
[chromium-blink-merge.git] / extensions / shell / browser / shell_native_app_window.cc
bloba04ce4e98fa8a2b1098590ccc400bfbdd2375656
1 // Copyright 2014 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.
5 #include "extensions/shell/browser/shell_native_app_window.h"
7 #include "extensions/shell/browser/desktop_controller.h"
8 #include "third_party/skia/include/core/SkRegion.h"
9 #include "ui/gfx/geometry/insets.h"
10 #include "ui/gfx/geometry/point.h"
11 #include "ui/gfx/geometry/rect.h"
12 #include "ui/gfx/geometry/size.h"
14 namespace extensions {
16 ShellNativeAppWindow::ShellNativeAppWindow(
17 AppWindow* app_window,
18 const AppWindow::CreateParams& params)
19 : app_window_(app_window) {
22 ShellNativeAppWindow::~ShellNativeAppWindow() {
25 bool ShellNativeAppWindow::IsMaximized() const {
26 return false;
29 bool ShellNativeAppWindow::IsMinimized() const {
30 return false;
33 bool ShellNativeAppWindow::IsFullscreen() const {
34 // The window in app_shell is considered a "restored" window that happens to
35 // fill the display. This avoids special handling of fullscreen or maximized
36 // windows that app_shell doesn't need.
37 return false;
40 gfx::Rect ShellNativeAppWindow::GetRestoredBounds() const {
41 // app_shell windows cannot be maximized, so the current bounds are the
42 // restored bounds.
43 return GetBounds();
46 ui::WindowShowState ShellNativeAppWindow::GetRestoredState() const {
47 return ui::SHOW_STATE_NORMAL;
50 void ShellNativeAppWindow::ShowInactive() {
51 NOTIMPLEMENTED();
54 void ShellNativeAppWindow::Close() {
55 DesktopController::instance()->RemoveAppWindow(app_window_);
56 app_window_->OnNativeClose();
59 void ShellNativeAppWindow::Maximize() {
60 NOTIMPLEMENTED();
63 void ShellNativeAppWindow::Minimize() {
64 NOTIMPLEMENTED();
67 void ShellNativeAppWindow::Restore() {
68 NOTIMPLEMENTED();
71 void ShellNativeAppWindow::FlashFrame(bool flash) {
72 NOTIMPLEMENTED();
75 bool ShellNativeAppWindow::IsAlwaysOnTop() const {
76 return false;
79 void ShellNativeAppWindow::SetAlwaysOnTop(bool always_on_top) {
80 NOTIMPLEMENTED();
83 gfx::NativeView ShellNativeAppWindow::GetHostView() const {
84 NOTIMPLEMENTED();
85 return NULL;
88 gfx::Point ShellNativeAppWindow::GetDialogPosition(const gfx::Size& size) {
89 NOTIMPLEMENTED();
90 return gfx::Point();
93 void ShellNativeAppWindow::AddObserver(
94 web_modal::ModalDialogHostObserver* observer) {
95 NOTIMPLEMENTED();
98 void ShellNativeAppWindow::RemoveObserver(
99 web_modal::ModalDialogHostObserver* observer) {
100 NOTIMPLEMENTED();
103 gfx::Size ShellNativeAppWindow::GetMaximumDialogSize() {
104 NOTIMPLEMENTED();
105 return gfx::Size();
108 void ShellNativeAppWindow::SetFullscreen(int fullscreen_types) {
109 NOTIMPLEMENTED();
112 bool ShellNativeAppWindow::IsFullscreenOrPending() const {
113 // See comment in IsFullscreen().
114 return false;
117 void ShellNativeAppWindow::UpdateWindowIcon() {
118 // No icon to update.
121 void ShellNativeAppWindow::UpdateWindowTitle() {
122 // No window title to update.
125 void ShellNativeAppWindow::UpdateBadgeIcon() {
126 // No badge to update.
129 void ShellNativeAppWindow::UpdateDraggableRegions(
130 const std::vector<DraggableRegion>& regions) {
131 NOTIMPLEMENTED();
134 SkRegion* ShellNativeAppWindow::GetDraggableRegion() {
135 NOTIMPLEMENTED();
136 return NULL;
139 void ShellNativeAppWindow::UpdateShape(scoped_ptr<SkRegion> region) {
140 NOTIMPLEMENTED();
143 void ShellNativeAppWindow::SetInterceptAllKeys(bool want_all_keys) {
144 NOTIMPLEMENTED();
147 void ShellNativeAppWindow::HandleKeyboardEvent(
148 const content::NativeWebKeyboardEvent& event) {
149 // No special handling. The WebContents will handle it.
152 bool ShellNativeAppWindow::IsFrameless() const {
153 NOTIMPLEMENTED();
154 return false;
157 bool ShellNativeAppWindow::HasFrameColor() const {
158 return false;
161 SkColor ShellNativeAppWindow::ActiveFrameColor() const {
162 return SkColor();
165 SkColor ShellNativeAppWindow::InactiveFrameColor() const {
166 return SkColor();
169 gfx::Insets ShellNativeAppWindow::GetFrameInsets() const {
170 return gfx::Insets();
173 void ShellNativeAppWindow::ShowWithApp() {
174 NOTIMPLEMENTED();
177 void ShellNativeAppWindow::HideWithApp() {
178 NOTIMPLEMENTED();
181 void ShellNativeAppWindow::UpdateShelfMenu() {
182 // app_shell has no shelf, dock, or system-tray to update.
185 gfx::Size ShellNativeAppWindow::GetContentMinimumSize() const {
186 // Content fills the desktop and cannot be resized.
187 return DesktopController::instance()->GetWindowSize();
190 gfx::Size ShellNativeAppWindow::GetContentMaximumSize() const {
191 // Content fills the desktop and cannot be resized.
192 return DesktopController::instance()->GetWindowSize();
195 void ShellNativeAppWindow::SetContentSizeConstraints(
196 const gfx::Size& min_size,
197 const gfx::Size& max_size) {
198 NOTIMPLEMENTED();
201 void ShellNativeAppWindow::SetVisibleOnAllWorkspaces(bool always_visible) {
202 NOTIMPLEMENTED();
205 bool ShellNativeAppWindow::CanHaveAlphaEnabled() const {
206 // No background to display if the window was transparent.
207 return false;
210 } // namespace extensions