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

Unified Diff: ash/ime/event.h

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: move to ash/ime/ 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
« no previous file with comments | « ash/ash.gyp ('k') | ash/ime/event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/ime/event.h
diff --git a/ash/ime/event.h b/ash/ime/event.h
new file mode 100644
index 0000000000000000000000000000000000000000..bfcd0c14a9d53cb6fb5c4f6e4b0528750d88652b
--- /dev/null
+++ b/ash/ime/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 ASH_WM_EVENT_H_
+#define ASH_WM_EVENT_H_
+#pragma once
+
+#include "ash/ash_export.h"
+#include "base/event_types.h"
+#include "ui/aura/event.h"
+#include "ui/base/events.h"
+#include "ui/base/keycodes/keyboard_codes.h"
+
+namespace ash {
+
+// 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 ASH_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 RenderWidgetHostViewAura and NativeWidgetAura could handle the event.
+ void ConvertToKeyEvent();
+};
+
+} // namespace ash
+
+#endif // ASH_WM_EVENT_H_
« no previous file with comments | « ash/ash.gyp ('k') | ash/ime/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698