|
|
UserGestureIndicator is a mess. Clean it up.
Currently are two constructors for a UserGestureIndicator, one that takes a
ProcessingUserGestureState enum value and one that takes a
PassRefPtr<UserGestureToken>.
There are three ways to construct a UserGestureIndicator that does nothing:
1. Pass a nullptr to the PassRefPtr<UserGestureToken> constructor.
2. Pass PossiblyProcessingUserGesture to the enum constructor.
3. Pass DefinitelyNotProcessingUserGesture when not alredy processing a user
gesture (this is in fact the only way it is currently used).
(2) and (3) are only used in one place each, so remove those enum values and use
the other constructor with a nullptr or simply don't construct a
UserGestureIndicator.
UserGestureToken is a pure virtual interface for reasons that aren't clear.
Collapse its implementation in to the base class.
With 2 ProcessingUserGestureState values removed, the only purpose of this enum is
during UserGestureToken initialization: determining whether it definitely starts
with m_consumableGestures == 1, or whether it starts at 1 only if there are no
other UserGestureTokens on the stack. Move this initialization logic in to the
UserGestureToken constructor, generally simplify UserGestureToken's surface, and
remove the enum-based UserGestureIndicator constructor. Callers are now expected
to pass in a PassRefPtr<UserGestureToken> on UserGestureIndicator initialization.
UserGestureToken::create() now takes an enum similar to the old
ProcessingUserGestureState, with values equivalent to
DefinitelyProcessingNewUserGesture and DefinitelyProcessingUserGesture.
BUG=
Committed: https://crrev.com/046115dc4c7cff68b07ad14f426388d86463aa22
Cr-Commit-Position: refs/heads/master@{#424552}
Total comments: 17
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+213 lines, -273 lines) |
Patch |
 |
M |
third_party/WebKit/Source/core/html/AutoplayExperimentTest.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/html/HTMLVideoElementTest.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/input/EventHandler.cpp
|
View
|
1
2
3
4
5
|
2 chunks |
+7 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/input/GestureManager.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/input/KeyboardEventManager.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/input/TouchEventManager.cpp
|
View
|
|
1 chunk |
+7 lines, -9 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp
|
View
|
1
2
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp
|
View
|
1
2
3
4
5
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/core/loader/NavigationScheduler.cpp
|
View
|
|
9 chunks |
+15 lines, -25 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
|
View
|
1
2
|
1 chunk |
+4 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/accessibility/AXObject.cpp
|
View
|
1
2
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/modules/notifications/Notification.cpp
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/UserGestureIndicator.h
|
View
|
1
2
3
4
5
|
3 chunks |
+46 lines, -27 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/UserGestureIndicator.cpp
|
View
|
1
2
3
4
5
|
4 chunks |
+63 lines, -153 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/platform/UserGestureIndicatorTest.cpp
|
View
|
1
2
3
4
5
|
9 chunks |
+21 lines, -13 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/web/SuspendableScriptExecutor.cpp
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
|
View
|
1
2
|
3 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
|
View
|
1
2
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/web/WebPluginContainerImpl.cpp
|
View
|
1
2
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/web/WebScopedUserGesture.cpp
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/web/WebUserGestureToken.cpp
|
View
|
1
2
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/web/WebViewImpl.cpp
|
View
|
1
2
3
4
5
|
5 chunks |
+10 lines, -7 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/web/tests/WebFrameTest.cpp
|
View
|
1
2
|
9 chunks |
+10 lines, -9 lines |
0 comments
|
Download
|
 |
M |
third_party/WebKit/Source/web/tests/WebUserGestureTokenTest.cpp
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
Total messages: 50 (31 generated)
|