OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_instance_proxy.h" | 5 #include "ppapi/proxy/ppb_instance_proxy.h" |
6 | 6 |
7 #include "ppapi/c/pp_errors.h" | 7 #include "ppapi/c/pp_errors.h" |
8 #include "ppapi/c/pp_time.h" | 8 #include "ppapi/c/pp_time.h" |
9 #include "ppapi/c/pp_var.h" | 9 #include "ppapi/c/pp_var.h" |
10 #include "ppapi/c/ppb_audio_config.h" | 10 #include "ppapi/c/ppb_audio_config.h" |
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1007 int32_t result) { | 1007 int32_t result) { |
1008 // Save the mouse callback on the instance data. | 1008 // Save the mouse callback on the instance data. |
1009 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> | 1009 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> |
1010 GetInstanceData(instance); | 1010 GetInstanceData(instance); |
1011 if (!data) | 1011 if (!data) |
1012 return; // Instance was probably deleted. | 1012 return; // Instance was probably deleted. |
1013 if (!TrackedCallback::IsPending(data->mouse_lock_callback)) { | 1013 if (!TrackedCallback::IsPending(data->mouse_lock_callback)) { |
1014 NOTREACHED(); | 1014 NOTREACHED(); |
1015 return; | 1015 return; |
1016 } | 1016 } |
1017 TrackedCallback::ClearAndRun(&(data->mouse_lock_callback), result); | 1017 data->mouse_lock_callback->Run(result); |
1018 } | 1018 } |
1019 | 1019 |
1020 void PPB_Instance_Proxy::MouseLockCompleteInHost(int32_t result, | 1020 void PPB_Instance_Proxy::MouseLockCompleteInHost(int32_t result, |
1021 PP_Instance instance) { | 1021 PP_Instance instance) { |
1022 dispatcher()->Send(new PpapiMsg_PPBInstance_MouseLockComplete( | 1022 dispatcher()->Send(new PpapiMsg_PPBInstance_MouseLockComplete( |
1023 API_ID_PPB_INSTANCE, instance, result)); | 1023 API_ID_PPB_INSTANCE, instance, result)); |
1024 } | 1024 } |
1025 | 1025 |
1026 void PPB_Instance_Proxy::CancelAnyPendingRequestSurroundingText( | 1026 void PPB_Instance_Proxy::CancelAnyPendingRequestSurroundingText( |
1027 PP_Instance instance) { | 1027 PP_Instance instance) { |
1028 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> | 1028 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> |
1029 GetInstanceData(instance); | 1029 GetInstanceData(instance); |
1030 if (!data) | 1030 if (!data) |
1031 return; // Instance was probably deleted. | 1031 return; // Instance was probably deleted. |
1032 data->should_do_request_surrounding_text = false; | 1032 data->should_do_request_surrounding_text = false; |
1033 } | 1033 } |
1034 | 1034 |
1035 } // namespace proxy | 1035 } // namespace proxy |
1036 } // namespace ppapi | 1036 } // namespace ppapi |
OLD | NEW |