OLD | NEW |
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_PPB_CURSOR_CONTROL_PROXY_H_ | 5 #ifndef PPAPI_PPB_CURSOR_CONTROL_PROXY_H_ |
6 #define PPAPI_PPB_CURSOR_CONTROL_PROXY_H_ | 6 #define PPAPI_PPB_CURSOR_CONTROL_PROXY_H_ |
7 | 7 |
8 #include "ppapi/c/pp_completion_callback.h" | 8 #include "ppapi/c/pp_completion_callback.h" |
9 #include "ppapi/c/pp_bool.h" | 9 #include "ppapi/c/pp_bool.h" |
10 #include "ppapi/c/pp_instance.h" | 10 #include "ppapi/c/pp_instance.h" |
11 #include "ppapi/c/pp_point.h" | 11 #include "ppapi/c/pp_point.h" |
12 #include "ppapi/c/pp_resource.h" | 12 #include "ppapi/c/pp_resource.h" |
13 #include "ppapi/proxy/host_resource.h" | 13 #include "ppapi/proxy/host_resource.h" |
14 #include "ppapi/proxy/interface_proxy.h" | 14 #include "ppapi/proxy/interface_proxy.h" |
15 | 15 |
16 struct PPB_CursorControl_Dev; | 16 struct PPB_CursorControl_Dev; |
17 | 17 |
18 namespace pp { | 18 namespace pp { |
19 namespace proxy { | 19 namespace proxy { |
20 | 20 |
21 class PPB_CursorControl_Proxy : public InterfaceProxy { | 21 class PPB_CursorControl_Proxy : public InterfaceProxy { |
22 public: | 22 public: |
23 PPB_CursorControl_Proxy(Dispatcher* dispatcher, const void* target_interface); | 23 PPB_CursorControl_Proxy(Dispatcher* dispatcher, const void* target_interface); |
24 virtual ~PPB_CursorControl_Proxy(); | 24 virtual ~PPB_CursorControl_Proxy(); |
25 | 25 |
| 26 static const Info* GetInfo(); |
| 27 |
26 const PPB_CursorControl_Dev* ppb_cursor_control_target() const { | 28 const PPB_CursorControl_Dev* ppb_cursor_control_target() const { |
27 return reinterpret_cast<const PPB_CursorControl_Dev*>(target_interface()); | 29 return reinterpret_cast<const PPB_CursorControl_Dev*>(target_interface()); |
28 } | 30 } |
29 | 31 |
30 // InterfaceProxy implementation. | 32 // InterfaceProxy implementation. |
31 virtual const void* GetSourceInterface() const; | |
32 virtual InterfaceID GetInterfaceId() const; | |
33 virtual bool OnMessageReceived(const IPC::Message& msg); | 33 virtual bool OnMessageReceived(const IPC::Message& msg); |
34 | 34 |
35 private: | 35 private: |
36 // Message handlers. | 36 // Message handlers. |
37 void OnMsgSetCursor(PP_Instance instance, | 37 void OnMsgSetCursor(PP_Instance instance, |
38 int32_t type, | 38 int32_t type, |
39 HostResource custom_image, | 39 HostResource custom_image, |
40 const PP_Point& hot_spot, | 40 const PP_Point& hot_spot, |
41 PP_Bool* result); | 41 PP_Bool* result); |
42 void OnMsgLockCursor(PP_Instance instance, | 42 void OnMsgLockCursor(PP_Instance instance, |
43 PP_Bool* result); | 43 PP_Bool* result); |
44 void OnMsgUnlockCursor(PP_Instance instance, | 44 void OnMsgUnlockCursor(PP_Instance instance, |
45 PP_Bool* result); | 45 PP_Bool* result); |
46 void OnMsgHasCursorLock(PP_Instance instance, | 46 void OnMsgHasCursorLock(PP_Instance instance, |
47 PP_Bool* result); | 47 PP_Bool* result); |
48 void OnMsgCanLockCursor(PP_Instance instance, | 48 void OnMsgCanLockCursor(PP_Instance instance, |
49 PP_Bool* result); | 49 PP_Bool* result); |
50 }; | 50 }; |
51 | 51 |
52 } // namespace proxy | 52 } // namespace proxy |
53 } // namespace pp | 53 } // namespace pp |
54 | 54 |
55 #endif // PPAPI_PPB_CURSOR_CONTROL_PROXY_H_ | 55 #endif // PPAPI_PPB_CURSOR_CONTROL_PROXY_H_ |
OLD | NEW |