OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All Rights Reserved. | 2 * Copyright (C) 2014 Google Inc. All Rights Reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 10 matching lines...) Expand all Loading... |
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 * | 24 * |
25 */ | 25 */ |
26 | 26 |
27 #ifndef TouchEventContext_h | 27 #ifndef TouchEventContext_h |
28 #define TouchEventContext_h | 28 #define TouchEventContext_h |
29 | 29 |
30 #include "platform/heap/Handle.h" | 30 #include "platform/heap/Handle.h" |
31 #include "wtf/PassRefPtr.h" | |
32 #include "wtf/RefCounted.h" | |
33 #include "wtf/RefPtr.h" | |
34 | 31 |
35 namespace blink { | 32 namespace blink { |
36 | 33 |
37 class Event; | 34 class Event; |
38 class TouchList; | 35 class TouchList; |
39 | 36 |
40 class TouchEventContext : public GarbageCollected<TouchEventContext> { | 37 class TouchEventContext : public GarbageCollected<TouchEventContext> { |
41 public: | 38 public: |
42 static TouchEventContext* create(); | 39 static TouchEventContext* create(); |
43 void handleLocalEvents(Event&) const; | 40 void handleLocalEvents(Event&) const; |
44 TouchList& touches() { return *m_touches; } | 41 TouchList& touches() { return *m_touches; } |
45 TouchList& targetTouches() { return *m_targetTouches; } | 42 TouchList& targetTouches() { return *m_targetTouches; } |
46 TouchList& changedTouches() { return *m_changedTouches; } | 43 TouchList& changedTouches() { return *m_changedTouches; } |
47 | 44 |
48 DECLARE_TRACE(); | 45 DECLARE_TRACE(); |
49 | 46 |
50 private: | 47 private: |
51 TouchEventContext(); | 48 TouchEventContext(); |
52 | 49 |
53 Member<TouchList> m_touches; | 50 Member<TouchList> m_touches; |
54 Member<TouchList> m_targetTouches; | 51 Member<TouchList> m_targetTouches; |
55 Member<TouchList> m_changedTouches; | 52 Member<TouchList> m_changedTouches; |
56 }; | 53 }; |
57 | 54 |
58 } // namespace blink | 55 } // namespace blink |
59 | 56 |
60 #endif // TouchEventContext_h | 57 #endif // TouchEventContext_h |
OLD | NEW |