| Index: mojo/examples/launcher/launcher.cc
|
| diff --git a/mojo/examples/launcher/launcher.cc b/mojo/examples/launcher/launcher.cc
|
| index 042a7bdbc2cdbabc3a5d994e3ce6665797e4eb2e..0b8e8c2ee6dd7d8242ce3fb20bdd7777a18e114a 100644
|
| --- a/mojo/examples/launcher/launcher.cc
|
| +++ b/mojo/examples/launcher/launcher.cc
|
| @@ -82,12 +82,10 @@ 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) {
|
| + if (event->IsTranslated()) {
|
| // 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();
|
| + event->SetTranslated(false);
|
| } else {
|
| if (input_method_->DispatchKeyEvent(*event))
|
| event->StopPropagation();
|
| @@ -96,7 +94,8 @@ class MinimalInputEventFilter : public ui::internal::InputMethodDelegate,
|
|
|
| // ui::internal::InputMethodDelegate:
|
| virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) OVERRIDE {
|
| - ui::TranslatedKeyEvent aura_event(event);
|
| + ui::KeyEvent aura_event(event);
|
| + aura_event.SetTranslated(true);
|
| ui::EventDispatchDetails details =
|
| root_->GetHost()->dispatcher()->OnEventFromSource(&aura_event);
|
| return aura_event.handled() || details.dispatcher_destroyed;
|
|
|