Index: ui/events/event.h |
diff --git a/ui/events/event.h b/ui/events/event.h |
index 0a5d566ecfa501c1a281b3dad5f8c9b170a821c7..d85519fd777af14325bdec9cba714ab7fdffd0e9 100644 |
--- a/ui/events/event.h |
+++ b/ui/events/event.h |
@@ -556,6 +556,12 @@ class EVENTS_EXPORT KeyEvent : public Event { |
// in http://crbug.com/127142#c8, the normalization is necessary. |
void NormalizeFlags(); |
+ // Returns true if the key event has already been processed by an input method |
+ // and there is no need to pass the key event to the input method again. |
+ bool IsTranslated() const; |
+ // Marks this key event as translated or not translated. |
+ void SetTranslated(bool translated); |
+ |
protected: |
// This allows a subclass TranslatedKeyEvent to be a non character event. |
void set_is_char(bool is_char) { is_char_ = is_char; } |
@@ -577,29 +583,6 @@ class EVENTS_EXPORT KeyEvent : public Event { |
uint16 character_; |
}; |
-// A key event which is translated by an input method (IME). |
-// For example, if an IME receives a KeyEvent(VKEY_SPACE), and it does not |
-// consume the key, the IME usually generates and dispatches a |
-// TranslatedKeyEvent(VKEY_SPACE) event. If the IME receives a KeyEvent and |
-// it does consume the event, it might dispatch a |
-// TranslatedKeyEvent(VKEY_PROCESSKEY) event as defined in the DOM spec. |
-class EVENTS_EXPORT TranslatedKeyEvent : public 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, KeyboardCode key_code, int flags); |
- |
- explicit TranslatedKeyEvent(const KeyEvent& key_event); |
- |
- // Changes the type() of the object from ET_TRANSLATED_KEY_* to ET_KEY_* so |
- // that RenderWidgetHostViewAura and NativeWidgetAura could handle the event. |
- void ConvertToKeyEvent(); |
- |
- private: |
- DISALLOW_COPY_AND_ASSIGN(TranslatedKeyEvent); |
-}; |
- |
class EVENTS_EXPORT ScrollEvent : public MouseEvent { |
public: |
explicit ScrollEvent(const base::NativeEvent& native_event); |