Elim cr-checkbox
[chromium-blink-merge.git] / extensions / shell / browser / shell_native_app_window.cc
blob83e76a7d4f8d3d5b0015919769778f9b168ea251
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::UpdateDraggableRegions(
126 const std::vector<DraggableRegion>& regions) {
127 NOTIMPLEMENTED();
130 SkRegion* ShellNativeAppWindow::GetDraggableRegion() {
131 NOTIMPLEMENTED();
132 return NULL;
135 void ShellNativeAppWindow::UpdateShape(scoped_ptr<SkRegion> region) {
136 NOTIMPLEMENTED();
139 void ShellNativeAppWindow::HandleKeyboardEvent(
140 const content::NativeWebKeyboardEvent& event) {
141 // No special handling. The WebContents will handle it.
144 bool ShellNativeAppWindow::IsFrameless() const {
145 NOTIMPLEMENTED();
146 return false;
149 bool ShellNativeAppWindow::HasFrameColor() const {
150 return false;
153 SkColor ShellNativeAppWindow::ActiveFrameColor() const {
154 return SkColor();
157 SkColor ShellNativeAppWindow::InactiveFrameColor() const {
158 return SkColor();
161 gfx::Insets ShellNativeAppWindow::GetFrameInsets() const {
162 return gfx::Insets();
165 void ShellNativeAppWindow::ShowWithApp() {
166 NOTIMPLEMENTED();
169 void ShellNativeAppWindow::HideWithApp() {
170 NOTIMPLEMENTED();
173 gfx::Size ShellNativeAppWindow::GetContentMinimumSize() const {
174 // Content fills the desktop and cannot be resized.
175 return DesktopController::instance()->GetWindowSize();
178 gfx::Size ShellNativeAppWindow::GetContentMaximumSize() const {
179 // Content fills the desktop and cannot be resized.
180 return DesktopController::instance()->GetWindowSize();
183 void ShellNativeAppWindow::SetContentSizeConstraints(
184 const gfx::Size& min_size,
185 const gfx::Size& max_size) {
186 NOTIMPLEMENTED();
189 void ShellNativeAppWindow::SetVisibleOnAllWorkspaces(bool always_visible) {
190 NOTIMPLEMENTED();
193 bool ShellNativeAppWindow::CanHaveAlphaEnabled() const {
194 // No background to display if the window was transparent.
195 return false;
198 } // namespace extensions