| 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 #include "ppapi/proxy/ppb_cursor_control_proxy.h" | 5 #include "ppapi/proxy/ppb_cursor_control_proxy.h" |
| 6 | 6 |
| 7 #include "ppapi/c/dev/pp_cursor_type_dev.h" | 7 #include "ppapi/c/dev/pp_cursor_type_dev.h" |
| 8 #include "ppapi/c/dev/ppb_cursor_control_dev.h" | 8 #include "ppapi/c/dev/ppb_cursor_control_dev.h" |
| 9 #include "ppapi/proxy/plugin_dispatcher.h" | 9 #include "ppapi/proxy/plugin_dispatcher.h" |
| 10 #include "ppapi/proxy/plugin_resource.h" | 10 #include "ppapi/proxy/plugin_resource.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 ppapi::thunk::GetPPB_CursorControl_Thunk(), | 42 ppapi::thunk::GetPPB_CursorControl_Thunk(), |
| 43 PPB_CURSOR_CONTROL_DEV_INTERFACE, | 43 PPB_CURSOR_CONTROL_DEV_INTERFACE, |
| 44 INTERFACE_ID_PPB_CURSORCONTROL, | 44 INTERFACE_ID_PPB_CURSORCONTROL, |
| 45 false, | 45 false, |
| 46 &CreateCursorControlProxy, | 46 &CreateCursorControlProxy, |
| 47 }; | 47 }; |
| 48 return &info; | 48 return &info; |
| 49 } | 49 } |
| 50 | 50 |
| 51 ppapi::thunk::PPB_CursorControl_FunctionAPI* | 51 ppapi::thunk::PPB_CursorControl_FunctionAPI* |
| 52 PPB_CursorControl_Proxy::AsPPB_CursorControl_FunctionAPI() { | 52 PPB_CursorControl_Proxy::AsCursorControl_FunctionAPI() { |
| 53 return this; | 53 return this; |
| 54 } | 54 } |
| 55 | 55 |
| 56 PP_Bool PPB_CursorControl_Proxy::SetCursor(PP_Instance instance, | 56 PP_Bool PPB_CursorControl_Proxy::SetCursor(PP_Instance instance, |
| 57 PP_CursorType_Dev type, | 57 PP_CursorType_Dev type, |
| 58 PP_Resource custom_image_id, | 58 PP_Resource custom_image_id, |
| 59 const PP_Point* hot_spot) { | 59 const PP_Point* hot_spot) { |
| 60 // It's legal for the image ID to be null if the type is not custom. | 60 // It's legal for the image ID to be null if the type is not custom. |
| 61 HostResource cursor_image_resource; | 61 HostResource cursor_image_resource; |
| 62 if (type == PP_CURSORTYPE_CUSTOM) { | 62 if (type == PP_CURSORTYPE_CUSTOM) { |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 162 |
| 163 void PPB_CursorControl_Proxy::OnMsgCanLockCursor(PP_Instance instance, | 163 void PPB_CursorControl_Proxy::OnMsgCanLockCursor(PP_Instance instance, |
| 164 PP_Bool* result) { | 164 PP_Bool* result) { |
| 165 EnterFunctionNoLock<PPB_CursorControl_FunctionAPI> enter(instance, true); | 165 EnterFunctionNoLock<PPB_CursorControl_FunctionAPI> enter(instance, true); |
| 166 if (enter.succeeded()) | 166 if (enter.succeeded()) |
| 167 *result = enter.functions()->CanLockCursor(instance); | 167 *result = enter.functions()->CanLockCursor(instance); |
| 168 } | 168 } |
| 169 | 169 |
| 170 } // namespace proxy | 170 } // namespace proxy |
| 171 } // namespace pp | 171 } // namespace pp |
| OLD | NEW |