| 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" |
| 11 #include "ash/ash_switches.h" |
| 11 #include "ash/aura/key_event_watcher_aura.h" | 12 #include "ash/aura/key_event_watcher_aura.h" |
| 12 #include "ash/aura/pointer_watcher_adapter.h" | 13 #include "ash/aura/pointer_watcher_adapter.h" |
| 13 #include "ash/display/window_tree_host_manager.h" | 14 #include "ash/display/window_tree_host_manager.h" |
| 14 #include "ash/host/ash_window_tree_host_init_params.h" | 15 #include "ash/host/ash_window_tree_host_init_params.h" |
| 15 #include "ash/key_event_watcher.h" | 16 #include "ash/key_event_watcher.h" |
| 16 #include "ash/laser/laser_pointer_controller.h" | 17 #include "ash/laser/laser_pointer_controller.h" |
| 17 #include "ash/magnifier/partial_magnification_controller.h" | 18 #include "ash/magnifier/partial_magnification_controller.h" |
| 18 #include "ash/mus/accelerators/accelerator_controller_delegate_mus.h" | 19 #include "ash/mus/accelerators/accelerator_controller_delegate_mus.h" |
| 19 #include "ash/mus/accelerators/accelerator_controller_registrar.h" | 20 #include "ash/mus/accelerators/accelerator_controller_registrar.h" |
| 20 #include "ash/mus/ash_window_tree_host_mus.h" | 21 #include "ash/mus/ash_window_tree_host_mus.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 43 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" | 44 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" |
| 44 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard.h" | 45 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard.h" |
| 45 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.
h" | 46 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone.
h" |
| 46 #include "ash/wm/mru_window_tracker.h" | 47 #include "ash/wm/mru_window_tracker.h" |
| 47 #include "ash/wm/window_cycle_event_filter.h" | 48 #include "ash/wm/window_cycle_event_filter.h" |
| 48 #include "ash/wm/window_cycle_event_filter_aura.h" | 49 #include "ash/wm/window_cycle_event_filter_aura.h" |
| 49 #include "ash/wm/window_resizer.h" | 50 #include "ash/wm/window_resizer.h" |
| 50 #include "ash/wm/window_util.h" | 51 #include "ash/wm/window_util.h" |
| 51 #include "ash/wm/workspace/workspace_event_handler_aura.h" | 52 #include "ash/wm/workspace/workspace_event_handler_aura.h" |
| 52 #include "ash/wm_window.h" | 53 #include "ash/wm_window.h" |
| 54 #include "base/command_line.h" |
| 53 #include "base/memory/ptr_util.h" | 55 #include "base/memory/ptr_util.h" |
| 54 #include "components/user_manager/user_info_impl.h" | 56 #include "components/user_manager/user_info_impl.h" |
| 55 #include "services/ui/public/interfaces/constants.mojom.h" | 57 #include "services/ui/public/interfaces/constants.mojom.h" |
| 56 #include "ui/aura/env.h" | 58 #include "ui/aura/env.h" |
| 57 #include "ui/aura/mus/focus_synchronizer.h" | 59 #include "ui/aura/mus/focus_synchronizer.h" |
| 58 #include "ui/aura/mus/window_tree_client.h" | 60 #include "ui/aura/mus/window_tree_client.h" |
| 59 #include "ui/aura/mus/window_tree_host_mus.h" | 61 #include "ui/aura/mus/window_tree_host_mus.h" |
| 60 #include "ui/aura/mus/window_tree_host_mus_init_params.h" | 62 #include "ui/aura/mus/window_tree_host_mus_init_params.h" |
| 61 #include "ui/aura/window.h" | 63 #include "ui/aura/window.h" |
| 62 #include "ui/display/manager/display_manager.h" | 64 #include "ui/display/manager/display_manager.h" |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 if (mirrored_display.is_valid()) { | 484 if (mirrored_display.is_valid()) { |
| 483 display_params->display = | 485 display_params->display = |
| 484 base::MakeUnique<display::Display>(mirrored_display); | 486 base::MakeUnique<display::Display>(mirrored_display); |
| 485 } | 487 } |
| 486 // TODO: wire update is_primary_display correctly. | 488 // TODO: wire update is_primary_display correctly. |
| 487 display_params->is_primary_display = true; | 489 display_params->is_primary_display = true; |
| 488 aura::WindowTreeHostMusInitParams aura_init_params = | 490 aura::WindowTreeHostMusInitParams aura_init_params = |
| 489 window_manager_->window_manager_client()->CreateInitParamsForNewDisplay(); | 491 window_manager_->window_manager_client()->CreateInitParamsForNewDisplay(); |
| 490 aura_init_params.display_id = init_params.display_id; | 492 aura_init_params.display_id = init_params.display_id; |
| 491 aura_init_params.display_init_params = std::move(display_params); | 493 aura_init_params.display_init_params = std::move(display_params); |
| 492 aura_init_params.use_classic_ime = true; | 494 aura_init_params.use_classic_ime = |
| 495 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 496 switches::kUseServicifiedIME); |
| 493 return base::MakeUnique<AshWindowTreeHostMus>(std::move(aura_init_params)); | 497 return base::MakeUnique<AshWindowTreeHostMus>(std::move(aura_init_params)); |
| 494 } | 498 } |
| 495 | 499 |
| 496 void ShellPortMash::OnCreatedRootWindowContainers( | 500 void ShellPortMash::OnCreatedRootWindowContainers( |
| 497 RootWindowController* root_window_controller) { | 501 RootWindowController* root_window_controller) { |
| 498 // TODO: To avoid lots of IPC AddActivationParent() should take an array. | 502 // TODO: To avoid lots of IPC AddActivationParent() should take an array. |
| 499 // http://crbug.com/682048. | 503 // http://crbug.com/682048. |
| 500 aura::Window* root_window = root_window_controller->GetRootWindow(); | 504 aura::Window* root_window = root_window_controller->GetRootWindow(); |
| 501 for (size_t i = 0; i < kNumActivatableShellWindowIds; ++i) { | 505 for (size_t i = 0; i < kNumActivatableShellWindowIds; ++i) { |
| 502 window_manager_->window_manager_client()->AddActivationParent( | 506 window_manager_->window_manager_client()->AddActivationParent( |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 mash_state_->accelerator_controller_registrar = | 568 mash_state_->accelerator_controller_registrar = |
| 565 base ::MakeUnique<AcceleratorControllerRegistrar>( | 569 base ::MakeUnique<AcceleratorControllerRegistrar>( |
| 566 window_manager_, accelerator_namespace_id); | 570 window_manager_, accelerator_namespace_id); |
| 567 return base::MakeUnique<AcceleratorController>( | 571 return base::MakeUnique<AcceleratorController>( |
| 568 mash_state_->accelerator_controller_delegate.get(), | 572 mash_state_->accelerator_controller_delegate.get(), |
| 569 mash_state_->accelerator_controller_registrar.get()); | 573 mash_state_->accelerator_controller_registrar.get()); |
| 570 } | 574 } |
| 571 | 575 |
| 572 } // namespace mus | 576 } // namespace mus |
| 573 } // namespace ash | 577 } // namespace ash |
| OLD | NEW |