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

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

Issue 1980113002: Add UMA metric for tracking root level listeners for blocking touch. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 void setChangedTouches(TouchList* changedTouches) { m_changedTouches = chang edTouches; } 75 void setChangedTouches(TouchList* changedTouches) { m_changedTouches = chang edTouches; }
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 void doneDispatchedEventAtCurrentTarget() override;
86
85 EventDispatchMediator* createMediator() override; 87 EventDispatchMediator* createMediator() override;
86 88
87 DECLARE_VIRTUAL_TRACE(); 89 DECLARE_VIRTUAL_TRACE();
88 90
89 private: 91 private:
90 TouchEvent(); 92 TouchEvent();
91 TouchEvent(TouchList* touches, TouchList* targetTouches, 93 TouchEvent(TouchList* touches, TouchList* targetTouches,
92 TouchList* changedTouches, const AtomicString& type, 94 TouchList* changedTouches, const AtomicString& type,
93 AbstractView*, PlatformEvent::Modifiers, 95 AbstractView*, PlatformEvent::Modifiers,
94 bool cancelable, bool causesScrollingIfUncanceled, 96 bool cancelable, bool causesScrollingIfUncanceled,
95 double platformTimeStamp); 97 double platformTimeStamp);
96 TouchEvent(const AtomicString&, const TouchEventInit&); 98 TouchEvent(const AtomicString&, const TouchEventInit&);
97 99
98 Member<TouchList> m_touches; 100 Member<TouchList> m_touches;
99 Member<TouchList> m_targetTouches; 101 Member<TouchList> m_targetTouches;
100 Member<TouchList> m_changedTouches; 102 Member<TouchList> m_changedTouches;
101 bool m_causesScrollingIfUncanceled; 103 bool m_causesScrollingIfUncanceled;
104 bool m_previousDefaultPrevented;
tdresser 2016/05/17 14:56:54 Previous what? Maybe: bool defaultPreventedBefore
dtapuska 2016/05/17 20:50:13 Done.
102 }; 105 };
103 106
104 class TouchEventDispatchMediator final : public EventDispatchMediator { 107 class TouchEventDispatchMediator final : public EventDispatchMediator {
105 public: 108 public:
106 static TouchEventDispatchMediator* create(TouchEvent*); 109 static TouchEventDispatchMediator* create(TouchEvent*);
107 110
108 private: 111 private:
109 explicit TouchEventDispatchMediator(TouchEvent*); 112 explicit TouchEventDispatchMediator(TouchEvent*);
110 TouchEvent& event() const; 113 TouchEvent& event() const;
111 DispatchEventResult dispatchEvent(EventDispatcher&) const override; 114 DispatchEventResult dispatchEvent(EventDispatcher&) const override;
112 }; 115 };
113 116
114 DEFINE_EVENT_TYPE_CASTS(TouchEvent); 117 DEFINE_EVENT_TYPE_CASTS(TouchEvent);
115 118
116 } // namespace blink 119 } // namespace blink
117 120
118 #endif // TouchEvent_h 121 #endif // TouchEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698