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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 if (GetAshConfig() == Config::MUS) { | 235 if (GetAshConfig() == Config::MUS) { |
236 Shell::Get() | 236 Shell::Get() |
237 ->window_tree_host_manager() | 237 ->window_tree_host_manager() |
238 ->UpdateWorkAreaOfDisplayNearestWindow(window->aura_window(), insets); | 238 ->UpdateWorkAreaOfDisplayNearestWindow(window->aura_window(), insets); |
239 return; | 239 return; |
240 } | 240 } |
241 window_manager_->screen()->SetWorkAreaInsets(window->aura_window(), insets); | 241 window_manager_->screen()->SetWorkAreaInsets(window->aura_window(), insets); |
242 } | 242 } |
243 | 243 |
244 void ShellPortMash::LockCursor() { | 244 void ShellPortMash::LockCursor() { |
245 // TODO: http://crbug.com/637853 | 245 window_manager_->window_manager_client()->LockCursor(); |
246 NOTIMPLEMENTED(); | |
247 } | 246 } |
248 | 247 |
249 void ShellPortMash::UnlockCursor() { | 248 void ShellPortMash::UnlockCursor() { |
250 // TODO: http://crbug.com/637853 | 249 window_manager_->window_manager_client()->UnlockCursor(); |
251 NOTIMPLEMENTED(); | 250 } |
| 251 |
| 252 void ShellPortMash::ShowCursor() { |
| 253 window_manager_->window_manager_client()->ShowCursor(); |
| 254 } |
| 255 |
| 256 void ShellPortMash::HideCursor() { |
| 257 window_manager_->window_manager_client()->HideCursor(); |
| 258 } |
| 259 |
| 260 void ShellPortMash::SetGlobalOverrideCursor( |
| 261 base::Optional<ui::CursorData> cursor) { |
| 262 window_manager_->window_manager_client()->SetGlobalOverrideCursor( |
| 263 std::move(cursor)); |
252 } | 264 } |
253 | 265 |
254 bool ShellPortMash::IsMouseEventsEnabled() { | 266 bool ShellPortMash::IsMouseEventsEnabled() { |
255 // TODO: http://crbug.com/637853 | 267 // TODO: http://crbug.com/637853 |
256 NOTIMPLEMENTED(); | 268 NOTIMPLEMENTED(); |
257 return true; | 269 return true; |
258 } | 270 } |
259 | 271 |
260 std::vector<WmWindow*> ShellPortMash::GetAllRootWindows() { | 272 std::vector<WmWindow*> ShellPortMash::GetAllRootWindows() { |
261 if (GetAshConfig() == Config::MUS) { | 273 if (GetAshConfig() == Config::MUS) { |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 mash_state_->accelerator_controller_registrar = | 577 mash_state_->accelerator_controller_registrar = |
566 base ::MakeUnique<AcceleratorControllerRegistrar>( | 578 base ::MakeUnique<AcceleratorControllerRegistrar>( |
567 window_manager_, accelerator_namespace_id); | 579 window_manager_, accelerator_namespace_id); |
568 return base::MakeUnique<AcceleratorController>( | 580 return base::MakeUnique<AcceleratorController>( |
569 mash_state_->accelerator_controller_delegate.get(), | 581 mash_state_->accelerator_controller_delegate.get(), |
570 mash_state_->accelerator_controller_registrar.get()); | 582 mash_state_->accelerator_controller_registrar.get()); |
571 } | 583 } |
572 | 584 |
573 } // namespace mus | 585 } // namespace mus |
574 } // namespace ash | 586 } // namespace ash |
OLD | NEW |