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 "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
10 #include "ppapi/c/pp_time.h" | 10 #include "ppapi/c/pp_time.h" |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 | 564 |
565 void PPB_Instance_Proxy::SessionClosed(PP_Instance instance, | 565 void PPB_Instance_Proxy::SessionClosed(PP_Instance instance, |
566 uint32_t session_id) { | 566 uint32_t session_id) { |
567 dispatcher()->Send(new PpapiHostMsg_PPBInstance_SessionClosed( | 567 dispatcher()->Send(new PpapiHostMsg_PPBInstance_SessionClosed( |
568 API_ID_PPB_INSTANCE, instance, session_id)); | 568 API_ID_PPB_INSTANCE, instance, session_id)); |
569 } | 569 } |
570 | 570 |
571 void PPB_Instance_Proxy::SessionError(PP_Instance instance, | 571 void PPB_Instance_Proxy::SessionError(PP_Instance instance, |
572 uint32_t session_id, | 572 uint32_t session_id, |
573 int32_t media_error, | 573 int32_t media_error, |
574 int32_t system_code) { | 574 uint32_t system_code) { |
575 dispatcher()->Send(new PpapiHostMsg_PPBInstance_SessionError( | 575 dispatcher()->Send(new PpapiHostMsg_PPBInstance_SessionError( |
576 API_ID_PPB_INSTANCE, instance, session_id, media_error, system_code)); | 576 API_ID_PPB_INSTANCE, instance, session_id, media_error, system_code)); |
577 } | 577 } |
578 | 578 |
579 void PPB_Instance_Proxy::DeliverBlock(PP_Instance instance, | 579 void PPB_Instance_Proxy::DeliverBlock(PP_Instance instance, |
580 PP_Resource decrypted_block, | 580 PP_Resource decrypted_block, |
581 const PP_DecryptedBlockInfo* block_info) { | 581 const PP_DecryptedBlockInfo* block_info) { |
582 PP_Resource decrypted_block_host_resource = 0; | 582 PP_Resource decrypted_block_host_resource = 0; |
583 | 583 |
584 if (decrypted_block) { | 584 if (decrypted_block) { |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1085 return; | 1085 return; |
1086 EnterInstanceNoLock enter(instance); | 1086 EnterInstanceNoLock enter(instance); |
1087 if (enter.succeeded()) { | 1087 if (enter.succeeded()) { |
1088 enter.functions()->SessionClosed(instance, session_id); | 1088 enter.functions()->SessionClosed(instance, session_id); |
1089 } | 1089 } |
1090 } | 1090 } |
1091 | 1091 |
1092 void PPB_Instance_Proxy::OnHostMsgSessionError(PP_Instance instance, | 1092 void PPB_Instance_Proxy::OnHostMsgSessionError(PP_Instance instance, |
1093 uint32_t session_id, | 1093 uint32_t session_id, |
1094 int32_t media_error, | 1094 int32_t media_error, |
1095 int32_t system_error) { | 1095 uint32_t system_code) { |
1096 if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE)) | 1096 if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE)) |
1097 return; | 1097 return; |
1098 EnterInstanceNoLock enter(instance); | 1098 EnterInstanceNoLock enter(instance); |
1099 if (enter.succeeded()) { | 1099 if (enter.succeeded()) { |
1100 enter.functions()->SessionError( | 1100 enter.functions()->SessionError( |
1101 instance, session_id, media_error, system_error); | 1101 instance, session_id, media_error, system_code); |
1102 } | 1102 } |
1103 } | 1103 } |
1104 | 1104 |
1105 void PPB_Instance_Proxy::OnHostMsgDeliverBlock( | 1105 void PPB_Instance_Proxy::OnHostMsgDeliverBlock( |
1106 PP_Instance instance, | 1106 PP_Instance instance, |
1107 PP_Resource decrypted_block, | 1107 PP_Resource decrypted_block, |
1108 const std::string& serialized_block_info) { | 1108 const std::string& serialized_block_info) { |
1109 if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE)) | 1109 if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE)) |
1110 return; | 1110 return; |
1111 PP_DecryptedBlockInfo block_info; | 1111 PP_DecryptedBlockInfo block_info; |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 PP_Instance instance) { | 1273 PP_Instance instance) { |
1274 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> | 1274 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> |
1275 GetInstanceData(instance); | 1275 GetInstanceData(instance); |
1276 if (!data) | 1276 if (!data) |
1277 return; // Instance was probably deleted. | 1277 return; // Instance was probably deleted. |
1278 data->should_do_request_surrounding_text = false; | 1278 data->should_do_request_surrounding_text = false; |
1279 } | 1279 } |
1280 | 1280 |
1281 } // namespace proxy | 1281 } // namespace proxy |
1282 } // namespace ppapi | 1282 } // namespace ppapi |
OLD | NEW |