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

Side by Side Diff: ppapi/shared_impl/ppp_instance_combined.h

Issue 7467002: Revert 93202 - Remove HandleInputEvent from PPP_Instance and freeze to 1.0. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 PPAPI_SHARED_IMPL_PPP_INSTANCE_COMBINED_H_ 5 #ifndef PPAPI_SHARED_IMPL_PPP_INSTANCE_COMBINED_H_
6 #define PPAPI_SHARED_IMPL_PPP_INSTANCE_COMBINED_H_ 6 #define PPAPI_SHARED_IMPL_PPP_INSTANCE_COMBINED_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "ppapi/c/ppp_instance.h" 9 #include "ppapi/c/ppp_instance.h"
10 10
11 // TODO(dmichael): This is here only for temporary backwards compatibility so
12 // that NaCl and other plugins aren't broken while the change propagates. This
13 // needs to be deleted in 14, because we don't intend to support PPP_Instance.
14 // HandleInputEvent.
15 // --- Begin backwards compatibility code.
16 union PP_InputEventData {
17 struct PP_InputEvent_Key key;
18 struct PP_InputEvent_Character character;
19 struct PP_InputEvent_Mouse mouse;
20 struct PP_InputEvent_Wheel wheel;
21 char padding[64];
22 };
23 struct PP_InputEvent {
24 PP_InputEvent_Type type;
25 int32_t padding;
26 PP_TimeTicks time_stamp;
27 union PP_InputEventData u;
28 };
29 PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_InputEvent, 80);
30
31 #define PPP_INSTANCE_INTERFACE_0_5 "PPP_Instance;0.5"
32
33 struct PPP_Instance_0_5 {
34 PP_Bool (*DidCreate)(PP_Instance instance,
35 uint32_t argc,
36 const char* argn[],
37 const char* argv[]);
38 void (*DidDestroy)(PP_Instance instance);
39 void (*DidChangeView)(PP_Instance instance,
40 const struct PP_Rect* position,
41 const struct PP_Rect* clip);
42 void (*DidChangeFocus)(PP_Instance instance, PP_Bool has_focus);
43 PP_Bool (*HandleInputEvent)(PP_Instance instance,
44 const struct PP_InputEvent* event);
45 PP_Bool (*HandleDocumentLoad)(PP_Instance instance, PP_Resource url_loader);
46 };
47 // --- End backwards compatibility code.
48 namespace ppapi { 11 namespace ppapi {
49 12
50 struct PPP_Instance_Combined : public PPP_Instance_1_0 { 13 struct PPP_Instance_Combined : public PPP_Instance_0_5 {
51 public: 14 public:
52 explicit PPP_Instance_Combined(const PPP_Instance_1_0& instance_if);
53 explicit PPP_Instance_Combined(const PPP_Instance_0_5& instance_if); 15 explicit PPP_Instance_Combined(const PPP_Instance_0_5& instance_if);
54 PP_Bool (*HandleInputEvent_0_5)(PP_Instance instance,
55 const struct PP_InputEvent* event);
56 16
57 DISALLOW_COPY_AND_ASSIGN(PPP_Instance_Combined); 17 DISALLOW_COPY_AND_ASSIGN(PPP_Instance_Combined);
58 }; 18 };
59 19
60 } // namespace ppapi 20 } // namespace ppapi
61 21
62 #endif // PPAPI_SHARED_IMPL_PPP_INSTANCE_COMBINED_H_ 22 #endif // PPAPI_SHARED_IMPL_PPP_INSTANCE_COMBINED_H_
63 23
OLDNEW
« 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