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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.h

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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ppapi/c/pp_errors.h ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 301
302 // Implementation of PPP_Messaging. 302 // Implementation of PPP_Messaging.
303 void HandleMessage(PP_Var message); 303 void HandleMessage(PP_Var message);
304 304
305 PluginDelegate::PlatformContext3D* CreateContext3D(); 305 PluginDelegate::PlatformContext3D* CreateContext3D();
306 306
307 // Returns true iff the plugin is a full-page plugin (i.e. not in an iframe 307 // Returns true iff the plugin is a full-page plugin (i.e. not in an iframe
308 // or embedded in a page). 308 // or embedded in a page).
309 bool IsFullPagePlugin() const; 309 bool IsFullPagePlugin() const;
310 310
311 // Returns true if the plugin is processing a user gesture.
312 bool IsProcessingUserGesture();
313
311 // A mouse lock request was pending and this reports success or failure. 314 // A mouse lock request was pending and this reports success or failure.
312 void OnLockMouseACK(bool succeeded); 315 void OnLockMouseACK(bool succeeded);
313 // A mouse lock was in place, but has been lost. 316 // A mouse lock was in place, but has been lost.
314 void OnMouseLockLost(); 317 void OnMouseLockLost();
315 // A mouse lock is enabled and mouse events are being delievered. 318 // A mouse lock is enabled and mouse events are being delievered.
316 void HandleMouseLockedInputEvent(const WebKit::WebMouseEvent& event); 319 void HandleMouseLockedInputEvent(const WebKit::WebMouseEvent& event);
317 320
318 // Simulates an input event to the plugin by passing it down to WebKit, 321 // Simulates an input event to the plugin by passing it down to WebKit,
319 // which sends it back up to the plugin as if it came from the user. 322 // which sends it back up to the plugin as if it came from the user.
320 void SimulateInputEvent(const ::ppapi::InputEventData& input_event); 323 void SimulateInputEvent(const ::ppapi::InputEventData& input_event);
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 // Returns true if the WebView the plugin is in renders via the accelerated 472 // Returns true if the WebView the plugin is in renders via the accelerated
470 // compositing path. 473 // compositing path.
471 bool IsViewAccelerated(); 474 bool IsViewAccelerated();
472 475
473 // Track, set and reset size attributes to control the size of the plugin 476 // Track, set and reset size attributes to control the size of the plugin
474 // in and out of fullscreen mode. 477 // in and out of fullscreen mode.
475 void KeepSizeAttributesBeforeFullscreen(); 478 void KeepSizeAttributesBeforeFullscreen();
476 void SetSizeAttributesForFullscreen(); 479 void SetSizeAttributesForFullscreen();
477 void ResetSizeAttributesAfterFullscreen(); 480 void ResetSizeAttributesAfterFullscreen();
478 481
479 // Helper function to determine if an action has a user gesture.
480 bool HasUserGesture();
481
482 PluginDelegate* delegate_; 482 PluginDelegate* delegate_;
483 scoped_refptr<PluginModule> module_; 483 scoped_refptr<PluginModule> module_;
484 scoped_ptr< ::ppapi::PPP_Instance_Combined> instance_interface_; 484 scoped_ptr< ::ppapi::PPP_Instance_Combined> instance_interface_;
485 485
486 PP_Instance pp_instance_; 486 PP_Instance pp_instance_;
487 487
488 // NULL until we have been initialized. 488 // NULL until we have been initialized.
489 WebKit::WebPluginContainer* container_; 489 WebKit::WebPluginContainer* container_;
490 490
491 // Plugin URL. 491 // Plugin URL.
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 // a user gesture after it has been processed. 630 // a user gesture after it has been processed.
631 PP_TimeTicks pending_user_gesture_; 631 PP_TimeTicks pending_user_gesture_;
632 632
633 DISALLOW_COPY_AND_ASSIGN(PluginInstance); 633 DISALLOW_COPY_AND_ASSIGN(PluginInstance);
634 }; 634 };
635 635
636 } // namespace ppapi 636 } // namespace ppapi
637 } // namespace webkit 637 } // namespace webkit
638 638
639 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 639 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
OLDNEW
« no previous file with comments | « ppapi/c/pp_errors.h ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698