Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(351)

Side by Side Diff: extensions/shell/browser/shell_native_app_window.cc

Issue 642383003: Add the ability to load multiple apps into app_shell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « extensions/shell/browser/shell_extension_system.cc ('k') | extensions/shell/test/shell_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698