| Index: ppapi/proxy/ppb_instance_proxy.cc
|
| diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc
|
| index 88e6521f20a3f6d9c352b04ab25bd89785e17716..423876344be9c35521eb423f071fa4ec4993c386 100644
|
| --- a/ppapi/proxy/ppb_instance_proxy.cc
|
| +++ b/ppapi/proxy/ppb_instance_proxy.cc
|
| @@ -436,16 +436,13 @@ PP_Bool PPB_Instance_Proxy::SetCursor(PP_Instance instance,
|
| }
|
|
|
| int32_t PPB_Instance_Proxy::LockMouse(PP_Instance instance,
|
| - PP_CompletionCallback callback) {
|
| - if (!callback.func)
|
| - return PP_ERROR_BADARGUMENT;
|
| -
|
| + ApiCallbackType callback) {
|
| // Save the mouse callback on the instance data.
|
| InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())->
|
| GetInstanceData(instance);
|
| if (!data)
|
| return PP_ERROR_BADARGUMENT;
|
| - if (data->mouse_lock_callback.func)
|
| + if (TrackedCallback::IsPending(data->mouse_lock_callback))
|
| return PP_ERROR_INPROGRESS; // Already have a pending callback.
|
| data->mouse_lock_callback = callback;
|
|
|
| @@ -691,11 +688,11 @@ void PPB_Instance_Proxy::OnPluginMsgMouseLockComplete(PP_Instance instance,
|
| GetInstanceData(instance);
|
| if (!data)
|
| return; // Instance was probably deleted.
|
| - if (!data->mouse_lock_callback.func) {
|
| + if (TrackedCallback::IsPending(data->mouse_lock_callback)) {
|
| NOTREACHED();
|
| return;
|
| }
|
| - PP_RunAndClearCompletionCallback(&data->mouse_lock_callback, result);
|
| + TrackedCallback::ClearAndRun(&(data->mouse_lock_callback), result);
|
| }
|
|
|
| void PPB_Instance_Proxy::MouseLockCompleteInHost(int32_t result,
|
|
|