Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2008, The Android Open Source Project | 2 * Copyright 2008, The Android Open Source Project |
| 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. | 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above copyright | 10 * * Redistributions in binary form must reproduce the above copyright |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 static TouchEvent* create() { return new TouchEvent; } | 46 static TouchEvent* create() { return new TouchEvent; } |
| 47 static TouchEvent* create(TouchList* touches, | 47 static TouchEvent* create(TouchList* touches, |
| 48 TouchList* targetTouches, | 48 TouchList* targetTouches, |
| 49 TouchList* changedTouches, | 49 TouchList* changedTouches, |
| 50 const AtomicString& type, | 50 const AtomicString& type, |
| 51 AbstractView* view, | 51 AbstractView* view, |
| 52 PlatformEvent::Modifiers modifiers, | 52 PlatformEvent::Modifiers modifiers, |
| 53 bool cancelable, | 53 bool cancelable, |
| 54 bool causesScrollingIfUncanceled, | 54 bool causesScrollingIfUncanceled, |
| 55 bool firstTouchMoveOrStart, | 55 bool firstTouchMoveOrStart, |
| 56 double platformTimeStamp) { | 56 double platformTimeStamp, |
| 57 TouchAction currentTouchAction) { | |
| 57 return new TouchEvent(touches, targetTouches, changedTouches, type, view, | 58 return new TouchEvent(touches, targetTouches, changedTouches, type, view, |
| 58 modifiers, cancelable, causesScrollingIfUncanceled, | 59 modifiers, cancelable, causesScrollingIfUncanceled, |
| 59 firstTouchMoveOrStart, platformTimeStamp); | 60 firstTouchMoveOrStart, platformTimeStamp, |
| 61 currentTouchAction); | |
| 60 } | 62 } |
| 61 | 63 |
| 62 static TouchEvent* create(const AtomicString& type, | 64 static TouchEvent* create(const AtomicString& type, |
| 63 const TouchEventInit& initializer) { | 65 const TouchEventInit& initializer) { |
| 64 return new TouchEvent(type, initializer); | 66 return new TouchEvent(type, initializer); |
| 65 } | 67 } |
| 66 | 68 |
| 67 TouchList* touches() const { return m_touches.get(); } | 69 TouchList* touches() const { return m_touches.get(); } |
| 68 TouchList* targetTouches() const { return m_targetTouches.get(); } | 70 TouchList* targetTouches() const { return m_targetTouches.get(); } |
| 69 TouchList* changedTouches() const { return m_changedTouches.get(); } | 71 TouchList* changedTouches() const { return m_changedTouches.get(); } |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 96 TouchEvent(); | 98 TouchEvent(); |
| 97 TouchEvent(TouchList* touches, | 99 TouchEvent(TouchList* touches, |
| 98 TouchList* targetTouches, | 100 TouchList* targetTouches, |
| 99 TouchList* changedTouches, | 101 TouchList* changedTouches, |
| 100 const AtomicString& type, | 102 const AtomicString& type, |
| 101 AbstractView*, | 103 AbstractView*, |
| 102 PlatformEvent::Modifiers, | 104 PlatformEvent::Modifiers, |
| 103 bool cancelable, | 105 bool cancelable, |
| 104 bool causesScrollingIfUncanceled, | 106 bool causesScrollingIfUncanceled, |
| 105 bool firstTouchMoveOrStart, | 107 bool firstTouchMoveOrStart, |
| 106 double platformTimeStamp); | 108 double platformTimeStamp, |
| 109 TouchAction currentTouchAction); | |
| 107 TouchEvent(const AtomicString&, const TouchEventInit&); | 110 TouchEvent(const AtomicString&, const TouchEventInit&); |
| 108 | 111 |
| 109 Member<TouchList> m_touches; | 112 Member<TouchList> m_touches; |
| 110 Member<TouchList> m_targetTouches; | 113 Member<TouchList> m_targetTouches; |
| 111 Member<TouchList> m_changedTouches; | 114 Member<TouchList> m_changedTouches; |
| 112 bool m_causesScrollingIfUncanceled; | 115 bool m_causesScrollingIfUncanceled; |
| 113 bool m_firstTouchMoveOrStart; | 116 bool m_firstTouchMoveOrStart; |
| 114 bool m_defaultPreventedBeforeCurrentTarget; | 117 bool m_defaultPreventedBeforeCurrentTarget; |
| 118 TouchAction m_currentTouchAction; | |
|
Rick Byers
2016/11/07 17:01:09
Define this precisely in a comment. Is it the tou
dtapuska
2016/11/07 18:51:40
Done.
| |
| 115 }; | 119 }; |
| 116 | 120 |
| 117 class TouchEventDispatchMediator final : public EventDispatchMediator { | 121 class TouchEventDispatchMediator final : public EventDispatchMediator { |
| 118 public: | 122 public: |
| 119 static TouchEventDispatchMediator* create(TouchEvent*); | 123 static TouchEventDispatchMediator* create(TouchEvent*); |
| 120 | 124 |
| 121 private: | 125 private: |
| 122 explicit TouchEventDispatchMediator(TouchEvent*); | 126 explicit TouchEventDispatchMediator(TouchEvent*); |
| 123 TouchEvent& event() const; | 127 TouchEvent& event() const; |
| 124 DispatchEventResult dispatchEvent(EventDispatcher&) const override; | 128 DispatchEventResult dispatchEvent(EventDispatcher&) const override; |
| 125 }; | 129 }; |
| 126 | 130 |
| 127 DEFINE_EVENT_TYPE_CASTS(TouchEvent); | 131 DEFINE_EVENT_TYPE_CASTS(TouchEvent); |
| 128 | 132 |
| 129 } // namespace blink | 133 } // namespace blink |
| 130 | 134 |
| 131 #endif // TouchEvent_h | 135 #endif // TouchEvent_h |
| OLD | NEW |