| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef PPAPI_PROXY_PPB_CURSOR_CONTROL_PROXY_H_ | |
| 6 #define PPAPI_PROXY_PPB_CURSOR_CONTROL_PROXY_H_ | |
| 7 | |
| 8 #include "ppapi/c/pp_completion_callback.h" | |
| 9 #include "ppapi/c/pp_bool.h" | |
| 10 #include "ppapi/c/pp_instance.h" | |
| 11 #include "ppapi/c/pp_point.h" | |
| 12 #include "ppapi/c/pp_resource.h" | |
| 13 #include "ppapi/proxy/interface_proxy.h" | |
| 14 #include "ppapi/shared_impl/function_group_base.h" | |
| 15 #include "ppapi/shared_impl/host_resource.h" | |
| 16 #include "ppapi/thunk/ppb_cursor_control_api.h" | |
| 17 | |
| 18 namespace ppapi { | |
| 19 namespace proxy { | |
| 20 | |
| 21 class PPB_CursorControl_Proxy | |
| 22 : public InterfaceProxy, | |
| 23 public ppapi::thunk::PPB_CursorControl_FunctionAPI { | |
| 24 public: | |
| 25 explicit PPB_CursorControl_Proxy(Dispatcher* dispatcher); | |
| 26 virtual ~PPB_CursorControl_Proxy(); | |
| 27 | |
| 28 // FunctionGroupBase overrides. | |
| 29 ppapi::thunk::PPB_CursorControl_FunctionAPI* AsPPB_CursorControl_FunctionAPI() | |
| 30 OVERRIDE; | |
| 31 | |
| 32 // PPB_CursorControl_FunctionAPI implementation. | |
| 33 virtual PP_Bool SetCursor(PP_Instance instance, | |
| 34 PP_CursorType_Dev type, | |
| 35 PP_Resource custom_image_id, | |
| 36 const PP_Point* hot_spot) OVERRIDE; | |
| 37 virtual PP_Bool LockCursor(PP_Instance instance) OVERRIDE; | |
| 38 virtual PP_Bool UnlockCursor(PP_Instance instance) OVERRIDE; | |
| 39 virtual PP_Bool HasCursorLock(PP_Instance instance) OVERRIDE; | |
| 40 virtual PP_Bool CanLockCursor(PP_Instance instance) OVERRIDE; | |
| 41 | |
| 42 // InterfaceProxy implementation. | |
| 43 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | |
| 44 | |
| 45 static const ApiID kApiID = API_ID_PPB_CURSORCONTROL; | |
| 46 | |
| 47 private: | |
| 48 // Message handlers. | |
| 49 void OnMsgSetCursor(PP_Instance instance, | |
| 50 int32_t type, | |
| 51 const ppapi::HostResource& custom_image, | |
| 52 const PP_Point& hot_spot, | |
| 53 PP_Bool* result); | |
| 54 void OnMsgLockCursor(PP_Instance instance, | |
| 55 PP_Bool* result); | |
| 56 void OnMsgUnlockCursor(PP_Instance instance, | |
| 57 PP_Bool* result); | |
| 58 void OnMsgHasCursorLock(PP_Instance instance, | |
| 59 PP_Bool* result); | |
| 60 void OnMsgCanLockCursor(PP_Instance instance, | |
| 61 PP_Bool* result); | |
| 62 }; | |
| 63 | |
| 64 } // namespace proxy | |
| 65 } // namespace ppapi | |
| 66 | |
| 67 #endif // PPAPI_PROXY_PPB_CURSOR_CONTROL_PROXY_H_ | |
| OLD | NEW |