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

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.h

Issue 7285010: Implement an input event resource. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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
Index: webkit/plugins/ppapi/ppapi_plugin_instance.h
===================================================================
--- webkit/plugins/ppapi/ppapi_plugin_instance.h (revision 90976)
+++ webkit/plugins/ppapi/ppapi_plugin_instance.h (working copy)
@@ -24,6 +24,7 @@
#include "ppapi/c/pp_var.h"
#include "ppapi/c/ppp_instance.h"
#include "ppapi/shared_impl/function_group_base.h"
+#include "ppapi/shared_impl/instance_impl.h"
#include "ppapi/thunk/ppb_instance_api.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkRefCnt.h"
@@ -36,6 +37,7 @@
struct PPB_Messaging;
struct PPB_Zoom_Dev;
struct PPP_Find_Dev;
+struct PPP_InputEvent;
struct PPP_Instance_Private;
struct PPP_Messaging;
struct PPP_Pdf;
@@ -77,7 +79,8 @@
// ResourceTracker.
class PluginInstance : public base::RefCounted<PluginInstance>,
public ::ppapi::FunctionGroupBase,
- public ::ppapi::thunk::PPB_Instance_FunctionAPI {
+ public ::ppapi::thunk::PPB_Instance_FunctionAPI,
+ public ::ppapi::InstanceImpl {
public:
struct PPP_Instance_Combined;
@@ -288,9 +291,16 @@
virtual PP_Bool SetFullscreen(PP_Instance instance,
PP_Bool fullscreen) OVERRIDE;
virtual PP_Bool GetScreenSize(PP_Instance instance, PP_Size* size) OVERRIDE;
+ virtual int32_t RequestInputEvents(PP_Instance instance,
+ uint32_t event_classes) OVERRIDE;
+ virtual int32_t RequestFilteringInputEvents(PP_Instance instance,
+ uint32_t event_classes) OVERRIDE;
+ virtual void ClearInputEventRequest(PP_Instance instance,
+ uint32_t event_classes) OVERRIDE;
private:
bool LoadFindInterface();
+ bool LoadInputEventInterface();
bool LoadMessagingInterface();
bool LoadPdfInterface();
bool LoadSelectionInterface();
@@ -383,13 +393,15 @@
// The plugin-provided interfaces.
const PPP_Find_Dev* plugin_find_interface_;
const PPP_Messaging* plugin_messaging_interface_;
+ const PPP_InputEvent* plugin_input_event_interface_;
+ const PPP_Instance_Private* plugin_private_interface_;
const PPP_Pdf* plugin_pdf_interface_;
- const PPP_Instance_Private* plugin_private_interface_;
const PPP_Selection_Dev* plugin_selection_interface_;
const PPP_Zoom_Dev* plugin_zoom_interface_;
- // A flag to indicate whether we have asked this plugin instance for its
- // messaging interface, so that we can ask only once.
+ // Flags indicating whether we have asked this plugin instance for the
+ // corresponding intefaces, so that we can ask only once.
dmichael (off chromium) 2011/07/01 20:04:19 intefaces->interfaces
+ bool checked_for_plugin_input_event_interface_;
bool checked_for_plugin_messaging_interface_;
// This is only valid between a successful PrintBegin call and a PrintEnd
@@ -483,6 +495,11 @@
typedef std::map<NPObject*, ObjectVar*> NPObjectToObjectVarMap;
NPObjectToObjectVarMap np_object_to_object_var_;
+ // Classes of events that the plugin has registered for, both for filtering
+ // and not. The bits are PP_INPUTEVENT_CLASS_*.
+ uint32_t input_event_mask_;
+ uint32_t filtered_input_event_mask_;
+
DISALLOW_COPY_AND_ASSIGN(PluginInstance);
};

Powered by Google App Engine
This is Rietveld 408576698