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

Side by Side Diff: third_party/WebKit/Source/core/input/EventHandler.h

Issue 1426643008: Cleaning up PointerIdManager and add id re-mapping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix EXPECT_EQ compilation error on Android Created 5 years 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 (C) 2006, 2007, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2009, 2010, 2011 Apple 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
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 13 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
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 #ifndef EventHandler_h 26 #ifndef EventHandler_h
27 #define EventHandler_h 27 #define EventHandler_h
28 28
29 #include "core/CoreExport.h" 29 #include "core/CoreExport.h"
30 #include "core/events/PointerIdManager.h" 30 #include "core/events/PointerEventFactory.h"
31 #include "core/events/TextEventInputType.h" 31 #include "core/events/TextEventInputType.h"
32 #include "core/layout/HitTestRequest.h" 32 #include "core/layout/HitTestRequest.h"
33 #include "core/page/DragActions.h" 33 #include "core/page/DragActions.h"
34 #include "core/page/EventWithHitTestResults.h" 34 #include "core/page/EventWithHitTestResults.h"
35 #include "core/style/ComputedStyleConstants.h" 35 #include "core/style/ComputedStyleConstants.h"
36 #include "platform/Cursor.h" 36 #include "platform/Cursor.h"
37 #include "platform/PlatformMouseEvent.h" 37 #include "platform/PlatformMouseEvent.h"
38 #include "platform/PlatformTouchPoint.h" 38 #include "platform/PlatformTouchPoint.h"
39 #include "platform/Timer.h" 39 #include "platform/Timer.h"
40 #include "platform/UserGestureIndicator.h" 40 #include "platform/UserGestureIndicator.h"
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 // The target of each active touch point indexed by the touch ID. 416 // The target of each active touch point indexed by the touch ID.
417 using TouchTargetMap = WillBeHeapHashMap<unsigned, RefPtrWillBeMember<EventT arget>, DefaultHash<unsigned>::Hash, WTF::UnsignedWithZeroKeyHashTraits<unsigned >>; 417 using TouchTargetMap = WillBeHeapHashMap<unsigned, RefPtrWillBeMember<EventT arget>, DefaultHash<unsigned>::Hash, WTF::UnsignedWithZeroKeyHashTraits<unsigned >>;
418 TouchTargetMap m_targetForTouchID; 418 TouchTargetMap m_targetForTouchID;
419 419
420 // If set, the document of the active touch sequence. Unset if no touch sequ ence active. 420 // If set, the document of the active touch sequence. Unset if no touch sequ ence active.
421 RefPtrWillBeMember<Document> m_touchSequenceDocument; 421 RefPtrWillBeMember<Document> m_touchSequenceDocument;
422 RefPtr<UserGestureToken> m_touchSequenceUserGestureToken; 422 RefPtr<UserGestureToken> m_touchSequenceUserGestureToken;
423 423
424 bool m_touchPressed; 424 bool m_touchPressed;
425 425
426 PointerIdManager m_pointerIdManager; 426 PointerEventFactory m_pointerEventFactory;
427 427
428 // Prevents firing mousedown, mousemove & mouseup in-between a canceled poin terdown and next pointerup/pointercancel. 428 // Prevents firing mousedown, mousemove & mouseup in-between a canceled poin terdown and next pointerup/pointercancel.
429 // See "PREVENT MOUSE EVENT flag" in the spec: 429 // See "PREVENT MOUSE EVENT flag" in the spec:
430 // https://w3c.github.io/pointerevents/#compatibility-mapping-with-mouse-e vents 430 // https://w3c.github.io/pointerevents/#compatibility-mapping-with-mouse-e vents
431 bool m_preventMouseEventForPointerTypeMouse; 431 bool m_preventMouseEventForPointerTypeMouse;
432 432
433 // This is set upon sending a pointercancel for touch, prevents PE dispatche s for touches until 433 // This is set upon sending a pointercancel for touch, prevents PE dispatche s for touches until
434 // all touch-points become inactive. 434 // all touch-points become inactive.
435 // TODO(mustaq): Consider a state per pointerType, as in PointerIdManager? E xclude mouse? 435 // TODO(mustaq): Consider a state per pointerType, as in PointerIdManager? E xclude mouse?
436 bool m_inPointerCanceledState; 436 bool m_inPointerCanceledState;
(...skipping 23 matching lines...) Expand all
460 // scroll which shouldn't propagate can't cause any element to 460 // scroll which shouldn't propagate can't cause any element to
461 // scroll other than the |m_previousGestureScrolledNode|. 461 // scroll other than the |m_previousGestureScrolledNode|.
462 bool m_deltaConsumedForScrollSequence; 462 bool m_deltaConsumedForScrollSequence;
463 }; 463 };
464 464
465 } // namespace blink 465 } // namespace blink
466 466
467 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo); 467 WTF_ALLOW_INIT_WITH_MEM_FUNCTIONS(blink::EventHandler::TouchInfo);
468 468
469 #endif // EventHandler_h 469 #endif // EventHandler_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/PointerIdManager.cpp ('k') | third_party/WebKit/Source/core/input/EventHandler.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698