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

Side by Side Diff: ash/mus/ash_window_tree_host_mus.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/display/window_tree_host_manager.cc ('k') | ash/mus/bridge/shell_port_mash.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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/ash_window_tree_host_mus.h" 5 #include "ash/mus/ash_window_tree_host_mus.h"
6 6
7 #include "ash/host/root_window_transformer.h" 7 #include "ash/host/root_window_transformer.h"
8 #include "ash/host/transformer_helper.h" 8 #include "ash/host/transformer_helper.h"
9 #include "ash/ime/input_method_event_handler.h" 9 #include "ash/ime/input_method_event_handler.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return transformer_helper_->GetInverseTransform(); 81 return transformer_helper_->GetInverseTransform();
82 } 82 }
83 83
84 void AshWindowTreeHostMus::UpdateRootWindowSizeInPixels( 84 void AshWindowTreeHostMus::UpdateRootWindowSizeInPixels(
85 const gfx::Size& host_size_in_pixels) { 85 const gfx::Size& host_size_in_pixels) {
86 transformer_helper_->UpdateWindowSize(host_size_in_pixels); 86 transformer_helper_->UpdateWindowSize(host_size_in_pixels);
87 } 87 }
88 88
89 ui::EventDispatchDetails AshWindowTreeHostMus::DispatchKeyEventPostIME( 89 ui::EventDispatchDetails AshWindowTreeHostMus::DispatchKeyEventPostIME(
90 ui::KeyEvent* event) { 90 ui::KeyEvent* event) {
91 input_method_handler()->SetPostIME(true); 91 // input_method_handler() can be null when using IME service with --mus.
92 if (input_method_handler())
93 input_method_handler()->SetPostIME(true);
92 ui::EventDispatchDetails details = SendEventToSink(event); 94 ui::EventDispatchDetails details = SendEventToSink(event);
93 if (!details.dispatcher_destroyed) 95 if (input_method_handler() && !details.dispatcher_destroyed)
94 input_method_handler()->SetPostIME(false); 96 input_method_handler()->SetPostIME(false);
95 return details; 97 return details;
96 } 98 }
97 99
98 } // namespace ash 100 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/window_tree_host_manager.cc ('k') | ash/mus/bridge/shell_port_mash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698