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 #include "core/events/InputEvent.h" |
| 6 |
| 7 #include "core/events/EventDispatcher.h" |
| 8 |
| 9 namespace blink { |
| 10 |
| 11 InputEvent::InputEvent() |
| 12 { |
| 13 } |
| 14 |
| 15 InputEvent::InputEvent(const AtomicString& type, const InputEventInit& initializ
er) |
| 16 : UIEvent(type, initializer) |
| 17 { |
| 18 } |
| 19 |
| 20 PassRefPtrWillBeRawPtr<EventDispatchMediator> InputEvent::createMediator() |
| 21 { |
| 22 return InputEventDispatchMediator::create(this); |
| 23 } |
| 24 |
| 25 bool InputEvent::isInputEvent() const |
| 26 { |
| 27 return true; |
| 28 } |
| 29 |
| 30 DEFINE_TRACE(InputEvent) |
| 31 { |
| 32 UIEvent::trace(visitor); |
| 33 } |
| 34 |
| 35 PassRefPtrWillBeRawPtr<InputEventDispatchMediator> InputEventDispatchMediator::c
reate(PassRefPtrWillBeRawPtr<InputEvent> inputEvent) |
| 36 { |
| 37 return adoptRefWillBeNoop(new InputEventDispatchMediator(inputEvent)); |
| 38 } |
| 39 |
| 40 InputEventDispatchMediator::InputEventDispatchMediator(PassRefPtrWillBeRawPtr<In
putEvent> inputEvent) |
| 41 : EventDispatchMediator(inputEvent) |
| 42 { |
| 43 } |
| 44 |
| 45 InputEvent& InputEventDispatchMediator::event() const |
| 46 { |
| 47 return toInputEvent(EventDispatchMediator::event()); |
| 48 } |
| 49 |
| 50 bool InputEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) cons
t |
| 51 { |
| 52 return EventDispatchMediator::dispatchEvent(dispatcher) && !event().defaultH
andled(); |
| 53 } |
| 54 |
| 55 } // namespace blink |
OLD | NEW |