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

Side by Side Diff: ash/mus/ash_window_tree_host_mus.cc

Issue 2872343003: Remove InputMethodEventHandler. (Closed)
Patch Set: Add a unittest. 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
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"
10 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
11 #include "ui/aura/mus/window_tree_host_mus_init_params.h" 10 #include "ui/aura/mus/window_tree_host_mus_init_params.h"
12 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
13 #include "ui/events/event_sink.h" 12 #include "ui/events/event_sink.h"
14 #include "ui/events/null_event_targeter.h" 13 #include "ui/events/null_event_targeter.h"
15 14
16 namespace ash { 15 namespace ash {
17 16
18 AshWindowTreeHostMus::AshWindowTreeHostMus( 17 AshWindowTreeHostMus::AshWindowTreeHostMus(
19 aura::WindowTreeHostMusInitParams init_params) 18 aura::WindowTreeHostMusInitParams init_params)
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return transformer_helper_->GetInverseTransform(); 80 return transformer_helper_->GetInverseTransform();
82 } 81 }
83 82
84 void AshWindowTreeHostMus::UpdateRootWindowSizeInPixels( 83 void AshWindowTreeHostMus::UpdateRootWindowSizeInPixels(
85 const gfx::Size& host_size_in_pixels) { 84 const gfx::Size& host_size_in_pixels) {
86 transformer_helper_->UpdateWindowSize(host_size_in_pixels); 85 transformer_helper_->UpdateWindowSize(host_size_in_pixels);
87 } 86 }
88 87
89 ui::EventDispatchDetails AshWindowTreeHostMus::DispatchKeyEventPostIME( 88 ui::EventDispatchDetails AshWindowTreeHostMus::DispatchKeyEventPostIME(
90 ui::KeyEvent* event) { 89 ui::KeyEvent* event) {
91 // input_method_handler() can be null when using IME service with --mus. 90 return SendEventToSink(event);
sadrul 2017/05/15 14:44:24 ditto
Hadi 2017/05/15 17:22:13 Done.
92 if (input_method_handler())
93 input_method_handler()->SetPostIME(true);
94 ui::EventDispatchDetails details = SendEventToSink(event);
95 if (input_method_handler() && !details.dispatcher_destroyed)
96 input_method_handler()->SetPostIME(false);
97 return details;
98 } 91 }
99 92
100 } // namespace ash 93 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698