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 "ash/caps_lock_delegate_stub.h" | 7 #include "ash/caps_lock_delegate_stub.h" |
8 #include "ash/shell/example_factory.h" | 8 #include "ash/shell/example_factory.h" |
9 #include "ash/shell/launcher_delegate_impl.h" | 9 #include "ash/shell/launcher_delegate_impl.h" |
10 #include "ash/shell/toplevel_window.h" | 10 #include "ash/shell/toplevel_window.h" |
11 #include "ash/shell_window_ids.h" | 11 #include "ash/shell_window_ids.h" |
| 12 #include "ash/wm/window_util.h" |
12 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
13 #include "ui/aura/window.h" | 14 #include "ui/aura/window.h" |
14 | 15 |
15 namespace ash { | 16 namespace ash { |
16 namespace shell { | 17 namespace shell { |
17 | 18 |
18 ShellDelegateImpl::ShellDelegateImpl() | 19 ShellDelegateImpl::ShellDelegateImpl() |
19 : watcher_(NULL), | 20 : watcher_(NULL), |
20 launcher_delegate_(NULL), | 21 launcher_delegate_(NULL), |
21 locked_(false), | 22 locked_(false), |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 void ShellDelegateImpl::NewTab() { | 69 void ShellDelegateImpl::NewTab() { |
69 } | 70 } |
70 | 71 |
71 void ShellDelegateImpl::NewWindow(bool incognito) { | 72 void ShellDelegateImpl::NewWindow(bool incognito) { |
72 ash::shell::ToplevelWindow::CreateParams create_params; | 73 ash::shell::ToplevelWindow::CreateParams create_params; |
73 create_params.can_resize = true; | 74 create_params.can_resize = true; |
74 create_params.can_maximize = true; | 75 create_params.can_maximize = true; |
75 ash::shell::ToplevelWindow::CreateToplevelWindow(create_params); | 76 ash::shell::ToplevelWindow::CreateToplevelWindow(create_params); |
76 } | 77 } |
77 | 78 |
| 79 void ShellDelegateImpl::ToggleMaximized() { |
| 80 aura::Window* window = ash::wm::GetActiveWindow(); |
| 81 if (window) |
| 82 ash::wm::ToggleMaximizedWindow(window); |
| 83 } |
| 84 |
78 void ShellDelegateImpl::OpenFileManager(bool as_dialog) { | 85 void ShellDelegateImpl::OpenFileManager(bool as_dialog) { |
79 } | 86 } |
80 | 87 |
81 void ShellDelegateImpl::OpenCrosh() { | 88 void ShellDelegateImpl::OpenCrosh() { |
82 } | 89 } |
83 | 90 |
84 void ShellDelegateImpl::OpenMobileSetup(const std::string& service_path) { | 91 void ShellDelegateImpl::OpenMobileSetup(const std::string& service_path) { |
85 } | 92 } |
86 | 93 |
87 void ShellDelegateImpl::RestoreTab() { | 94 void ShellDelegateImpl::RestoreTab() { |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 164 |
158 void ShellDelegateImpl::SaveScreenMagnifierScale(double scale) { | 165 void ShellDelegateImpl::SaveScreenMagnifierScale(double scale) { |
159 } | 166 } |
160 | 167 |
161 double ShellDelegateImpl::GetSavedScreenMagnifierScale() { | 168 double ShellDelegateImpl::GetSavedScreenMagnifierScale() { |
162 return std::numeric_limits<double>::min(); | 169 return std::numeric_limits<double>::min(); |
163 } | 170 } |
164 | 171 |
165 } // namespace shell | 172 } // namespace shell |
166 } // namespace ash | 173 } // namespace ash |
OLD | NEW |