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

Unified Diff: ash/host/ash_window_tree_host_ozone.cc

Issue 1236923003: Makes DesktopWindowTreeHostXxx to dispatch key event to InputMethod. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: ash/host/ash_window_tree_host_ozone.cc
diff --git a/ash/host/ash_window_tree_host_ozone.cc b/ash/host/ash_window_tree_host_ozone.cc
index eca31179fb2880df13ea10bc92fb78e2abee3474..44d46d32263de424357dd54a6c170133abdea130 100644
--- a/ash/host/ash_window_tree_host_ozone.cc
+++ b/ash/host/ash_window_tree_host_ozone.cc
@@ -13,6 +13,7 @@
#include "base/trace_event/trace_event.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host_ozone.h"
+#include "ui/events/event_processor.h"
#include "ui/events/null_event_targeter.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/gfx/transform.h"
@@ -50,11 +51,6 @@ class AshWindowTreeHostOzone : public AshWindowTreeHost,
// ui::internal::InputMethodDelegate:
bool DispatchKeyEventPostIME(const ui::KeyEvent& event) override;
- // ui::EventSource:
- ui::EventDispatchDetails DeliverEventToProcessor(ui::Event* event) override {
- return ui::EventSource::DeliverEventToProcessor(event);
- }
-
// Temporarily disable the tap-to-click feature. Used on CrOS.
void SetTapToClickPaused(bool state);
@@ -145,7 +141,9 @@ bool AshWindowTreeHostOzone::DispatchKeyEventPostIME(
const ui::KeyEvent& event) {
ui::KeyEvent event_copy(event);
input_method_handler()->SetPostIME(true);
- ui::EventSource::DeliverEventToProcessor(&event_copy);
+ ui::EventDispatchDetails details =
+ event_processor()->OnEventFromSource(&event_copy);
+ DCHECK(!details.dispatcher_destroyed);
input_method_handler()->SetPostIME(false);
return event_copy.stopped_propagation();
}

Powered by Google App Engine
This is Rietveld 408576698