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 "ash/shell/shell_delegate_impl.h" | 5 #include "ash/shell/shell_delegate_impl.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "ash/caps_lock_delegate_stub.h" | 9 #include "ash/caps_lock_delegate_stub.h" |
10 #include "ash/host/root_window_host_factory.h" | 10 #include "ash/host/root_window_host_factory.h" |
11 #include "ash/keyboard_controller_proxy_stub.h" | 11 #include "ash/keyboard_controller_proxy_stub.h" |
12 #include "ash/session_state_delegate.h" | 12 #include "ash/session_state_delegate.h" |
13 #include "ash/session_state_delegate_stub.h" | 13 #include "ash/session_state_delegate_stub.h" |
14 #include "ash/shell/context_menu.h" | 14 #include "ash/shell/context_menu.h" |
15 #include "ash/shell/example_factory.h" | 15 #include "ash/shell/example_factory.h" |
16 #include "ash/shell/launcher_delegate_impl.h" | 16 #include "ash/shell/launcher_delegate_impl.h" |
17 #include "ash/shell/toplevel_window.h" | 17 #include "ash/shell/toplevel_window.h" |
18 #include "ash/shell_window_ids.h" | 18 #include "ash/shell_window_ids.h" |
19 #include "ash/system/tray/default_system_tray_delegate.h" | 19 #include "ash/system/tray/default_system_tray_delegate.h" |
| 20 #include "ash/wm/window_state.h" |
20 #include "ash/wm/window_util.h" | 21 #include "ash/wm/window_util.h" |
21 #include "base/message_loop/message_loop.h" | 22 #include "base/message_loop/message_loop.h" |
22 #include "ui/aura/window.h" | 23 #include "ui/aura/window.h" |
23 #include "ui/views/corewm/input_method_event_filter.h" | 24 #include "ui/views/corewm/input_method_event_filter.h" |
24 | 25 |
25 namespace ash { | 26 namespace ash { |
26 namespace shell { | 27 namespace shell { |
27 | 28 |
28 ShellDelegateImpl::ShellDelegateImpl() | 29 ShellDelegateImpl::ShellDelegateImpl() |
29 : watcher_(NULL), | 30 : watcher_(NULL), |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 ash::shell::ToplevelWindow::CreateToplevelWindow(create_params); | 77 ash::shell::ToplevelWindow::CreateToplevelWindow(create_params); |
77 } | 78 } |
78 | 79 |
79 void ShellDelegateImpl::ToggleFullscreen() { | 80 void ShellDelegateImpl::ToggleFullscreen() { |
80 ToggleMaximized(); | 81 ToggleMaximized(); |
81 } | 82 } |
82 | 83 |
83 void ShellDelegateImpl::ToggleMaximized() { | 84 void ShellDelegateImpl::ToggleMaximized() { |
84 aura::Window* window = ash::wm::GetActiveWindow(); | 85 aura::Window* window = ash::wm::GetActiveWindow(); |
85 if (window) | 86 if (window) |
86 ash::wm::ToggleMaximizedWindow(window); | 87 wm::GetWindowState(window)->ToggleMaximized(); |
87 } | 88 } |
88 | 89 |
89 void ShellDelegateImpl::OpenFileManager(bool as_dialog) { | 90 void ShellDelegateImpl::OpenFileManager(bool as_dialog) { |
90 } | 91 } |
91 | 92 |
92 void ShellDelegateImpl::OpenCrosh() { | 93 void ShellDelegateImpl::OpenCrosh() { |
93 } | 94 } |
94 | 95 |
95 void ShellDelegateImpl::RestoreTab() { | 96 void ShellDelegateImpl::RestoreTab() { |
96 } | 97 } |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() { | 218 RootWindowHostFactory* ShellDelegateImpl::CreateRootWindowHostFactory() { |
218 return RootWindowHostFactory::Create(); | 219 return RootWindowHostFactory::Create(); |
219 } | 220 } |
220 | 221 |
221 base::string16 ShellDelegateImpl::GetProductName() const { | 222 base::string16 ShellDelegateImpl::GetProductName() const { |
222 return base::string16(); | 223 return base::string16(); |
223 } | 224 } |
224 | 225 |
225 } // namespace shell | 226 } // namespace shell |
226 } // namespace ash | 227 } // namespace ash |
OLD | NEW |