Index: ui/aura_shell/event.h |
diff --git a/ui/aura_shell/event.h b/ui/aura_shell/event.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4a48e4341c53d5657748849534eeed58079e0f3c |
--- /dev/null |
+++ b/ui/aura_shell/event.h |
@@ -0,0 +1,39 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_AURA_SHELL_EVENT_H_ |
+#define UI_AURA_SHELL_EVENT_H_ |
+#pragma once |
+ |
+#include "base/event_types.h" |
+#include "ui/aura/event.h" |
+#include "ui/aura_shell/aura_shell_export.h" |
+#include "ui/base/events.h" |
+#include "ui/base/keycodes/keyboard_codes.h" |
+ |
+namespace aura_shell { |
+ |
+// A key event which is translated by an input method (IME). |
+// For example, if an IME receives a KeyEvent(ui::VKEY_SPACE), and it does not |
+// consume the key, the IME usually generates and dispatches a |
+// TranslatedKeyEvent(ui::VKEY_SPACE) event. If the IME receives a KeyEvent and |
+// it does consume the event, it might dispatch a |
+// TranslatedKeyEvent(ui::VKEY_PROCESSKEY) event as defined in the DOM spec. |
+class AURA_SHELL_EXPORT TranslatedKeyEvent : public aura::KeyEvent { |
+ public: |
+ TranslatedKeyEvent(const base::NativeEvent& native_event, bool is_char); |
+ |
+ // Used for synthetic events such as a VKEY_PROCESSKEY key event. |
+ TranslatedKeyEvent(bool is_press, |
+ ui::KeyboardCode key_code, |
+ int flags); |
+ |
+ // Changes the type() of the object from ET_TRANSLATED_KEY_* to ET_KEY_* so |
+ // that RWHVA and NWA could handle the event. |
+ void ConvertToKeyEvent(); |
+}; |
+ |
+} // namespace aura_shell |
+ |
+#endif // UI_AURA_SHELL_EVENT_H_ |