| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 182 |
| 183 PP_Bool PPB_Instance_Proxy::BindGraphics(PP_Instance instance, | 183 PP_Bool PPB_Instance_Proxy::BindGraphics(PP_Instance instance, |
| 184 PP_Resource device) { | 184 PP_Resource device) { |
| 185 Resource* object = | 185 Resource* object = |
| 186 PpapiGlobals::Get()->GetResourceTracker()->GetResource(device); | 186 PpapiGlobals::Get()->GetResourceTracker()->GetResource(device); |
| 187 if (!object || object->pp_instance() != instance) | 187 if (!object || object->pp_instance() != instance) |
| 188 return PP_FALSE; | 188 return PP_FALSE; |
| 189 | 189 |
| 190 PP_Bool result = PP_FALSE; | 190 PP_Bool result = PP_FALSE; |
| 191 dispatcher()->Send(new PpapiHostMsg_PPBInstance_BindGraphics( | 191 dispatcher()->Send(new PpapiHostMsg_PPBInstance_BindGraphics( |
| 192 API_ID_PPB_INSTANCE, instance, object->host_resource(), | 192 API_ID_PPB_INSTANCE, instance, object->pp_resource(), |
| 193 &result)); | 193 &result)); |
| 194 return result; | 194 return result; |
| 195 } | 195 } |
| 196 | 196 |
| 197 PP_Bool PPB_Instance_Proxy::IsFullFrame(PP_Instance instance) { | 197 PP_Bool PPB_Instance_Proxy::IsFullFrame(PP_Instance instance) { |
| 198 PP_Bool result = PP_FALSE; | 198 PP_Bool result = PP_FALSE; |
| 199 dispatcher()->Send(new PpapiHostMsg_PPBInstance_IsFullFrame( | 199 dispatcher()->Send(new PpapiHostMsg_PPBInstance_IsFullFrame( |
| 200 API_ID_PPB_INSTANCE, instance, &result)); | 200 API_ID_PPB_INSTANCE, instance, &result)); |
| 201 return result; | 201 return result; |
| 202 } | 202 } |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 PP_Instance instance, | 674 PP_Instance instance, |
| 675 SerializedVarReturnValue result) { | 675 SerializedVarReturnValue result) { |
| 676 EnterInstanceNoLock enter(instance); | 676 EnterInstanceNoLock enter(instance); |
| 677 if (enter.succeeded()) { | 677 if (enter.succeeded()) { |
| 678 result.Return(dispatcher(), | 678 result.Return(dispatcher(), |
| 679 enter.functions()->GetOwnerElementObject(instance)); | 679 enter.functions()->GetOwnerElementObject(instance)); |
| 680 } | 680 } |
| 681 } | 681 } |
| 682 | 682 |
| 683 void PPB_Instance_Proxy::OnHostMsgBindGraphics(PP_Instance instance, | 683 void PPB_Instance_Proxy::OnHostMsgBindGraphics(PP_Instance instance, |
| 684 const HostResource& device, | 684 PP_Resource device, |
| 685 PP_Bool* result) { | 685 PP_Bool* result) { |
| 686 EnterInstanceNoLock enter(instance); | 686 EnterInstanceNoLock enter(instance); |
| 687 if (enter.succeeded()) { | 687 if (enter.succeeded()) { |
| 688 *result = enter.functions()->BindGraphics(instance, | 688 *result = enter.functions()->BindGraphics(instance, device); |
| 689 device.host_resource()); | |
| 690 } | 689 } |
| 691 } | 690 } |
| 692 | 691 |
| 693 void PPB_Instance_Proxy::OnHostMsgGetAudioHardwareOutputSampleRate( | 692 void PPB_Instance_Proxy::OnHostMsgGetAudioHardwareOutputSampleRate( |
| 694 PP_Instance instance, uint32_t* result) { | 693 PP_Instance instance, uint32_t* result) { |
| 695 EnterInstanceNoLock enter(instance); | 694 EnterInstanceNoLock enter(instance); |
| 696 if (enter.succeeded()) | 695 if (enter.succeeded()) |
| 697 *result = enter.functions()->GetAudioHardwareOutputSampleRate(instance); | 696 *result = enter.functions()->GetAudioHardwareOutputSampleRate(instance); |
| 698 } | 697 } |
| 699 | 698 |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1027 PP_Instance instance) { | 1026 PP_Instance instance) { |
| 1028 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> | 1027 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> |
| 1029 GetInstanceData(instance); | 1028 GetInstanceData(instance); |
| 1030 if (!data) | 1029 if (!data) |
| 1031 return; // Instance was probably deleted. | 1030 return; // Instance was probably deleted. |
| 1032 data->should_do_request_surrounding_text = false; | 1031 data->should_do_request_surrounding_text = false; |
| 1033 } | 1032 } |
| 1034 | 1033 |
| 1035 } // namespace proxy | 1034 } // namespace proxy |
| 1036 } // namespace ppapi | 1035 } // namespace ppapi |
| OLD | NEW |