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

Side by Side Diff: ash/host/ash_window_tree_host_platform.cc

Issue 2909603002: Revert of Remove InputMethodEventHandler. (Closed)
Patch Set: 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/host/ash_window_tree_host_platform.h ('k') | ash/host/ash_window_tree_host_unified.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 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"
11 #include "base/trace_event/trace_event.h" 12 #include "base/trace_event/trace_event.h"
12 #include "ui/aura/window.h" 13 #include "ui/aura/window.h"
13 #include "ui/aura/window_tree_host_platform.h" 14 #include "ui/aura/window_tree_host_platform.h"
14 #include "ui/events/event_sink.h" 15 #include "ui/events/event_sink.h"
15 #include "ui/events/null_event_targeter.h" 16 #include "ui/events/null_event_targeter.h"
16 #include "ui/gfx/geometry/insets.h" 17 #include "ui/gfx/geometry/insets.h"
17 #include "ui/gfx/transform.h" 18 #include "ui/gfx/transform.h"
18 #include "ui/platform_window/platform_window.h" 19 #include "ui/platform_window/platform_window.h"
19 20
20 #if defined(USE_OZONE) 21 #if defined(USE_OZONE)
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 ConfineCursorToRootWindow(); 108 ConfineCursorToRootWindow();
108 } 109 }
109 110
110 void AshWindowTreeHostPlatform::DispatchEvent(ui::Event* event) { 111 void AshWindowTreeHostPlatform::DispatchEvent(ui::Event* event) {
111 TRACE_EVENT0("input", "AshWindowTreeHostPlatform::DispatchEvent"); 112 TRACE_EVENT0("input", "AshWindowTreeHostPlatform::DispatchEvent");
112 if (event->IsLocatedEvent()) 113 if (event->IsLocatedEvent())
113 TranslateLocatedEvent(static_cast<ui::LocatedEvent*>(event)); 114 TranslateLocatedEvent(static_cast<ui::LocatedEvent*>(event));
114 SendEventToSink(event); 115 SendEventToSink(event);
115 } 116 }
116 117
118 ui::EventDispatchDetails AshWindowTreeHostPlatform::DispatchKeyEventPostIME(
119 ui::KeyEvent* event) {
120 input_method_handler()->SetPostIME(true);
121 ui::EventDispatchDetails details = event_sink()->OnEventFromSource(event);
122 if (!details.dispatcher_destroyed)
123 input_method_handler()->SetPostIME(false);
124 return details;
125 }
126
117 void AshWindowTreeHostPlatform::SetTapToClickPaused(bool state) { 127 void AshWindowTreeHostPlatform::SetTapToClickPaused(bool state) {
118 #if defined(USE_OZONE) 128 #if defined(USE_OZONE)
119 DCHECK(ui::OzonePlatform::GetInstance()->GetInputController()); 129 DCHECK(ui::OzonePlatform::GetInstance()->GetInputController());
120 130
121 // Temporarily pause tap-to-click when the cursor is hidden. 131 // Temporarily pause tap-to-click when the cursor is hidden.
122 ui::OzonePlatform::GetInstance()->GetInputController()->SetTapToClickPaused( 132 ui::OzonePlatform::GetInstance()->GetInputController()->SetTapToClickPaused(
123 state); 133 state);
124 #endif 134 #endif
125 } 135 }
126 136
127 } // namespace ash 137 } // namespace ash
OLDNEW
« no previous file with comments | « ash/host/ash_window_tree_host_platform.h ('k') | ash/host/ash_window_tree_host_unified.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698