| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef InputEvent_h | 5 #ifndef InputEvent_h |
| 6 #define InputEvent_h | 6 #define InputEvent_h |
| 7 | 7 |
| 8 #include "core/dom/StaticRange.h" | 8 #include "core/dom/StaticRange.h" |
| 9 #include "core/events/InputEventInit.h" | 9 #include "core/events/InputEventInit.h" |
| 10 #include "core/events/UIEvent.h" | 10 #include "core/events/UIEvent.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 NotCancelable = false, | 42 NotCancelable = false, |
| 43 IsCancelable = true, | 43 IsCancelable = true, |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 enum EventIsComposing : bool { | 46 enum EventIsComposing : bool { |
| 47 NotComposing = false, | 47 NotComposing = false, |
| 48 IsComposing = true, | 48 IsComposing = true, |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 static InputEvent* createBeforeInput(InputType, const String& data, EventCan
celable, EventIsComposing, const RangeVector*); | 51 static InputEvent* createBeforeInput(InputType, const String& data, EventCan
celable, EventIsComposing, const RangeVector*); |
| 52 static InputEvent* createInput(InputType, const String& data, EventIsComposi
ng, const RangeVector*); |
| 52 | 53 |
| 53 String inputType() const; | 54 String inputType() const; |
| 54 const String& data() const { return m_data; } | 55 const String& data() const { return m_data; } |
| 55 bool isComposing() const { return m_isComposing; } | 56 bool isComposing() const { return m_isComposing; } |
| 56 // Returns a copy of target ranges during event dispatch, and returns an emp
ty | 57 // Returns a copy of target ranges during event dispatch, and returns an emp
ty |
| 57 // vector after dispatch. | 58 // vector after dispatch. |
| 58 StaticRangeVector getRanges() const; | 59 StaticRangeVector getRanges() const; |
| 59 | 60 |
| 60 bool isInputEvent() const override; | 61 bool isInputEvent() const override; |
| 61 | 62 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 84 explicit InputEventDispatchMediator(InputEvent*); | 85 explicit InputEventDispatchMediator(InputEvent*); |
| 85 InputEvent& event() const; | 86 InputEvent& event() const; |
| 86 DispatchEventResult dispatchEvent(EventDispatcher&) const override; | 87 DispatchEventResult dispatchEvent(EventDispatcher&) const override; |
| 87 }; | 88 }; |
| 88 | 89 |
| 89 DEFINE_EVENT_TYPE_CASTS(InputEvent); | 90 DEFINE_EVENT_TYPE_CASTS(InputEvent); |
| 90 | 91 |
| 91 } // namespace blink | 92 } // namespace blink |
| 92 | 93 |
| 93 #endif // InputEvent_h | 94 #endif // InputEvent_h |
| OLD | NEW |