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