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

Side by Side Diff: ash/display/window_tree_host_manager.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/ash_switches.cc ('k') | ash/mus/ash_window_tree_host_mus.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/display/window_tree_host_manager.h" 5 #include "ash/display/window_tree_host_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 params_with_bounds.offscreen = 817 params_with_bounds.offscreen =
818 display.id() == display::DisplayManager::kUnifiedDisplayId; 818 display.id() == display::DisplayManager::kUnifiedDisplayId;
819 params_with_bounds.display_id = display.id(); 819 params_with_bounds.display_id = display.id();
820 params_with_bounds.device_scale_factor = display.device_scale_factor(); 820 params_with_bounds.device_scale_factor = display.device_scale_factor();
821 params_with_bounds.ui_scale_factor = display_info.configured_ui_scale(); 821 params_with_bounds.ui_scale_factor = display_info.configured_ui_scale();
822 // The AshWindowTreeHost ends up owned by the RootWindowControllers created 822 // The AshWindowTreeHost ends up owned by the RootWindowControllers created
823 // by this class. 823 // by this class.
824 AshWindowTreeHost* ash_host = 824 AshWindowTreeHost* ash_host =
825 AshWindowTreeHost::Create(params_with_bounds).release(); 825 AshWindowTreeHost::Create(params_with_bounds).release();
826 aura::WindowTreeHost* host = ash_host->AsWindowTreeHost(); 826 aura::WindowTreeHost* host = ash_host->AsWindowTreeHost();
827 // In mash input method is hosted by the browser process, so we don't need to 827 // When using IME service, input method is hosted by the browser process, so
828 // create and set it here. 828 // we don't need to create and set it here.
829 if (Shell::GetAshConfig() != Config::MASH) { 829 if (!Shell::ShouldUseIMEService()) {
830 DCHECK(!host->has_input_method()); 830 DCHECK(!host->has_input_method());
831 if (!input_method_) { // Singleton input method instance for Ash. 831 if (!input_method_) { // Singleton input method instance for Ash.
832 input_method_ = ui::CreateInputMethod(this, host->GetAcceleratedWidget()); 832 input_method_ = ui::CreateInputMethod(this, host->GetAcceleratedWidget());
833 // Makes sure the input method is focused by default when created, because 833 // Makes sure the input method is focused by default when created, because
834 // Ash uses singleton InputMethod and it won't call OnFocus/OnBlur when 834 // Ash uses singleton InputMethod and it won't call OnFocus/OnBlur when
835 // the active window changed. 835 // the active window changed.
836 input_method_->OnFocus(); 836 input_method_->OnFocus();
837 input_method_event_handler_.reset( 837 input_method_event_handler_.reset(
838 new InputMethodEventHandler(input_method_.get())); 838 new InputMethodEventHandler(input_method_.get()));
839 } 839 }
(...skipping 15 matching lines...) Expand all
855 855
856 window_tree_hosts_[display.id()] = ash_host; 856 window_tree_hosts_[display.id()] = ash_host;
857 SetDisplayPropertiesOnHost(ash_host, display); 857 SetDisplayPropertiesOnHost(ash_host, display);
858 858
859 if (switches::ConstrainPointerToRoot()) 859 if (switches::ConstrainPointerToRoot())
860 ash_host->ConfineCursorToRootWindow(); 860 ash_host->ConfineCursorToRootWindow();
861 return ash_host; 861 return ash_host;
862 } 862 }
863 863
864 } // namespace ash 864 } // namespace ash
OLDNEW
« no previous file with comments | « ash/ash_switches.cc ('k') | ash/mus/ash_window_tree_host_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698