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

Unified Diff: content/shell/browser/shell_platform_data_aura.cc

Issue 267723008: Retires ui::TranslatedKeyEvent and replaces it with KeyEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed AcceleratorControllerTest.MAYBE_ProcessOnce more. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/overlay_event_filter.cc ('k') | mojo/examples/launcher/launcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/shell_platform_data_aura.cc
diff --git a/content/shell/browser/shell_platform_data_aura.cc b/content/shell/browser/shell_platform_data_aura.cc
index 33b8073ba7be633573817b4a7eb455194fc6438f..673fa375c048a9398af1f6d5453d259c4bf813dd 100644
--- a/content/shell/browser/shell_platform_data_aura.cc
+++ b/content/shell/browser/shell_platform_data_aura.cc
@@ -82,12 +82,9 @@ class MinimalInputEventFilter : public ui::internal::InputMethodDelegate,
private:
// ui::EventHandler:
virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE {
- const ui::EventType type = event->type();
- if (type == ui::ET_TRANSLATED_KEY_PRESS ||
- type == ui::ET_TRANSLATED_KEY_RELEASE) {
- // The |event| is already handled by this object, change the type of the
- // event to ui::ET_KEY_* and pass it to the next filter.
- static_cast<ui::TranslatedKeyEvent*>(event)->ConvertToKeyEvent();
+ // See the comment in InputMethodEventFilter::OnKeyEvent() for details.
+ if (event->IsTranslated()) {
+ event->SetTranslated(false);
} else {
if (input_method_->DispatchKeyEvent(*event))
event->StopPropagation();
@@ -96,7 +93,10 @@ class MinimalInputEventFilter : public ui::internal::InputMethodDelegate,
// ui::internal::InputMethodDelegate:
virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) OVERRIDE {
- ui::TranslatedKeyEvent aura_event(event);
+ // See the comment in InputMethodEventFilter::DispatchKeyEventPostIME() for
+ // details.
+ ui::KeyEvent aura_event(event);
+ aura_event.SetTranslated(true);
ui::EventDispatchDetails details =
host_->dispatcher()->OnEventFromSource(&aura_event);
return aura_event.handled() || details.dispatcher_destroyed;
« no previous file with comments | « ash/wm/overlay_event_filter.cc ('k') | mojo/examples/launcher/launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698