| 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/shell_port_classic.h" | 5 #include "ash/aura/shell_port_classic.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/accelerators/accelerator_controller_delegate_aura.h" | 10 #include "ash/accelerators/accelerator_controller_delegate_aura.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 } | 121 } |
| 122 | 122 |
| 123 void ShellPortClassic::LockCursor() { | 123 void ShellPortClassic::LockCursor() { |
| 124 Shell::Get()->cursor_manager()->LockCursor(); | 124 Shell::Get()->cursor_manager()->LockCursor(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 void ShellPortClassic::UnlockCursor() { | 127 void ShellPortClassic::UnlockCursor() { |
| 128 Shell::Get()->cursor_manager()->UnlockCursor(); | 128 Shell::Get()->cursor_manager()->UnlockCursor(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 void ShellPortClassic::ShowCursor() { |
| 132 Shell::Get()->cursor_manager()->ShowCursor(); |
| 133 } |
| 134 |
| 135 void ShellPortClassic::HideCursor() { |
| 136 Shell::Get()->cursor_manager()->HideCursor(); |
| 137 } |
| 138 |
| 139 void ShellPortClassic::SetGlobalOverrideCursor( |
| 140 base::Optional<ui::CursorData> cursor) { |
| 141 // This is part of a fat interface that is only implemented on the mash side; |
| 142 // there isn't an equivalent operation in ::wm::CursorManager. We also can't |
| 143 // just call into ShellPortMash because of library linking issues. |
| 144 NOTREACHED(); |
| 145 } |
| 146 |
| 131 bool ShellPortClassic::IsMouseEventsEnabled() { | 147 bool ShellPortClassic::IsMouseEventsEnabled() { |
| 132 return Shell::Get()->cursor_manager()->IsMouseEventsEnabled(); | 148 return Shell::Get()->cursor_manager()->IsMouseEventsEnabled(); |
| 133 } | 149 } |
| 134 | 150 |
| 135 std::vector<WmWindow*> ShellPortClassic::GetAllRootWindows() { | 151 std::vector<WmWindow*> ShellPortClassic::GetAllRootWindows() { |
| 136 aura::Window::Windows root_windows = | 152 aura::Window::Windows root_windows = |
| 137 Shell::Get()->window_tree_host_manager()->GetAllRootWindows(); | 153 Shell::Get()->window_tree_host_manager()->GetAllRootWindows(); |
| 138 std::vector<WmWindow*> wm_windows(root_windows.size()); | 154 std::vector<WmWindow*> wm_windows(root_windows.size()); |
| 139 for (size_t i = 0; i < root_windows.size(); ++i) | 155 for (size_t i = 0; i < root_windows.size(); ++i) |
| 140 wm_windows[i] = WmWindow::Get(root_windows[i]); | 156 wm_windows[i] = WmWindow::Get(root_windows[i]); |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 for (auto& observer : display_observers_) | 301 for (auto& observer : display_observers_) |
| 286 observer.OnDisplayConfigurationChanging(); | 302 observer.OnDisplayConfigurationChanging(); |
| 287 } | 303 } |
| 288 | 304 |
| 289 void ShellPortClassic::OnDisplayConfigurationChanged() { | 305 void ShellPortClassic::OnDisplayConfigurationChanged() { |
| 290 for (auto& observer : display_observers_) | 306 for (auto& observer : display_observers_) |
| 291 observer.OnDisplayConfigurationChanged(); | 307 observer.OnDisplayConfigurationChanged(); |
| 292 } | 308 } |
| 293 | 309 |
| 294 } // namespace ash | 310 } // namespace ash |
| OLD | NEW |