Remember and use user gesture tokens in the PPAPI to manage user gesture state
Before, the PPAPI would indicate up to 10s after the last user gesture that
we're processing a user gesture. This is done so out of process plugins have
a chance to respond to a user gesture/
By using a user gesture token, we can make sure that the user gesture can only
be consumed once within the 10s timeframe
BUG=181500
TEST=none
[email protected]
Review URL: https://codereview.chromium.org/12700004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@188743 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/webkit/plugins/ppapi/ppb_var_deprecated_impl.cc b/webkit/plugins/ppapi/ppb_var_deprecated_impl.cc
index 5f59c45..e7373a34 100644
--- a/webkit/plugins/ppapi/ppb_var_deprecated_impl.cc
+++ b/webkit/plugins/ppapi/ppb_var_deprecated_impl.cc
@@ -334,7 +334,8 @@
return PP_MakeUndefined();
PluginInstance* plugin = accessor.GetPluginInstance();
if (plugin && plugin->IsProcessingUserGesture()) {
- WebKit::WebScopedUserGesture user_gesture;
+ WebKit::WebScopedUserGesture user_gesture(
+ plugin->CurrentUserGestureToken());
return InternalCallDeprecated(&accessor, method_name, argc, argv,
exception);
}