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

Unified Diff: ui/aura_shell/root_window_event_filter.cc

Issue 8576005: IME (input method editor) support for Aura, part 3 of 3: Use ui::InputMethod in ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, review Created 9 years 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: ui/aura_shell/root_window_event_filter.cc
diff --git a/ui/aura_shell/root_window_event_filter.cc b/ui/aura_shell/root_window_event_filter.cc
index b627341ebecd9ffd91c9a830f798a9fd9123bebc..68bb4b1a0fcd3cd38767b3c378067ea31d80ea38 100644
--- a/ui/aura_shell/root_window_event_filter.cc
+++ b/ui/aura_shell/root_window_event_filter.cc
@@ -69,6 +69,12 @@ bool RootWindowEventFilter::PreHandleKeyEvent(aura::Window* target,
return FilterKeyEvent(target, event);
}
+bool RootWindowEventFilter::PreHandleTranslatedKeyEvent(
+ aura::Window* target,
+ aura::TranslatedKeyEvent* event) {
+ return FilterTranslatedKeyEvent(target, event);
+}
+
bool RootWindowEventFilter::PreHandleMouseEvent(aura::Window* target,
aura::MouseEvent* event) {
// We must always update the cursor, otherwise the cursor can get stuck if an
@@ -123,6 +129,19 @@ bool RootWindowEventFilter::FilterKeyEvent(aura::Window* target,
return handled;
}
+bool RootWindowEventFilter::FilterTranslatedKeyEvent(
+ aura::Window* target,
+ aura::TranslatedKeyEvent* event) {
+ bool handled = false;
+ if (filters_.might_have_observers()) {
+ ObserverListBase<aura::EventFilter>::Iterator it(filters_);
+ aura::EventFilter* filter;
+ while (!handled && (filter = it.GetNext()) != NULL)
+ handled = filter->PreHandleTranslatedKeyEvent(target, event);
+ }
+ return handled;
+}
+
bool RootWindowEventFilter::FilterMouseEvent(aura::Window* target,
aura::MouseEvent* event) {
bool handled = false;

Powered by Google App Engine
This is Rietveld 408576698