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

Side by Side Diff: ash/host/ash_window_tree_host_platform.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 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/host/ash_window_tree_host_platform.h" 5 #include "ash/host/ash_window_tree_host_platform.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/host/root_window_transformer.h" 9 #include "ash/host/root_window_transformer.h"
10 #include "ash/host/transformer_helper.h" 10 #include "ash/host/transformer_helper.h"
11 #include "ash/ime/input_method_event_handler.h"
12 #include "base/trace_event/trace_event.h" 11 #include "base/trace_event/trace_event.h"
13 #include "ui/aura/window.h" 12 #include "ui/aura/window.h"
14 #include "ui/aura/window_tree_host_platform.h" 13 #include "ui/aura/window_tree_host_platform.h"
15 #include "ui/events/event_sink.h" 14 #include "ui/events/event_sink.h"
16 #include "ui/events/null_event_targeter.h" 15 #include "ui/events/null_event_targeter.h"
17 #include "ui/gfx/geometry/insets.h" 16 #include "ui/gfx/geometry/insets.h"
18 #include "ui/gfx/transform.h" 17 #include "ui/gfx/transform.h"
19 #include "ui/platform_window/platform_window.h" 18 #include "ui/platform_window/platform_window.h"
20 19
21 #if defined(USE_OZONE) 20 #if defined(USE_OZONE)
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 109
111 void AshWindowTreeHostPlatform::DispatchEvent(ui::Event* event) { 110 void AshWindowTreeHostPlatform::DispatchEvent(ui::Event* event) {
112 TRACE_EVENT0("input", "AshWindowTreeHostPlatform::DispatchEvent"); 111 TRACE_EVENT0("input", "AshWindowTreeHostPlatform::DispatchEvent");
113 if (event->IsLocatedEvent()) 112 if (event->IsLocatedEvent())
114 TranslateLocatedEvent(static_cast<ui::LocatedEvent*>(event)); 113 TranslateLocatedEvent(static_cast<ui::LocatedEvent*>(event));
115 SendEventToSink(event); 114 SendEventToSink(event);
116 } 115 }
117 116
118 ui::EventDispatchDetails AshWindowTreeHostPlatform::DispatchKeyEventPostIME( 117 ui::EventDispatchDetails AshWindowTreeHostPlatform::DispatchKeyEventPostIME(
119 ui::KeyEvent* event) { 118 ui::KeyEvent* event) {
120 input_method_handler()->SetPostIME(true); 119 return SendEventToSink(event);
sadrul 2017/05/15 14:44:24 Do you still need this override?
Hadi 2017/05/15 17:22:13 Done.
121 ui::EventDispatchDetails details = event_sink()->OnEventFromSource(event);
122 if (!details.dispatcher_destroyed)
123 input_method_handler()->SetPostIME(false);
124 return details;
125 } 120 }
126 121
127 void AshWindowTreeHostPlatform::SetTapToClickPaused(bool state) { 122 void AshWindowTreeHostPlatform::SetTapToClickPaused(bool state) {
128 #if defined(USE_OZONE) 123 #if defined(USE_OZONE)
129 DCHECK(ui::OzonePlatform::GetInstance()->GetInputController()); 124 DCHECK(ui::OzonePlatform::GetInstance()->GetInputController());
130 125
131 // Temporarily pause tap-to-click when the cursor is hidden. 126 // Temporarily pause tap-to-click when the cursor is hidden.
132 ui::OzonePlatform::GetInstance()->GetInputController()->SetTapToClickPaused( 127 ui::OzonePlatform::GetInstance()->GetInputController()->SetTapToClickPaused(
133 state); 128 state);
134 #endif 129 #endif
135 } 130 }
136 131
137 } // namespace ash 132 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698