OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef InputEvent_h |
| 6 #define InputEvent_h |
| 7 |
| 8 #include "core/events/InputEventInit.h" |
| 9 #include "core/events/UIEvent.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 class InputEvent final : public UIEvent { |
| 14 DEFINE_WRAPPERTYPEINFO(); |
| 15 |
| 16 public: |
| 17 static PassRefPtrWillBeRawPtr<InputEvent> create() |
| 18 { |
| 19 return adoptRefWillBeNoop(new InputEvent); |
| 20 } |
| 21 |
| 22 static PassRefPtrWillBeRawPtr<InputEvent> create(const AtomicString& type, c
onst InputEventInit& initializer) |
| 23 { |
| 24 return adoptRefWillBeNoop(new InputEvent(type, initializer)); |
| 25 } |
| 26 |
| 27 bool isInputEvent() const override; |
| 28 |
| 29 PassRefPtrWillBeRawPtr<EventDispatchMediator> createMediator() override; |
| 30 |
| 31 DECLARE_VIRTUAL_TRACE(); |
| 32 |
| 33 private: |
| 34 InputEvent(); |
| 35 InputEvent(const AtomicString&, const InputEventInit&); |
| 36 }; |
| 37 |
| 38 class InputEventDispatchMediator final : public EventDispatchMediator { |
| 39 public: |
| 40 static PassRefPtrWillBeRawPtr<InputEventDispatchMediator> create(PassRefPtrW
illBeRawPtr<InputEvent>); |
| 41 |
| 42 private: |
| 43 explicit InputEventDispatchMediator(PassRefPtrWillBeRawPtr<InputEvent>); |
| 44 InputEvent& event() const; |
| 45 bool dispatchEvent(EventDispatcher&) const override; |
| 46 }; |
| 47 |
| 48 DEFINE_EVENT_TYPE_CASTS(InputEvent); |
| 49 |
| 50 } // namespace blink |
| 51 |
| 52 #endif // InputEvent_h |
OLD | NEW |