| 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 27 matching lines...) Expand all Loading... |
| 38 DEFINE_WRAPPERTYPEINFO(); | 38 DEFINE_WRAPPERTYPEINFO(); |
| 39 public: | 39 public: |
| 40 virtual ~TouchEvent(); | 40 virtual ~TouchEvent(); |
| 41 | 41 |
| 42 static PassRefPtrWillBeRawPtr<TouchEvent> create() | 42 static PassRefPtrWillBeRawPtr<TouchEvent> create() |
| 43 { | 43 { |
| 44 return adoptRefWillBeNoop(new TouchEvent); | 44 return adoptRefWillBeNoop(new TouchEvent); |
| 45 } | 45 } |
| 46 static PassRefPtrWillBeRawPtr<TouchEvent> create(TouchList* touches, | 46 static PassRefPtrWillBeRawPtr<TouchEvent> create(TouchList* touches, |
| 47 TouchList* targetTouches, TouchList* changedTouches, | 47 TouchList* targetTouches, TouchList* changedTouches, |
| 48 const AtomicString& type, PassRefPtrWillBeRawPtr<AbstractView> view, | 48 const AtomicString& type, PassRefPtrWillBeRawPtr<AbstractView> view, Pas
sRefPtrWillBeRawPtr<InputDevice> sourceDevice, |
| 49 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool cancelable,
bool causesScrollingIfUncanceled, | 49 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool cancelable,
bool causesScrollingIfUncanceled, |
| 50 double uiCreateTime = 0) | 50 double uiCreateTime = 0) |
| 51 { | 51 { |
| 52 return adoptRefWillBeNoop(new TouchEvent(touches, targetTouches, changed
Touches, type, view, | 52 return adoptRefWillBeNoop(new TouchEvent(touches, targetTouches, changed
Touches, type, view, sourceDevice, |
| 53 ctrlKey, altKey, shiftKey, metaKey, cancelable, causesScrollingIfUnc
anceled, uiCreateTime)); | 53 ctrlKey, altKey, shiftKey, metaKey, cancelable, causesScrollingIfUnc
anceled, uiCreateTime)); |
| 54 } | 54 } |
| 55 | 55 |
| 56 void initTouchEvent(ScriptState*, TouchList* touches, TouchList* targetTouch
es, | 56 void initTouchEvent(ScriptState*, TouchList* touches, TouchList* targetTouch
es, |
| 57 TouchList* changedTouches, const AtomicString& type, | 57 TouchList* changedTouches, const AtomicString& type, |
| 58 PassRefPtrWillBeRawPtr<AbstractView>, | 58 PassRefPtrWillBeRawPtr<AbstractView>, |
| 59 int, int, int, int, // unused useless members of web exposed API | 59 int, int, int, int, // unused useless members of web exposed API |
| 60 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); | 60 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); |
| 61 | 61 |
| 62 TouchList* touches() const { return m_touches.get(); } | 62 TouchList* touches() const { return m_touches.get(); } |
| (...skipping 10 matching lines...) Expand all Loading... |
| 73 | 73 |
| 74 virtual const AtomicString& interfaceName() const override; | 74 virtual const AtomicString& interfaceName() const override; |
| 75 | 75 |
| 76 virtual void preventDefault() override; | 76 virtual void preventDefault() override; |
| 77 | 77 |
| 78 DECLARE_VIRTUAL_TRACE(); | 78 DECLARE_VIRTUAL_TRACE(); |
| 79 | 79 |
| 80 private: | 80 private: |
| 81 TouchEvent(); | 81 TouchEvent(); |
| 82 TouchEvent(TouchList* touches, TouchList* targetTouches, | 82 TouchEvent(TouchList* touches, TouchList* targetTouches, |
| 83 TouchList* changedTouches, const AtomicString& type, | 83 TouchList* changedTouches, const AtomicString& type, |
| 84 PassRefPtrWillBeRawPtr<AbstractView>, | 84 PassRefPtrWillBeRawPtr<AbstractView>, |
| 85 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool cancela
ble, bool causesScrollingIfUncanceled, | 85 PassRefPtrWillBeRawPtr<InputDevice> sourceDevice, |
| 86 double uiCreateTime = 0); | 86 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool cancelable,
bool causesScrollingIfUncanceled, |
| 87 double uiCreateTime = 0); |
| 87 | 88 |
| 88 RefPtrWillBeMember<TouchList> m_touches; | 89 RefPtrWillBeMember<TouchList> m_touches; |
| 89 RefPtrWillBeMember<TouchList> m_targetTouches; | 90 RefPtrWillBeMember<TouchList> m_targetTouches; |
| 90 RefPtrWillBeMember<TouchList> m_changedTouches; | 91 RefPtrWillBeMember<TouchList> m_changedTouches; |
| 91 bool m_causesScrollingIfUncanceled; | 92 bool m_causesScrollingIfUncanceled; |
| 92 }; | 93 }; |
| 93 | 94 |
| 94 class TouchEventDispatchMediator final : public EventDispatchMediator { | 95 class TouchEventDispatchMediator final : public EventDispatchMediator { |
| 95 public: | 96 public: |
| 96 static PassRefPtrWillBeRawPtr<TouchEventDispatchMediator> create(PassRefPtrW
illBeRawPtr<TouchEvent>); | 97 static PassRefPtrWillBeRawPtr<TouchEventDispatchMediator> create(PassRefPtrW
illBeRawPtr<TouchEvent>); |
| 97 | 98 |
| 98 private: | 99 private: |
| 99 explicit TouchEventDispatchMediator(PassRefPtrWillBeRawPtr<TouchEvent>); | 100 explicit TouchEventDispatchMediator(PassRefPtrWillBeRawPtr<TouchEvent>); |
| 100 TouchEvent& event() const; | 101 TouchEvent& event() const; |
| 101 virtual bool dispatchEvent(EventDispatcher&) const override; | 102 virtual bool dispatchEvent(EventDispatcher&) const override; |
| 102 }; | 103 }; |
| 103 | 104 |
| 104 DEFINE_EVENT_TYPE_CASTS(TouchEvent); | 105 DEFINE_EVENT_TYPE_CASTS(TouchEvent); |
| 105 | 106 |
| 106 } // namespace blink | 107 } // namespace blink |
| 107 | 108 |
| 108 #endif // TouchEvent_h | 109 #endif // TouchEvent_h |
| OLD | NEW |