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

Unified Diff: ppapi/shared_impl/ppp_instance_combined.h

Issue 7452002: Remove HandleInputEvent from PPP_Instance and freeze to 1.0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 9 years, 5 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 | « ppapi/proxy/ppp_instance_proxy_test.cc ('k') | ppapi/shared_impl/ppp_instance_combined.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/ppp_instance_combined.h
diff --git a/ppapi/shared_impl/ppp_instance_combined.h b/ppapi/shared_impl/ppp_instance_combined.h
index 33548d569e1849f8197b59670a1ea85233183e29..57b5beb58f39a028fbf74273056a23574deaac1e 100644
--- a/ppapi/shared_impl/ppp_instance_combined.h
+++ b/ppapi/shared_impl/ppp_instance_combined.h
@@ -8,11 +8,51 @@
#include "base/basictypes.h"
#include "ppapi/c/ppp_instance.h"
+// TODO(dmichael): This is here only for temporary backwards compatibility so
+// that NaCl and other plugins aren't broken while the change propagates. This
+// needs to be deleted in 14, because we don't intend to support PPP_Instance.
+// HandleInputEvent.
+// --- Begin backwards compatibility code.
+union PP_InputEventData {
+ struct PP_InputEvent_Key key;
+ struct PP_InputEvent_Character character;
+ struct PP_InputEvent_Mouse mouse;
+ struct PP_InputEvent_Wheel wheel;
+ char padding[64];
+};
+struct PP_InputEvent {
+ PP_InputEvent_Type type;
+ int32_t padding;
+ PP_TimeTicks time_stamp;
+ union PP_InputEventData u;
+};
+PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent, 80);
+
+#define PPP_INSTANCE_INTERFACE_0_5 "PPP_Instance;0.5"
+
+struct PPP_Instance_0_5 {
+ PP_Bool (*DidCreate)(PP_Instance instance,
+ uint32_t argc,
+ const char* argn[],
+ const char* argv[]);
+ void (*DidDestroy)(PP_Instance instance);
+ void (*DidChangeView)(PP_Instance instance,
+ const struct PP_Rect* position,
+ const struct PP_Rect* clip);
+ void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus);
+ PP_Bool (*HandleInputEvent)(PP_Instance instance,
+ const struct PP_InputEvent* event);
+ PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader);
+};
+// --- End backwards compatibility code.
namespace ppapi {
-struct PPP_Instance_Combined : public PPP_Instance_0_5 {
+struct PPP_Instance_Combined : public PPP_Instance_1_0 {
public:
+ explicit PPP_Instance_Combined(const PPP_Instance_1_0& instance_if);
explicit PPP_Instance_Combined(const PPP_Instance_0_5& instance_if);
+ PP_Bool (*HandleInputEvent_0_5)(PP_Instance instance,
+ const struct PP_InputEvent* event);
DISALLOW_COPY_AND_ASSIGN(PPP_Instance_Combined);
};
« no previous file with comments | « ppapi/proxy/ppp_instance_proxy_test.cc ('k') | ppapi/shared_impl/ppp_instance_combined.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698