OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "config.h" | 5 #include "config.h" |
| 6 |
6 #include "core/events/PointerEvent.h" | 7 #include "core/events/PointerEvent.h" |
7 | 8 |
| 9 #include "core/events/EventDispatcher.h" |
| 10 |
8 namespace blink { | 11 namespace blink { |
9 | 12 |
10 PointerEvent::PointerEvent() | 13 PointerEvent::PointerEvent() |
11 : m_pointerId(0) | 14 : m_pointerId(0) |
12 , m_width(0) | 15 , m_width(0) |
13 , m_height(0) | 16 , m_height(0) |
14 , m_pressure(0) | 17 , m_pressure(0) |
15 , m_tiltX(0) | 18 , m_tiltX(0) |
16 , m_tiltY(0) | 19 , m_tiltY(0) |
17 , m_isPrimary(false) | 20 , m_isPrimary(false) |
(...skipping 31 matching lines...) Loading... |
49 bool PointerEvent::isPointerEvent() const | 52 bool PointerEvent::isPointerEvent() const |
50 { | 53 { |
51 return true; | 54 return true; |
52 } | 55 } |
53 | 56 |
54 DEFINE_TRACE(PointerEvent) | 57 DEFINE_TRACE(PointerEvent) |
55 { | 58 { |
56 MouseEvent::trace(visitor); | 59 MouseEvent::trace(visitor); |
57 } | 60 } |
58 | 61 |
| 62 PassRefPtrWillBeRawPtr<PointerEventDispatchMediator> PointerEventDispatchMediato
r::create(PassRefPtrWillBeRawPtr<PointerEvent> pointerEvent) |
| 63 { |
| 64 return adoptRefWillBeNoop(new PointerEventDispatchMediator(pointerEvent)); |
| 65 } |
| 66 |
| 67 PointerEventDispatchMediator::PointerEventDispatchMediator(PassRefPtrWillBeRawPt
r<PointerEvent> pointerEvent) |
| 68 : EventDispatchMediator(pointerEvent) |
| 69 { |
| 70 } |
| 71 |
| 72 PointerEvent& PointerEventDispatchMediator::event() const |
| 73 { |
| 74 return toPointerEvent(EventDispatchMediator::event()); |
| 75 } |
| 76 |
| 77 bool PointerEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) co
nst |
| 78 { |
| 79 fprintf(stderr, "mDebug %s:%d\n", __FILE__, __LINE__); |
| 80 return dispatcher.dispatch(); |
| 81 } |
| 82 |
59 } // namespace blink | 83 } // namespace blink |
OLD | NEW |