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

Side by Side Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 16702003: Move ShellWindow into apps component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback Created 7 years, 6 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/ash/chrome_shell_delegate.h" 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h"
6 6
7 #include "apps/shell_window.h"
7 #include "ash/ash_switches.h" 8 #include "ash/ash_switches.h"
8 #include "ash/host/root_window_host_factory.h" 9 #include "ash/host/root_window_host_factory.h"
9 #include "ash/launcher/launcher_types.h" 10 #include "ash/launcher/launcher_types.h"
10 #include "ash/magnifier/magnifier_constants.h" 11 #include "ash/magnifier/magnifier_constants.h"
11 #include "ash/session_state_delegate.h" 12 #include "ash/session_state_delegate.h"
12 #include "ash/shelf/shelf_widget.h" 13 #include "ash/shelf/shelf_widget.h"
13 #include "ash/system/tray/system_tray_delegate.h" 14 #include "ash/system/tray/system_tray_delegate.h"
14 #include "ash/wm/window_properties.h" 15 #include "ash/wm/window_properties.h"
15 #include "ash/wm/window_util.h" 16 #include "ash/wm/window_util.h"
16 #include "base/bind.h" 17 #include "base/bind.h"
(...skipping 12 matching lines...) Expand all
29 #include "chrome/browser/ui/ash/ash_keyboard_controller_proxy.h" 30 #include "chrome/browser/ui/ash/ash_keyboard_controller_proxy.h"
30 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 31 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
31 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" 32 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
32 #include "chrome/browser/ui/ash/user_action_handler.h" 33 #include "chrome/browser/ui/ash/user_action_handler.h"
33 #include "chrome/browser/ui/ash/window_positioner.h" 34 #include "chrome/browser/ui/ash/window_positioner.h"
34 #include "chrome/browser/ui/browser.h" 35 #include "chrome/browser/ui/browser.h"
35 #include "chrome/browser/ui/browser_commands.h" 36 #include "chrome/browser/ui/browser_commands.h"
36 #include "chrome/browser/ui/browser_finder.h" 37 #include "chrome/browser/ui/browser_finder.h"
37 #include "chrome/browser/ui/browser_window.h" 38 #include "chrome/browser/ui/browser_window.h"
38 #include "chrome/browser/ui/extensions/native_app_window.h" 39 #include "chrome/browser/ui/extensions/native_app_window.h"
39 #include "chrome/browser/ui/extensions/shell_window.h"
40 #include "chrome/browser/ui/host_desktop.h" 40 #include "chrome/browser/ui/host_desktop.h"
41 #include "chrome/browser/ui/immersive_fullscreen_configuration.h" 41 #include "chrome/browser/ui/immersive_fullscreen_configuration.h"
42 #include "chrome/common/chrome_notification_types.h" 42 #include "chrome/common/chrome_notification_types.h"
43 #include "chrome/common/chrome_switches.h" 43 #include "chrome/common/chrome_switches.h"
44 #include "chrome/common/time_format.h" 44 #include "chrome/common/time_format.h"
45 #include "content/public/browser/notification_service.h" 45 #include "content/public/browser/notification_service.h"
46 #include "content/public/browser/user_metrics.h" 46 #include "content/public/browser/user_metrics.h"
47 #include "grit/chromium_strings.h" 47 #include "grit/chromium_strings.h"
48 #include "grit/generated_resources.h" 48 #include "grit/generated_resources.h"
49 #include "ui/aura/client/user_action_client.h" 49 #include "ui/aura/client/user_action_client.h"
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 if (is_fullscreen && !ash::wm::CanMaximizeWindow(window)) 162 if (is_fullscreen && !ash::wm::CanMaximizeWindow(window))
163 return; 163 return;
164 164
165 Browser* browser = chrome::FindBrowserWithWindow(window); 165 Browser* browser = chrome::FindBrowserWithWindow(window);
166 if (browser) { 166 if (browser) {
167 chrome::ToggleFullscreenMode(browser); 167 chrome::ToggleFullscreenMode(browser);
168 return; 168 return;
169 } 169 }
170 170
171 // |window| may belong to a shell window. 171 // |window| may belong to a shell window.
172 ShellWindow* shell_window = extensions::ShellWindowRegistry:: 172 apps::ShellWindow* shell_window = extensions::ShellWindowRegistry::
173 GetShellWindowForNativeWindowAnyProfile(window); 173 GetShellWindowForNativeWindowAnyProfile(window);
174 if (shell_window) { 174 if (shell_window) {
175 if (is_fullscreen) 175 if (is_fullscreen)
176 shell_window->Restore(); 176 shell_window->Restore();
177 else 177 else
178 shell_window->Fullscreen(); 178 shell_window->Fullscreen();
179 } 179 }
180 } 180 }
181 181
182 void ChromeShellDelegate::ToggleMaximized() { 182 void ChromeShellDelegate::ToggleMaximized() {
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 return browser; 436 return browser;
437 return chrome::FindOrCreateTabbedBrowser( 437 return chrome::FindOrCreateTabbedBrowser(
438 ProfileManager::GetDefaultProfileOrOffTheRecord(), 438 ProfileManager::GetDefaultProfileOrOffTheRecord(),
439 chrome::HOST_DESKTOP_TYPE_ASH); 439 chrome::HOST_DESKTOP_TYPE_ASH);
440 } 440 }
441 441
442 keyboard::KeyboardControllerProxy* 442 keyboard::KeyboardControllerProxy*
443 ChromeShellDelegate::CreateKeyboardControllerProxy() { 443 ChromeShellDelegate::CreateKeyboardControllerProxy() {
444 return new AshKeyboardControllerProxy(); 444 return new AshKeyboardControllerProxy();
445 } 445 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698