OLD | NEW |
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 Loading... |
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 } | 181 } |
182 #endif // OS_WIN | 182 #endif // OS_WIN |
183 if (browser->is_app() && browser->app_type() != Browser::APP_TYPE_CHILD) | 183 if (browser->is_app() && browser->app_type() != Browser::APP_TYPE_CHILD) |
184 ash::wm::ToggleMaximizedWindow(window); | 184 ash::wm::ToggleMaximizedWindow(window); |
185 else | 185 else |
186 chrome::ToggleFullscreenMode(browser); | 186 chrome::ToggleFullscreenMode(browser); |
187 return; | 187 return; |
188 } | 188 } |
189 | 189 |
190 // |window| may belong to a shell window. | 190 // |window| may belong to a shell window. |
191 ShellWindow* shell_window = extensions::ShellWindowRegistry:: | 191 apps::ShellWindow* shell_window = extensions::ShellWindowRegistry:: |
192 GetShellWindowForNativeWindowAnyProfile(window); | 192 GetShellWindowForNativeWindowAnyProfile(window); |
193 if (shell_window) { | 193 if (shell_window) { |
194 if (is_fullscreen) | 194 if (is_fullscreen) |
195 shell_window->Restore(); | 195 shell_window->Restore(); |
196 else | 196 else |
197 shell_window->Fullscreen(); | 197 shell_window->Fullscreen(); |
198 } | 198 } |
199 } | 199 } |
200 | 200 |
201 void ChromeShellDelegate::ToggleMaximized() { | 201 void ChromeShellDelegate::ToggleMaximized() { |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 return browser; | 448 return browser; |
449 return chrome::FindOrCreateTabbedBrowser( | 449 return chrome::FindOrCreateTabbedBrowser( |
450 ProfileManager::GetDefaultProfileOrOffTheRecord(), | 450 ProfileManager::GetDefaultProfileOrOffTheRecord(), |
451 chrome::HOST_DESKTOP_TYPE_ASH); | 451 chrome::HOST_DESKTOP_TYPE_ASH); |
452 } | 452 } |
453 | 453 |
454 keyboard::KeyboardControllerProxy* | 454 keyboard::KeyboardControllerProxy* |
455 ChromeShellDelegate::CreateKeyboardControllerProxy() { | 455 ChromeShellDelegate::CreateKeyboardControllerProxy() { |
456 return new AshKeyboardControllerProxy(); | 456 return new AshKeyboardControllerProxy(); |
457 } | 457 } |
OLD | NEW |