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

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

Issue 2973963003: Release mouse pointer capture when it starts drag (Closed)
Patch Set: Remove is_cancel from parameters Created 3 years, 5 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PointerEventFactory_h 5 #ifndef PointerEventFactory_h
6 #define PointerEventFactory_h 6 #define PointerEventFactory_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/events/PointerEvent.h" 9 #include "core/events/PointerEvent.h"
10 #include "platform/wtf/Allocator.h" 10 #include "platform/wtf/Allocator.h"
11 #include "platform/wtf/HashMap.h" 11 #include "platform/wtf/HashMap.h"
12 #include "public/platform/WebPointerEvent.h"
12 #include "public/platform/WebPointerProperties.h" 13 #include "public/platform/WebPointerProperties.h"
13 14
14 namespace blink { 15 namespace blink {
15 16
16 // Helper class for tracking the pointer ids for each type of PointerEvents. 17 // Helper class for tracking the pointer ids for each type of PointerEvents.
17 // Using id re-mapping at this layer, this class makes sure that regardless of 18 // Using id re-mapping at this layer, this class makes sure that regardless of
18 // the domain of the id (i.e. in touch or pen) the corresponding pointer event 19 // the domain of the id (i.e. in touch or pen) the corresponding pointer event
19 // will have a unique id amongst all pointer events as per pointer events' 20 // will have a unique id amongst all pointer events as per pointer events'
20 // specification. This class intended to behave the same as existing browsers as 21 // specification. This class intended to behave the same as existing browsers as
21 // much as possible for compatibility reasons. Particularly it behaves very 22 // much as possible for compatibility reasons. Particularly it behaves very
(...skipping 12 matching lines...) Expand all
34 const Vector<WebMouseEvent>&, 35 const Vector<WebMouseEvent>&,
35 LocalDOMWindow*); 36 LocalDOMWindow*);
36 37
37 PointerEvent* Create(const WebTouchPoint&, 38 PointerEvent* Create(const WebTouchPoint&,
38 const Vector<std::pair<WebTouchPoint, TimeTicks>>&, 39 const Vector<std::pair<WebTouchPoint, TimeTicks>>&,
39 WebInputEvent::Modifiers, 40 WebInputEvent::Modifiers,
40 TimeTicks event_platform_time_stamp, 41 TimeTicks event_platform_time_stamp,
41 LocalFrame*, 42 LocalFrame*,
42 DOMWindow*); 43 DOMWindow*);
43 44
45 PointerEvent* CreatePointerCancelEvent(const WebPointerEvent&);
46
44 PointerEvent* CreatePointerCancelEvent( 47 PointerEvent* CreatePointerCancelEvent(
45 const int pointer_id, 48 const int pointer_id,
46 const WebPointerProperties::PointerType, 49 const WebPointerProperties::PointerType,
47 TimeTicks platfrom_time_stamp); 50 TimeTicks platfrom_time_stamp);
48 51
49 // For creating capture events (i.e got/lostpointercapture) 52 // For creating capture events (i.e got/lostpointercapture)
50 PointerEvent* CreatePointerCaptureEvent(PointerEvent*, const AtomicString&); 53 PointerEvent* CreatePointerCaptureEvent(PointerEvent*, const AtomicString&);
51 54
52 // For creating boundary events (i.e pointerout/leave/over/enter) 55 // For creating boundary events (i.e pointerout/leave/over/enter)
53 PointerEvent* CreatePointerBoundaryEvent(PointerEvent*, 56 PointerEvent* CreatePointerBoundaryEvent(PointerEvent*,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 WebPointerProperties::PointerType::kLastEntry) + 131 WebPointerProperties::PointerType::kLastEntry) +
129 1]; 132 1];
130 int id_count_[static_cast<int>( 133 int id_count_[static_cast<int>(
131 WebPointerProperties::PointerType::kLastEntry) + 134 WebPointerProperties::PointerType::kLastEntry) +
132 1]; 135 1];
133 }; 136 };
134 137
135 } // namespace blink 138 } // namespace blink
136 139
137 #endif // PointerEventFactory_h 140 #endif // PointerEventFactory_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698