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

Unified Diff: webkit/plugins/ppapi/ppb_file_chooser_impl.cc

Issue 7764002: Require a user gesture to display the PPAPI file chooser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_file_chooser_impl.cc
===================================================================
--- webkit/plugins/ppapi/ppb_file_chooser_impl.cc (revision 126073)
+++ webkit/plugins/ppapi/ppb_file_chooser_impl.cc (working copy)
@@ -147,6 +147,11 @@
}
int32_t PPB_FileChooser_Impl::Show(const PP_CompletionCallback& callback) {
+ PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this);
+ if (!plugin_instance)
+ return PP_ERROR_FAILED;
+ if (!plugin_instance->IsProcessingUserGesture())
+ return PP_ERROR_NO_USER_GESTURE;
return ShowWithoutUserGesture(false, NULL, callback);
}
« no previous file with comments | « webkit/plugins/ppapi/ppapi_plugin_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698