summaryrefslogtreecommitdiffstats
path: root/mojo
diff options
context:
space:
mode:
authoryukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-22 17:52:45 +0000
committeryukishiino@chromium.org <yukishiino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-22 17:52:45 +0000
commit19d46db411a6caba696d77dc88f7bc3adf31032f (patch)
tree83c4065d0da9539bae1b2f892d7d9322010633f2 /mojo
parent2ec3b46c57e95a12d56277a9355801dcdd200788 (diff)
downloadchromium_src-19d46db411a6caba696d77dc88f7bc3adf31032f.zip
chromium_src-19d46db411a6caba696d77dc88f7bc3adf31032f.tar.gz
chromium_src-19d46db411a6caba696d77dc88f7bc3adf31032f.tar.bz2
Retires ui::TranslatedKeyEvent and replaces it with KeyEvent.
BUG=339355 TEST=Run unittests. TBR=jamesr@chromium.org, pfeldman@chromium.org Review URL: https://codereview.chromium.org/267723008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272228 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo')
-rw-r--r--mojo/examples/launcher/launcher.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/mojo/examples/launcher/launcher.cc b/mojo/examples/launcher/launcher.cc
index f71294b..b1fe4b8 100644
--- a/mojo/examples/launcher/launcher.cc
+++ b/mojo/examples/launcher/launcher.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 =
root_->GetHost()->dispatcher()->OnEventFromSource(&aura_event);
return aura_event.handled() || details.dispatcher_destroyed;