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

Unified Diff: ui/aura/window_tree_host.cc

Issue 1236923003: Makes DesktopWindowTreeHostXxx to dispatch key event to InputMethod. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add TODO. Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/window_tree_host.h ('k') | ui/events/event_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_tree_host.cc
diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc
index 7c875e031ade14c751dcf3d5f5cffa8464953b66..c65c9271f4bc3bbdf7a0f6ffc03ec1d7ea6d6297 100644
--- a/ui/aura/window_tree_host.cc
+++ b/ui/aura/window_tree_host.cc
@@ -195,8 +195,7 @@ void WindowTreeHost::SetSharedInputMethod(ui::InputMethod* input_method) {
bool WindowTreeHost::DispatchKeyEventPostIME(const ui::KeyEvent& event) {
ui::KeyEvent copied_event(event);
- ui::EventDispatchDetails details =
- event_processor()->OnEventFromSource(&copied_event);
+ ui::EventDispatchDetails details = SendEventToProcessor(&copied_event);
DCHECK(!details.dispatcher_destroyed);
return copied_event.stopped_propagation();
}
@@ -306,18 +305,6 @@ ui::EventProcessor* WindowTreeHost::GetEventProcessor() {
return event_processor();
}
-ui::EventDispatchDetails WindowTreeHost::DeliverEventToProcessor(
- ui::Event* event) {
- if (event->IsKeyEvent()) {
- GetInputMethod()->DispatchKeyEvent(*static_cast<ui::KeyEvent*>(event));
- event->StopPropagation();
- // TODO(shuchen): pass around the EventDispatchDetails from
- // DispatchKeyEventPostIME instead of creating new from here.
- return ui::EventDispatchDetails();
- }
- return ui::EventSource::DeliverEventToProcessor(event);
-}
-
////////////////////////////////////////////////////////////////////////////////
// WindowTreeHost, private:
« no previous file with comments | « ui/aura/window_tree_host.h ('k') | ui/events/event_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698