Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: ash/mus/bridge/shell_port_mash.cc

Issue 2861173002: Add --use-ime-service command line flag to enable InputMethodMus in --mus. (Closed)
Patch Set: Addressed feedback. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/mus/ash_window_tree_host_mus.cc ('k') | ash/shell.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h" 43 #include "ash/wm/maximize_mode/maximize_mode_event_handler_aura.h"
44 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard.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_ozone. h" 45 #include "ash/wm/maximize_mode/scoped_disable_internal_mouse_and_keyboard_ozone. h"
46 #include "ash/wm/mru_window_tracker.h" 46 #include "ash/wm/mru_window_tracker.h"
47 #include "ash/wm/window_cycle_event_filter.h" 47 #include "ash/wm/window_cycle_event_filter.h"
48 #include "ash/wm/window_cycle_event_filter_aura.h" 48 #include "ash/wm/window_cycle_event_filter_aura.h"
49 #include "ash/wm/window_resizer.h" 49 #include "ash/wm/window_resizer.h"
50 #include "ash/wm/window_util.h" 50 #include "ash/wm/window_util.h"
51 #include "ash/wm/workspace/workspace_event_handler_aura.h" 51 #include "ash/wm/workspace/workspace_event_handler_aura.h"
52 #include "ash/wm_window.h" 52 #include "ash/wm_window.h"
53 #include "base/command_line.h"
53 #include "base/memory/ptr_util.h" 54 #include "base/memory/ptr_util.h"
54 #include "components/user_manager/user_info_impl.h" 55 #include "components/user_manager/user_info_impl.h"
55 #include "services/ui/public/interfaces/constants.mojom.h" 56 #include "services/ui/public/interfaces/constants.mojom.h"
56 #include "ui/aura/env.h" 57 #include "ui/aura/env.h"
57 #include "ui/aura/mus/focus_synchronizer.h" 58 #include "ui/aura/mus/focus_synchronizer.h"
58 #include "ui/aura/mus/window_tree_client.h" 59 #include "ui/aura/mus/window_tree_client.h"
59 #include "ui/aura/mus/window_tree_host_mus.h" 60 #include "ui/aura/mus/window_tree_host_mus.h"
60 #include "ui/aura/mus/window_tree_host_mus_init_params.h" 61 #include "ui/aura/mus/window_tree_host_mus_init_params.h"
61 #include "ui/aura/window.h" 62 #include "ui/aura/window.h"
62 #include "ui/display/manager/display_manager.h" 63 #include "ui/display/manager/display_manager.h"
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 if (mirrored_display.is_valid()) { 483 if (mirrored_display.is_valid()) {
483 display_params->display = 484 display_params->display =
484 base::MakeUnique<display::Display>(mirrored_display); 485 base::MakeUnique<display::Display>(mirrored_display);
485 } 486 }
486 // TODO: wire update is_primary_display correctly. 487 // TODO: wire update is_primary_display correctly.
487 display_params->is_primary_display = true; 488 display_params->is_primary_display = true;
488 aura::WindowTreeHostMusInitParams aura_init_params = 489 aura::WindowTreeHostMusInitParams aura_init_params =
489 window_manager_->window_manager_client()->CreateInitParamsForNewDisplay(); 490 window_manager_->window_manager_client()->CreateInitParamsForNewDisplay();
490 aura_init_params.display_id = init_params.display_id; 491 aura_init_params.display_id = init_params.display_id;
491 aura_init_params.display_init_params = std::move(display_params); 492 aura_init_params.display_init_params = std::move(display_params);
492 aura_init_params.use_classic_ime = true; 493 aura_init_params.use_classic_ime = !Shell::ShouldUseIMEService();
493 return base::MakeUnique<AshWindowTreeHostMus>(std::move(aura_init_params)); 494 return base::MakeUnique<AshWindowTreeHostMus>(std::move(aura_init_params));
494 } 495 }
495 496
496 void ShellPortMash::OnCreatedRootWindowContainers( 497 void ShellPortMash::OnCreatedRootWindowContainers(
497 RootWindowController* root_window_controller) { 498 RootWindowController* root_window_controller) {
498 // TODO: To avoid lots of IPC AddActivationParent() should take an array. 499 // TODO: To avoid lots of IPC AddActivationParent() should take an array.
499 // http://crbug.com/682048. 500 // http://crbug.com/682048.
500 aura::Window* root_window = root_window_controller->GetRootWindow(); 501 aura::Window* root_window = root_window_controller->GetRootWindow();
501 for (size_t i = 0; i < kNumActivatableShellWindowIds; ++i) { 502 for (size_t i = 0; i < kNumActivatableShellWindowIds; ++i) {
502 window_manager_->window_manager_client()->AddActivationParent( 503 window_manager_->window_manager_client()->AddActivationParent(
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 mash_state_->accelerator_controller_registrar = 565 mash_state_->accelerator_controller_registrar =
565 base ::MakeUnique<AcceleratorControllerRegistrar>( 566 base ::MakeUnique<AcceleratorControllerRegistrar>(
566 window_manager_, accelerator_namespace_id); 567 window_manager_, accelerator_namespace_id);
567 return base::MakeUnique<AcceleratorController>( 568 return base::MakeUnique<AcceleratorController>(
568 mash_state_->accelerator_controller_delegate.get(), 569 mash_state_->accelerator_controller_delegate.get(),
569 mash_state_->accelerator_controller_registrar.get()); 570 mash_state_->accelerator_controller_registrar.get());
570 } 571 }
571 572
572 } // namespace mus 573 } // namespace mus
573 } // namespace ash 574 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/ash_window_tree_host_mus.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698