OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/aura/wm_shell_aura.h" | 5 #include "ash/aura/wm_shell_aura.h" |
6 | 6 |
7 #include "ash/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
8 #include "ash/common/session/session_state_delegate.h" | 8 #include "ash/common/session/session_state_delegate.h" |
9 #include "ash/common/shell_observer.h" | 9 #include "ash/common/shell_observer.h" |
10 #include "ash/common/wm/mru_window_tracker.h" | 10 #include "ash/common/wm/mru_window_tracker.h" |
11 #include "ash/common/wm_activation_observer.h" | 11 #include "ash/common/wm_activation_observer.h" |
12 #include "ash/common/wm_display_observer.h" | 12 #include "ash/common/wm_display_observer.h" |
13 #include "ash/common/wm_shell_common.h" | 13 #include "ash/common/wm_shell_common.h" |
14 #include "ash/display/window_tree_host_manager.h" | 14 #include "ash/display/window_tree_host_manager.h" |
15 #include "ash/shell.h" | 15 #include "ash/shell.h" |
16 #include "ash/shell_delegate.h" | 16 #include "ash/shell_delegate.h" |
17 #include "ash/wm/drag_window_resizer.h" | 17 #include "ash/wm/drag_window_resizer.h" |
18 #include "ash/wm/overview/window_selector_controller.h" | 18 #include "ash/wm/overview/window_selector_controller.h" |
| 19 #include "ash/wm/screen_pinning_controller.h" |
19 #include "ash/wm/window_util.h" | 20 #include "ash/wm/window_util.h" |
20 #include "base/memory/ptr_util.h" | 21 #include "base/memory/ptr_util.h" |
21 #include "ui/aura/client/focus_client.h" | 22 #include "ui/aura/client/focus_client.h" |
22 #include "ui/wm/public/activation_client.h" | 23 #include "ui/wm/public/activation_client.h" |
23 | 24 |
24 namespace ash { | 25 namespace ash { |
25 | 26 |
26 WmShellAura::WmShellAura(WmShellCommon* wm_shell_common) | 27 WmShellAura::WmShellAura(WmShellCommon* wm_shell_common) |
27 : wm_shell_common_(wm_shell_common) { | 28 : wm_shell_common_(wm_shell_common) { |
28 WmShell::Set(this); | 29 WmShell::Set(this); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 | 73 |
73 WmWindow* WmShellAura::GetRootWindowForNewWindows() { | 74 WmWindow* WmShellAura::GetRootWindowForNewWindows() { |
74 return WmWindowAura::Get(Shell::GetTargetRootWindow()); | 75 return WmWindowAura::Get(Shell::GetTargetRootWindow()); |
75 } | 76 } |
76 | 77 |
77 | 78 |
78 bool WmShellAura::IsForceMaximizeOnFirstRun() { | 79 bool WmShellAura::IsForceMaximizeOnFirstRun() { |
79 return Shell::GetInstance()->delegate()->IsForceMaximizeOnFirstRun(); | 80 return Shell::GetInstance()->delegate()->IsForceMaximizeOnFirstRun(); |
80 } | 81 } |
81 | 82 |
| 83 bool WmShellAura::IsPinned() { |
| 84 return Shell::GetInstance()->screen_pinning_controller()->IsPinned(); |
| 85 } |
| 86 |
82 bool WmShellAura::CanShowWindowForUser(WmWindow* window) { | 87 bool WmShellAura::CanShowWindowForUser(WmWindow* window) { |
83 return Shell::GetInstance()->delegate()->CanShowWindowForUser(window); | 88 return Shell::GetInstance()->delegate()->CanShowWindowForUser(window); |
84 } | 89 } |
85 | 90 |
86 void WmShellAura::LockCursor() { | 91 void WmShellAura::LockCursor() { |
87 Shell::GetInstance()->cursor_manager()->LockCursor(); | 92 Shell::GetInstance()->cursor_manager()->LockCursor(); |
88 } | 93 } |
89 | 94 |
90 void WmShellAura::UnlockCursor() { | 95 void WmShellAura::UnlockCursor() { |
91 Shell::GetInstance()->cursor_manager()->UnlockCursor(); | 96 Shell::GetInstance()->cursor_manager()->UnlockCursor(); |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, | 204 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, |
200 OnDisplayConfigurationChanging()); | 205 OnDisplayConfigurationChanging()); |
201 } | 206 } |
202 | 207 |
203 void WmShellAura::OnDisplayConfigurationChanged() { | 208 void WmShellAura::OnDisplayConfigurationChanged() { |
204 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, | 209 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, |
205 OnDisplayConfigurationChanged()); | 210 OnDisplayConfigurationChanged()); |
206 } | 211 } |
207 | 212 |
208 } // namespace ash | 213 } // namespace ash |
OLD | NEW |