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 "build/build_config.h" | 7 #include "build/build_config.h" |
8 #include "ppapi/c/pp_errors.h" | 8 #include "ppapi/c/pp_errors.h" |
9 #include "ppapi/c/pp_time.h" | 9 #include "ppapi/c/pp_time.h" |
10 #include "ppapi/c/pp_var.h" | 10 #include "ppapi/c/pp_var.h" |
(...skipping 1153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1164 int32_t result) { | 1164 int32_t result) { |
1165 // Save the mouse callback on the instance data. | 1165 // Save the mouse callback on the instance data. |
1166 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> | 1166 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> |
1167 GetInstanceData(instance); | 1167 GetInstanceData(instance); |
1168 if (!data) | 1168 if (!data) |
1169 return; // Instance was probably deleted. | 1169 return; // Instance was probably deleted. |
1170 if (!TrackedCallback::IsPending(data->mouse_lock_callback)) { | 1170 if (!TrackedCallback::IsPending(data->mouse_lock_callback)) { |
1171 NOTREACHED(); | 1171 NOTREACHED(); |
1172 return; | 1172 return; |
1173 } | 1173 } |
1174 TrackedCallback::ClearAndRun(&(data->mouse_lock_callback), result); | 1174 data->mouse_lock_callback->Run(result); |
1175 } | 1175 } |
1176 | 1176 |
1177 void PPB_Instance_Proxy::MouseLockCompleteInHost(int32_t result, | 1177 void PPB_Instance_Proxy::MouseLockCompleteInHost(int32_t result, |
1178 PP_Instance instance) { | 1178 PP_Instance instance) { |
1179 dispatcher()->Send(new PpapiMsg_PPBInstance_MouseLockComplete( | 1179 dispatcher()->Send(new PpapiMsg_PPBInstance_MouseLockComplete( |
1180 API_ID_PPB_INSTANCE, instance, result)); | 1180 API_ID_PPB_INSTANCE, instance, result)); |
1181 } | 1181 } |
1182 | 1182 |
1183 void PPB_Instance_Proxy::CancelAnyPendingRequestSurroundingText( | 1183 void PPB_Instance_Proxy::CancelAnyPendingRequestSurroundingText( |
1184 PP_Instance instance) { | 1184 PP_Instance instance) { |
1185 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> | 1185 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> |
1186 GetInstanceData(instance); | 1186 GetInstanceData(instance); |
1187 if (!data) | 1187 if (!data) |
1188 return; // Instance was probably deleted. | 1188 return; // Instance was probably deleted. |
1189 data->should_do_request_surrounding_text = false; | 1189 data->should_do_request_surrounding_text = false; |
1190 } | 1190 } |
1191 | 1191 |
1192 } // namespace proxy | 1192 } // namespace proxy |
1193 } // namespace ppapi | 1193 } // namespace ppapi |
OLD | NEW |