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/mus/bridge/shell_port_mash.h" | 5 #include "ash/mus/bridge/shell_port_mash.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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 if (GetAshConfig() == Config::MUS) { | 266 if (GetAshConfig() == Config::MUS) { |
267 Shell::Get() | 267 Shell::Get() |
268 ->window_tree_host_manager() | 268 ->window_tree_host_manager() |
269 ->UpdateWorkAreaOfDisplayNearestWindow(window->aura_window(), insets); | 269 ->UpdateWorkAreaOfDisplayNearestWindow(window->aura_window(), insets); |
270 return; | 270 return; |
271 } | 271 } |
272 window_manager_->screen()->SetWorkAreaInsets(window->aura_window(), insets); | 272 window_manager_->screen()->SetWorkAreaInsets(window->aura_window(), insets); |
273 } | 273 } |
274 | 274 |
275 void ShellPortMash::LockCursor() { | 275 void ShellPortMash::LockCursor() { |
276 // TODO: http://crbug.com/637853 | 276 window_manager_->window_manager_client()->LockCursor(); |
277 NOTIMPLEMENTED(); | |
278 } | 277 } |
279 | 278 |
280 void ShellPortMash::UnlockCursor() { | 279 void ShellPortMash::UnlockCursor() { |
281 // TODO: http://crbug.com/637853 | 280 window_manager_->window_manager_client()->UnlockCursor(); |
282 NOTIMPLEMENTED(); | 281 } |
| 282 |
| 283 void ShellPortMash::ShowCursor() { |
| 284 window_manager_->window_manager_client()->SetCursorVisible(true); |
| 285 } |
| 286 |
| 287 void ShellPortMash::HideCursor() { |
| 288 window_manager_->window_manager_client()->SetCursorVisible(false); |
| 289 } |
| 290 |
| 291 void ShellPortMash::SetGlobalOverrideCursor( |
| 292 base::Optional<ui::CursorData> cursor) { |
| 293 window_manager_->window_manager_client()->SetGlobalOverrideCursor( |
| 294 std::move(cursor)); |
283 } | 295 } |
284 | 296 |
285 bool ShellPortMash::IsMouseEventsEnabled() { | 297 bool ShellPortMash::IsMouseEventsEnabled() { |
286 // TODO: http://crbug.com/637853 | 298 // TODO: http://crbug.com/637853 |
287 NOTIMPLEMENTED(); | 299 NOTIMPLEMENTED(); |
288 return true; | 300 return true; |
289 } | 301 } |
290 | 302 |
291 std::vector<WmWindow*> ShellPortMash::GetAllRootWindows() { | 303 std::vector<WmWindow*> ShellPortMash::GetAllRootWindows() { |
292 if (GetAshConfig() == Config::MUS) { | 304 if (GetAshConfig() == Config::MUS) { |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 observer.OnDisplayConfigurationChanging(); | 632 observer.OnDisplayConfigurationChanging(); |
621 } | 633 } |
622 | 634 |
623 void ShellPortMash::OnDisplayConfigurationChanged() { | 635 void ShellPortMash::OnDisplayConfigurationChanged() { |
624 for (auto& observer : display_observers_) | 636 for (auto& observer : display_observers_) |
625 observer.OnDisplayConfigurationChanged(); | 637 observer.OnDisplayConfigurationChanged(); |
626 } | 638 } |
627 | 639 |
628 } // namespace mus | 640 } // namespace mus |
629 } // namespace ash | 641 } // namespace ash |
OLD | NEW |