Bug 112342 - Expose whether a UserGestureToken still has gestures via WebKit API
Summary: Expose whether a UserGestureToken still has gestures via WebKit API
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: jochen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-14 05:43 PDT by jochen
Modified: 2013-03-15 14:54 PDT (History)
10 users (show)

See Also:


Attachments
Patch (5.07 KB, patch)
2013-03-14 05:43 PDT, jochen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jochen 2013-03-14 05:43:36 PDT
Expose whether a UserGestureToken still has gestures via WebKit API
Comment 1 jochen 2013-03-14 05:43:56 PDT
Created attachment 193109 [details]
Patch
Comment 2 jochen 2013-03-14 05:45:37 PDT
The PPAPI uses WebScopedUserGestures and WebUserGestureTokens to indicate user gestures up to 10s after the gesture happened.

When no gesture is active, a corresponding error is reported back to the plugin.

With this change, the PPAPI can check whether a token was consumed and cancel the 10s period.
Comment 3 WebKit Review Bot 2013-03-14 05:46:43 PDT
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment 4 Adam Barth 2013-03-15 12:28:24 PDT
Comment on attachment 193109 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=193109&action=review

> Source/WebCore/dom/UserGestureIndicator.h:45
> +    virtual bool hasGestures() const = 0;

Why do we have this virtual interface.  Are there other implementations of UserGestureToken?
Comment 5 jochen 2013-03-15 12:52:14 PDT
Comment on attachment 193109 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=193109&action=review

>> Source/WebCore/dom/UserGestureIndicator.h:45
>> +    virtual bool hasGestures() const = 0;
> 
> Why do we have this virtual interface.  Are there other implementations of UserGestureToken?

no, I just want to hide the addGesture() call, so nobody comes up with the idea of adding gestures to a token
Comment 6 WebKit Review Bot 2013-03-15 14:54:38 PDT
Comment on attachment 193109 [details]
Patch

Clearing flags on attachment: 193109

Committed r145944: <http://trac.webkit.org/changeset/145944>
Comment 7 WebKit Review Bot 2013-03-15 14:54:41 PDT
All reviewed patches have been landed.  Closing bug.