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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 ->display_manager() | 251 ->display_manager() |
252 ->current_default_multi_display_mode() == | 252 ->current_default_multi_display_mode() == |
253 display::DisplayManager::UNIFIED; | 253 display::DisplayManager::UNIFIED; |
254 } | 254 } |
255 | 255 |
256 // TODO(mash): implement http://crbug.com/622480. | 256 // TODO(mash): implement http://crbug.com/622480. |
257 NOTIMPLEMENTED(); | 257 NOTIMPLEMENTED(); |
258 return false; | 258 return false; |
259 } | 259 } |
260 | 260 |
261 void ShellPortMash::SetDisplayWorkAreaInsets(WmWindow* window, | 261 void ShellPortMash::SetDisplayWorkAreaInsets(aura::Window* window, |
262 const gfx::Insets& insets) { | 262 const gfx::Insets& insets) { |
263 if (GetAshConfig() == Config::MUS) { | 263 if (GetAshConfig() == Config::MUS) { |
264 Shell::Get() | 264 Shell::Get() |
265 ->window_tree_host_manager() | 265 ->window_tree_host_manager() |
266 ->UpdateWorkAreaOfDisplayNearestWindow(window->aura_window(), insets); | 266 ->UpdateWorkAreaOfDisplayNearestWindow(window, insets); |
267 return; | 267 return; |
268 } | 268 } |
269 window_manager_->screen()->SetWorkAreaInsets(window->aura_window(), insets); | 269 window_manager_->screen()->SetWorkAreaInsets(window, insets); |
270 } | 270 } |
271 | 271 |
272 std::unique_ptr<display::TouchTransformSetter> | 272 std::unique_ptr<display::TouchTransformSetter> |
273 ShellPortMash::CreateTouchTransformDelegate() { | 273 ShellPortMash::CreateTouchTransformDelegate() { |
274 return base::MakeUnique<TouchTransformSetterMus>( | 274 return base::MakeUnique<TouchTransformSetterMus>( |
275 window_manager_->connector()); | 275 window_manager_->connector()); |
276 } | 276 } |
277 | 277 |
278 void ShellPortMash::LockCursor() { | 278 void ShellPortMash::LockCursor() { |
279 window_manager_->window_manager_client()->LockCursor(); | 279 window_manager_->window_manager_client()->LockCursor(); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 return nullptr; | 391 return nullptr; |
392 #endif | 392 #endif |
393 } | 393 } |
394 | 394 |
395 // TODO: needs implementation for mus, http://crbug.com/624967. | 395 // TODO: needs implementation for mus, http://crbug.com/624967. |
396 NOTIMPLEMENTED(); | 396 NOTIMPLEMENTED(); |
397 return nullptr; | 397 return nullptr; |
398 } | 398 } |
399 | 399 |
400 std::unique_ptr<WorkspaceEventHandler> | 400 std::unique_ptr<WorkspaceEventHandler> |
401 ShellPortMash::CreateWorkspaceEventHandler(WmWindow* workspace_window) { | 401 ShellPortMash::CreateWorkspaceEventHandler(aura::Window* workspace_window) { |
402 if (GetAshConfig() == Config::MUS) | 402 if (GetAshConfig() == Config::MUS) |
403 return base::MakeUnique<WorkspaceEventHandlerAura>(workspace_window); | 403 return base::MakeUnique<WorkspaceEventHandlerAura>(workspace_window); |
404 | 404 |
405 return base::MakeUnique<WorkspaceEventHandlerMus>( | 405 return base::MakeUnique<WorkspaceEventHandlerMus>(workspace_window); |
406 WmWindow::GetAuraWindow(workspace_window)); | |
407 } | 406 } |
408 | 407 |
409 std::unique_ptr<ImmersiveFullscreenController> | 408 std::unique_ptr<ImmersiveFullscreenController> |
410 ShellPortMash::CreateImmersiveFullscreenController() { | 409 ShellPortMash::CreateImmersiveFullscreenController() { |
411 return base::MakeUnique<ImmersiveFullscreenController>(); | 410 return base::MakeUnique<ImmersiveFullscreenController>(); |
412 } | 411 } |
413 | 412 |
414 std::unique_ptr<KeyboardUI> ShellPortMash::CreateKeyboardUI() { | 413 std::unique_ptr<KeyboardUI> ShellPortMash::CreateKeyboardUI() { |
415 if (GetAshConfig() == Config::MUS) | 414 if (GetAshConfig() == Config::MUS) |
416 return KeyboardUI::Create(); | 415 return KeyboardUI::Create(); |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 observer.OnDisplayConfigurationChanging(); | 634 observer.OnDisplayConfigurationChanging(); |
636 } | 635 } |
637 | 636 |
638 void ShellPortMash::OnDisplayConfigurationChanged() { | 637 void ShellPortMash::OnDisplayConfigurationChanged() { |
639 for (auto& observer : display_observers_) | 638 for (auto& observer : display_observers_) |
640 observer.OnDisplayConfigurationChanged(); | 639 observer.OnDisplayConfigurationChanged(); |
641 } | 640 } |
642 | 641 |
643 } // namespace mus | 642 } // namespace mus |
644 } // namespace ash | 643 } // namespace ash |
OLD | NEW |