Index: third_party/WebKit/Source/core/events/InputEvent.h |
diff --git a/third_party/WebKit/Source/core/events/InputEvent.h b/third_party/WebKit/Source/core/events/InputEvent.h |
index 8bfb45efe58379f7a6dbe1792045450897b70316..ed95254e59a15704d39961eff71d338ed128d411 100644 |
--- a/third_party/WebKit/Source/core/events/InputEvent.h |
+++ b/third_party/WebKit/Source/core/events/InputEvent.h |
@@ -24,6 +24,26 @@ public: |
return new InputEvent(type, initializer); |
} |
+ enum class InputType { |
+ None, |
+ InsertText, |
+ ReplaceContent, |
+ DeleteContent, |
+ DeleteComposedCharacter, |
+ Undo, |
+ Redo, |
+ |
+ // Add new input types immediately above this line. |
+ NumberOfInputTypes, |
+ }; |
+ |
+ static InputEvent* createBeforeInputTyping(InputType, const String& data); |
+ static InputEvent* createBeforeInputFromComposition(InputType, const String& data); |
+ static InputEvent* createBeforeInputEditorCommand(InputType, const String& data); |
+ |
+ String inputType() const; |
+ const String& data() const { return m_data; } |
+ |
bool isInputEvent() const override; |
DECLARE_VIRTUAL_TRACE(); |
@@ -31,6 +51,9 @@ public: |
private: |
InputEvent(); |
InputEvent(const AtomicString&, const InputEventInit&); |
+ |
+ InputType m_inputType; |
chongz
2016/04/13 00:34:28
Changed to enum.
|
+ String m_data; |
}; |
DEFINE_EVENT_TYPE_CASTS(InputEvent); |