| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "extensions/shell/browser/shell_native_app_window.h" | 5 #include "extensions/shell/browser/shell_native_app_window.h" |
| 6 | 6 |
| 7 #include "content/public/browser/web_contents.h" | 7 #include "content/public/browser/web_contents.h" |
| 8 #include "extensions/shell/browser/desktop_controller.h" | 8 #include "extensions/shell/browser/desktop_controller.h" |
| 9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
| 10 #include "ui/aura/window_tree_host.h" | 10 #include "ui/aura/window_tree_host.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 void ShellNativeAppWindow::Hide() { | 86 void ShellNativeAppWindow::Hide() { |
| 87 GetWindow()->Hide(); | 87 GetWindow()->Hide(); |
| 88 } | 88 } |
| 89 | 89 |
| 90 void ShellNativeAppWindow::ShowInactive() { | 90 void ShellNativeAppWindow::ShowInactive() { |
| 91 NOTIMPLEMENTED(); | 91 NOTIMPLEMENTED(); |
| 92 } | 92 } |
| 93 | 93 |
| 94 void ShellNativeAppWindow::Close() { | 94 void ShellNativeAppWindow::Close() { |
| 95 DesktopController::instance()->RemoveAppWindow(app_window_); |
| 95 app_window_->OnNativeClose(); | 96 app_window_->OnNativeClose(); |
| 96 } | 97 } |
| 97 | 98 |
| 98 void ShellNativeAppWindow::Activate() { | 99 void ShellNativeAppWindow::Activate() { |
| 99 aura::Window* window = GetWindow(); | 100 aura::Window* window = GetWindow(); |
| 100 if (window) | 101 if (window) |
| 101 wm::ActivateWindow(window); | 102 wm::ActivateWindow(window); |
| 102 } | 103 } |
| 103 | 104 |
| 104 void ShellNativeAppWindow::Deactivate() { | 105 void ShellNativeAppWindow::Deactivate() { |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 bool ShellNativeAppWindow::CanHaveAlphaEnabled() const { | 257 bool ShellNativeAppWindow::CanHaveAlphaEnabled() const { |
| 257 // No background to display if the window was transparent. | 258 // No background to display if the window was transparent. |
| 258 return false; | 259 return false; |
| 259 } | 260 } |
| 260 | 261 |
| 261 aura::Window* ShellNativeAppWindow::GetWindow() const { | 262 aura::Window* ShellNativeAppWindow::GetWindow() const { |
| 262 return app_window_->web_contents()->GetNativeView(); | 263 return app_window_->web_contents()->GetNativeView(); |
| 263 } | 264 } |
| 264 | 265 |
| 265 } // namespace extensions | 266 } // namespace extensions |
| OLD | NEW |