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/shell_port.h" | 5 #include "ash/shell_port.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "ash/accelerators/accelerator_controller.h" | 9 #include "ash/accelerators/accelerator_controller.h" |
10 #include "ash/public/cpp/shell_window_ids.h" | 10 #include "ash/public/cpp/shell_window_ids.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 void ShellPort::RemoveLockStateObserver(LockStateObserver* observer) { | 64 void ShellPort::RemoveLockStateObserver(LockStateObserver* observer) { |
65 lock_state_observers_.RemoveObserver(observer); | 65 lock_state_observers_.RemoveObserver(observer); |
66 } | 66 } |
67 | 67 |
68 ShellPort::ShellPort() { | 68 ShellPort::ShellPort() { |
69 DCHECK(!instance_); | 69 DCHECK(!instance_); |
70 instance_ = this; | 70 instance_ = this; |
71 } | 71 } |
72 | 72 |
73 RootWindowController* ShellPort::GetPrimaryRootWindowController() { | |
74 return GetPrimaryRootWindow()->GetRootWindowController(); | |
75 } | |
76 | |
77 bool ShellPort::IsForceMaximizeOnFirstRun() { | 73 bool ShellPort::IsForceMaximizeOnFirstRun() { |
78 return Shell::Get()->shell_delegate()->IsForceMaximizeOnFirstRun(); | 74 return Shell::Get()->shell_delegate()->IsForceMaximizeOnFirstRun(); |
79 } | 75 } |
80 | 76 |
81 bool ShellPort::IsSystemModalWindowOpen() { | 77 bool ShellPort::IsSystemModalWindowOpen() { |
82 if (simulate_modal_window_open_for_testing_) | 78 if (simulate_modal_window_open_for_testing_) |
83 return true; | 79 return true; |
84 | 80 |
85 // Traverse all system modal containers, and find its direct child window | 81 // Traverse all system modal containers, and find its direct child window |
86 // with "SystemModal" setting, and visible. | 82 // with "SystemModal" setting, and visible. |
(...skipping 29 matching lines...) Expand all Loading... |
116 } | 112 } |
117 } | 113 } |
118 for (aura::Window* root_window : root_windows) { | 114 for (aura::Window* root_window : root_windows) { |
119 RootWindowController::ForWindow(root_window) | 115 RootWindowController::ForWindow(root_window) |
120 ->GetSystemModalLayoutManager(removed) | 116 ->GetSystemModalLayoutManager(removed) |
121 ->DestroyModalBackground(); | 117 ->DestroyModalBackground(); |
122 } | 118 } |
123 } | 119 } |
124 | 120 |
125 } // namespace ash | 121 } // namespace ash |
OLD | NEW |