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/test/test_shell_delegate.h" | 5 #include "ash/test/test_shell_delegate.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/shell.h" | 13 #include "ash/shell.h" |
14 #include "ash/shell_window_ids.h" | 14 #include "ash/shell_window_ids.h" |
15 #include "ash/test/test_launcher_delegate.h" | 15 #include "ash/test/test_launcher_delegate.h" |
16 #include "ash/test/test_session_state_delegate.h" | 16 #include "ash/test/test_session_state_delegate.h" |
17 #include "ash/test/test_system_tray_delegate.h" | 17 #include "ash/test/test_system_tray_delegate.h" |
18 #include "ash/wm/window_state.h" | |
18 #include "ash/wm/window_util.h" | 19 #include "ash/wm/window_util.h" |
19 #include "base/logging.h" | 20 #include "base/logging.h" |
20 #include "content/public/test/test_browser_context.h" | 21 #include "content/public/test/test_browser_context.h" |
21 #include "ui/aura/window.h" | 22 #include "ui/aura/window.h" |
22 #include "ui/compositor/compositor.h" | 23 #include "ui/compositor/compositor.h" |
23 | 24 |
24 namespace ash { | 25 namespace ash { |
25 namespace test { | 26 namespace test { |
26 | 27 |
27 TestShellDelegate::TestShellDelegate() | 28 TestShellDelegate::TestShellDelegate() |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
60 num_exit_requests_++; | 61 num_exit_requests_++; |
61 } | 62 } |
62 | 63 |
63 void TestShellDelegate::NewTab() { | 64 void TestShellDelegate::NewTab() { |
64 } | 65 } |
65 | 66 |
66 void TestShellDelegate::NewWindow(bool incognito) { | 67 void TestShellDelegate::NewWindow(bool incognito) { |
67 } | 68 } |
68 | 69 |
69 void TestShellDelegate::ToggleMaximized() { | 70 void TestShellDelegate::ToggleMaximized() { |
70 aura::Window* window = ash::wm::GetActiveWindow(); | 71 wm::WindowState* window_state = wm::GetActiveWindowState(); |
James Cook
2013/09/18 20:44:17
nit: Are you sure you want to provide GetActiveWin
oshima
2013/09/19 01:52:01
I added because most cases you get active window,
| |
71 if (window) | 72 if (window_state) |
72 ash::wm::ToggleMaximizedWindow(window); | 73 window_state->ToggleMaximized(); |
73 } | 74 } |
74 | 75 |
75 void TestShellDelegate::ToggleFullscreen() { | 76 void TestShellDelegate::ToggleFullscreen() { |
76 } | 77 } |
77 | 78 |
78 void TestShellDelegate::OpenFileManager(bool as_dialog) { | 79 void TestShellDelegate::OpenFileManager(bool as_dialog) { |
79 } | 80 } |
80 | 81 |
81 void TestShellDelegate::OpenCrosh() { | 82 void TestShellDelegate::OpenCrosh() { |
82 } | 83 } |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
216 base::string16 TestShellDelegate::GetProductName() const { | 217 base::string16 TestShellDelegate::GetProductName() const { |
217 return base::string16(); | 218 return base::string16(); |
218 } | 219 } |
219 | 220 |
220 TestSessionStateDelegate* TestShellDelegate::test_session_state_delegate() { | 221 TestSessionStateDelegate* TestShellDelegate::test_session_state_delegate() { |
221 return test_session_state_delegate_; | 222 return test_session_state_delegate_; |
222 } | 223 } |
223 | 224 |
224 } // namespace test | 225 } // namespace test |
225 } // namespace ash | 226 } // namespace ash |
OLD | NEW |