Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: third_party/WebKit/Source/core/events/TouchEvent.h

Issue 1852663002: Oilpan: Remove WillBe types (part 9) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 23 matching lines...) Expand all
34 #include "core/events/TouchEventInit.h" 34 #include "core/events/TouchEventInit.h"
35 35
36 namespace blink { 36 namespace blink {
37 37
38 class CORE_EXPORT TouchEvent final : public UIEventWithKeyState { 38 class CORE_EXPORT TouchEvent final : public UIEventWithKeyState {
39 DEFINE_WRAPPERTYPEINFO(); 39 DEFINE_WRAPPERTYPEINFO();
40 public: 40 public:
41 ~TouchEvent() override; 41 ~TouchEvent() override;
42 42
43 // We only initialize sourceCapabilities when we create TouchEvent from Even tHandler, null if it is from JavaScript. 43 // We only initialize sourceCapabilities when we create TouchEvent from Even tHandler, null if it is from JavaScript.
44 static PassRefPtrWillBeRawPtr<TouchEvent> create() 44 static RawPtr<TouchEvent> create()
45 { 45 {
46 return adoptRefWillBeNoop(new TouchEvent); 46 return adoptRefWillBeNoop(new TouchEvent);
47 } 47 }
48 static PassRefPtrWillBeRawPtr<TouchEvent> create(TouchList* touches, 48 static RawPtr<TouchEvent> create(TouchList* touches,
49 TouchList* targetTouches, TouchList* changedTouches, 49 TouchList* targetTouches, TouchList* changedTouches,
50 const AtomicString& type, PassRefPtrWillBeRawPtr<AbstractView> view, 50 const AtomicString& type, RawPtr<AbstractView> view,
51 PlatformEvent::Modifiers modifiers, bool cancelable, bool causesScrollin gIfUncanceled, 51 PlatformEvent::Modifiers modifiers, bool cancelable, bool causesScrollin gIfUncanceled,
52 double platformTimeStamp) 52 double platformTimeStamp)
53 { 53 {
54 return adoptRefWillBeNoop(new TouchEvent(touches, targetTouches, changed Touches, type, view, 54 return new TouchEvent(touches, targetTouches, changedTouches, type, view ,
55 modifiers, cancelable, causesScrollingIfUncanceled, platformTimeStam p)); 55 modifiers, cancelable, causesScrollingIfUncanceled, platformTimeStam p);
56 } 56 }
57 57
58 static PassRefPtrWillBeRawPtr<TouchEvent> create(const AtomicString& type, c onst TouchEventInit& initializer) 58 static RawPtr<TouchEvent> create(const AtomicString& type, const TouchEventI nit& initializer)
59 { 59 {
60 return adoptRefWillBeNoop(new TouchEvent(type, initializer)); 60 return new TouchEvent(type, initializer);
61 } 61 }
62 62
63 void initTouchEvent(ScriptState*, TouchList* touches, TouchList* targetTouch es, 63 void initTouchEvent(ScriptState*, TouchList* touches, TouchList* targetTouch es,
64 TouchList* changedTouches, const AtomicString& type, 64 TouchList* changedTouches, const AtomicString& type,
65 PassRefPtrWillBeRawPtr<AbstractView>, 65 RawPtr<AbstractView>,
66 int, int, int, int, // unused useless members of web exposed API 66 int, int, int, int, // unused useless members of web exposed API
67 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); 67 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);
68 68
69 TouchList* touches() const { return m_touches.get(); } 69 TouchList* touches() const { return m_touches.get(); }
70 TouchList* targetTouches() const { return m_targetTouches.get(); } 70 TouchList* targetTouches() const { return m_targetTouches.get(); }
71 TouchList* changedTouches() const { return m_changedTouches.get(); } 71 TouchList* changedTouches() const { return m_changedTouches.get(); }
72 72
73 void setTouches(PassRefPtrWillBeRawPtr<TouchList> touches) { m_touches = tou ches; } 73 void setTouches(RawPtr<TouchList> touches) { m_touches = touches; }
74 void setTargetTouches(PassRefPtrWillBeRawPtr<TouchList> targetTouches) { m_t argetTouches = targetTouches; } 74 void setTargetTouches(RawPtr<TouchList> targetTouches) { m_targetTouches = t argetTouches; }
75 void setChangedTouches(PassRefPtrWillBeRawPtr<TouchList> changedTouches) { m _changedTouches = changedTouches; } 75 void setChangedTouches(RawPtr<TouchList> changedTouches) { m_changedTouches = changedTouches; }
76 76
77 bool causesScrollingIfUncanceled() const { return m_causesScrollingIfUncance led; } 77 bool causesScrollingIfUncanceled() const { return m_causesScrollingIfUncance led; }
78 78
79 bool isTouchEvent() const override; 79 bool isTouchEvent() const override;
80 80
81 const AtomicString& interfaceName() const override; 81 const AtomicString& interfaceName() const override;
82 82
83 void preventDefault() override; 83 void preventDefault() override;
84 84
85 PassRefPtrWillBeRawPtr<EventDispatchMediator> createMediator() override; 85 RawPtr<EventDispatchMediator> createMediator() override;
86 86
87 DECLARE_VIRTUAL_TRACE(); 87 DECLARE_VIRTUAL_TRACE();
88 88
89 private: 89 private:
90 TouchEvent(); 90 TouchEvent();
91 TouchEvent(TouchList* touches, TouchList* targetTouches, 91 TouchEvent(TouchList* touches, TouchList* targetTouches,
92 TouchList* changedTouches, const AtomicString& type, 92 TouchList* changedTouches, const AtomicString& type,
93 PassRefPtrWillBeRawPtr<AbstractView>, PlatformEvent::Modifiers, 93 RawPtr<AbstractView>, PlatformEvent::Modifiers,
94 bool cancelable, bool causesScrollingIfUncanceled, 94 bool cancelable, bool causesScrollingIfUncanceled,
95 double platformTimeStamp); 95 double platformTimeStamp);
96 TouchEvent(const AtomicString&, const TouchEventInit&); 96 TouchEvent(const AtomicString&, const TouchEventInit&);
97 97
98 RefPtrWillBeMember<TouchList> m_touches; 98 Member<TouchList> m_touches;
99 RefPtrWillBeMember<TouchList> m_targetTouches; 99 Member<TouchList> m_targetTouches;
100 RefPtrWillBeMember<TouchList> m_changedTouches; 100 Member<TouchList> m_changedTouches;
101 bool m_causesScrollingIfUncanceled; 101 bool m_causesScrollingIfUncanceled;
102 }; 102 };
103 103
104 class TouchEventDispatchMediator final : public EventDispatchMediator { 104 class TouchEventDispatchMediator final : public EventDispatchMediator {
105 public: 105 public:
106 static PassRefPtrWillBeRawPtr<TouchEventDispatchMediator> create(PassRefPtrW illBeRawPtr<TouchEvent>); 106 static RawPtr<TouchEventDispatchMediator> create(RawPtr<TouchEvent>);
107 107
108 private: 108 private:
109 explicit TouchEventDispatchMediator(PassRefPtrWillBeRawPtr<TouchEvent>); 109 explicit TouchEventDispatchMediator(RawPtr<TouchEvent>);
110 TouchEvent& event() const; 110 TouchEvent& event() const;
111 DispatchEventResult dispatchEvent(EventDispatcher&) const override; 111 DispatchEventResult dispatchEvent(EventDispatcher&) const override;
112 }; 112 };
113 113
114 DEFINE_EVENT_TYPE_CASTS(TouchEvent); 114 DEFINE_EVENT_TYPE_CASTS(TouchEvent);
115 115
116 } // namespace blink 116 } // namespace blink
117 117
118 #endif // TouchEvent_h 118 #endif // TouchEvent_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/TextEvent.cpp ('k') | third_party/WebKit/Source/core/events/TouchEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698