Chromium Code Reviews| 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 "media/base/limits.h" | |
| 9 #include "ppapi/c/pp_errors.h" | 10 #include "ppapi/c/pp_errors.h" |
| 10 #include "ppapi/c/pp_time.h" | 11 #include "ppapi/c/pp_time.h" |
| 11 #include "ppapi/c/pp_var.h" | 12 #include "ppapi/c/pp_var.h" |
| 12 #include "ppapi/c/ppb_audio_config.h" | 13 #include "ppapi/c/ppb_audio_config.h" |
| 13 #include "ppapi/c/ppb_instance.h" | 14 #include "ppapi/c/ppb_instance.h" |
| 14 #include "ppapi/c/ppb_messaging.h" | 15 #include "ppapi/c/ppb_messaging.h" |
| 15 #include "ppapi/c/ppb_mouse_lock.h" | 16 #include "ppapi/c/ppb_mouse_lock.h" |
| 16 #include "ppapi/c/private/pp_content_decryptor.h" | 17 #include "ppapi/c/private/pp_content_decryptor.h" |
| 17 #include "ppapi/proxy/broker_resource.h" | 18 #include "ppapi/proxy/broker_resource.h" |
| 18 #include "ppapi/proxy/browser_font_singleton_resource.h" | 19 #include "ppapi/proxy/browser_font_singleton_resource.h" |
| 19 #include "ppapi/proxy/content_decryptor_private_serializer.h" | 20 #include "ppapi/proxy/content_decryptor_private_serializer.h" |
| 20 #include "ppapi/proxy/enter_proxy.h" | 21 #include "ppapi/proxy/enter_proxy.h" |
| 21 #include "ppapi/proxy/file_mapping_resource.h" | 22 #include "ppapi/proxy/file_mapping_resource.h" |
| 22 #include "ppapi/proxy/flash_clipboard_resource.h" | 23 #include "ppapi/proxy/flash_clipboard_resource.h" |
| 23 #include "ppapi/proxy/flash_file_resource.h" | 24 #include "ppapi/proxy/flash_file_resource.h" |
| 24 #include "ppapi/proxy/flash_fullscreen_resource.h" | 25 #include "ppapi/proxy/flash_fullscreen_resource.h" |
| 25 #include "ppapi/proxy/flash_resource.h" | 26 #include "ppapi/proxy/flash_resource.h" |
| 26 #include "ppapi/proxy/gamepad_resource.h" | 27 #include "ppapi/proxy/gamepad_resource.h" |
| 27 #include "ppapi/proxy/host_dispatcher.h" | 28 #include "ppapi/proxy/host_dispatcher.h" |
| 28 #include "ppapi/proxy/isolated_file_system_private_resource.h" | 29 #include "ppapi/proxy/isolated_file_system_private_resource.h" |
| 29 #include "ppapi/proxy/message_handler.h" | 30 #include "ppapi/proxy/message_handler.h" |
| 30 #include "ppapi/proxy/network_proxy_resource.h" | 31 #include "ppapi/proxy/network_proxy_resource.h" |
| 31 #include "ppapi/proxy/pdf_resource.h" | 32 #include "ppapi/proxy/pdf_resource.h" |
| 32 #include "ppapi/proxy/plugin_dispatcher.h" | 33 #include "ppapi/proxy/plugin_dispatcher.h" |
| 33 #include "ppapi/proxy/ppapi_messages.h" | 34 #include "ppapi/proxy/ppapi_messages.h" |
| 34 #include "ppapi/proxy/serialized_var.h" | 35 #include "ppapi/proxy/serialized_var.h" |
| 35 #include "ppapi/proxy/truetype_font_singleton_resource.h" | 36 #include "ppapi/proxy/truetype_font_singleton_resource.h" |
| 36 #include "ppapi/proxy/uma_private_resource.h" | 37 #include "ppapi/proxy/uma_private_resource.h" |
| 38 #include "ppapi/shared_impl/array_var.h" | |
| 37 #include "ppapi/shared_impl/ppapi_globals.h" | 39 #include "ppapi/shared_impl/ppapi_globals.h" |
| 38 #include "ppapi/shared_impl/ppb_url_util_shared.h" | 40 #include "ppapi/shared_impl/ppb_url_util_shared.h" |
| 39 #include "ppapi/shared_impl/ppb_view_shared.h" | 41 #include "ppapi/shared_impl/ppb_view_shared.h" |
| 40 #include "ppapi/shared_impl/var.h" | 42 #include "ppapi/shared_impl/var.h" |
| 41 #include "ppapi/thunk/enter.h" | 43 #include "ppapi/thunk/enter.h" |
| 42 #include "ppapi/thunk/ppb_compositor_api.h" | 44 #include "ppapi/thunk/ppb_compositor_api.h" |
| 43 #include "ppapi/thunk/ppb_graphics_2d_api.h" | 45 #include "ppapi/thunk/ppb_graphics_2d_api.h" |
| 44 #include "ppapi/thunk/ppb_graphics_3d_api.h" | 46 #include "ppapi/thunk/ppb_graphics_3d_api.h" |
| 45 #include "ppapi/thunk/thunk.h" | 47 #include "ppapi/thunk/thunk.h" |
| 46 | 48 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 172 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_DocumentCanAccessDocument, | 174 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_DocumentCanAccessDocument, |
| 173 OnHostMsgDocumentCanAccessDocument) | 175 OnHostMsgDocumentCanAccessDocument) |
| 174 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetPluginInstanceURL, | 176 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetPluginInstanceURL, |
| 175 OnHostMsgGetPluginInstanceURL) | 177 OnHostMsgGetPluginInstanceURL) |
| 176 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetPluginReferrerURL, | 178 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_GetPluginReferrerURL, |
| 177 OnHostMsgGetPluginReferrerURL) | 179 OnHostMsgGetPluginReferrerURL) |
| 178 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PromiseResolved, | 180 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PromiseResolved, |
| 179 OnHostMsgPromiseResolved) | 181 OnHostMsgPromiseResolved) |
| 180 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PromiseResolvedWithSession, | 182 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PromiseResolvedWithSession, |
| 181 OnHostMsgPromiseResolvedWithSession) | 183 OnHostMsgPromiseResolvedWithSession) |
| 184 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PromiseResolvedWithKeyIds, | |
| 185 OnHostMsgPromiseResolvedWithKeyIds) | |
| 182 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PromiseRejected, | 186 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_PromiseRejected, |
| 183 OnHostMsgPromiseRejected) | 187 OnHostMsgPromiseRejected) |
| 184 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionMessage, | 188 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionMessage, |
| 185 OnHostMsgSessionMessage) | 189 OnHostMsgSessionMessage) |
| 190 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionKeysChange, | |
| 191 OnHostMsgSessionKeysChange) | |
| 192 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionExpirationChange, | |
| 193 OnHostMsgSessionExpirationChange) | |
| 186 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionReady, | 194 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionReady, |
| 187 OnHostMsgSessionReady) | 195 OnHostMsgSessionReady) |
| 188 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionClosed, | 196 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionClosed, |
| 189 OnHostMsgSessionClosed) | 197 OnHostMsgSessionClosed) |
| 190 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionError, | 198 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_SessionError, |
| 191 OnHostMsgSessionError) | 199 OnHostMsgSessionError) |
| 192 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_DeliverBlock, | 200 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_DeliverBlock, |
| 193 OnHostMsgDeliverBlock) | 201 OnHostMsgDeliverBlock) |
| 194 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_DecoderInitializeDone, | 202 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBInstance_DecoderInitializeDone, |
| 195 OnHostMsgDecoderInitializeDone) | 203 OnHostMsgDecoderInitializeDone) |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 570 void PPB_Instance_Proxy::PromiseResolvedWithSession(PP_Instance instance, | 578 void PPB_Instance_Proxy::PromiseResolvedWithSession(PP_Instance instance, |
| 571 uint32 promise_id, | 579 uint32 promise_id, |
| 572 PP_Var web_session_id_var) { | 580 PP_Var web_session_id_var) { |
| 573 dispatcher()->Send(new PpapiHostMsg_PPBInstance_PromiseResolvedWithSession( | 581 dispatcher()->Send(new PpapiHostMsg_PPBInstance_PromiseResolvedWithSession( |
| 574 API_ID_PPB_INSTANCE, | 582 API_ID_PPB_INSTANCE, |
| 575 instance, | 583 instance, |
| 576 promise_id, | 584 promise_id, |
| 577 SerializedVarSendInput(dispatcher(), web_session_id_var))); | 585 SerializedVarSendInput(dispatcher(), web_session_id_var))); |
| 578 } | 586 } |
| 579 | 587 |
| 588 void PPB_Instance_Proxy::PromiseResolvedWithKeyIds(PP_Instance instance, | |
| 589 uint32 promise_id, | |
| 590 PP_Var key_ids_var) { | |
| 591 ArrayVar* key_ids_array = ArrayVar::FromPPVar(key_ids_var); | |
| 592 if (!key_ids_array || | |
| 593 key_ids_array->GetLength() > media::limits::kMaxKeyIds) { | |
| 594 NOTREACHED(); | |
| 595 return; | |
| 596 } | |
| 597 | |
| 598 std::vector<std::vector<uint8_t> > key_ids; | |
| 599 for (size_t i = 0; i < key_ids_array->GetLength(); ++i) { | |
| 600 ArrayBufferVar* key_id = ArrayBufferVar::FromPPVar(key_ids_array->Get(i)); | |
| 601 if (!key_id || key_id->ByteLength() < media::limits::kMinKeyIdLength || | |
| 602 key_id->ByteLength() > media::limits::kMaxKeyIdLength) { | |
| 603 NOTREACHED(); | |
| 604 continue; | |
| 605 } | |
| 606 | |
| 607 const uint8_t* key_id_ptr = static_cast<const uint8_t*>(key_id->Map()); | |
| 608 const uint32_t key_id_size = key_id->ByteLength(); | |
| 609 std::vector<uint8_t> key_id_vector(key_id_ptr, key_id_ptr + key_id_size); | |
| 610 key_ids.push_back(key_id_vector); | |
| 611 } | |
| 612 | |
| 613 dispatcher()->Send(new PpapiHostMsg_PPBInstance_PromiseResolvedWithKeyIds( | |
| 614 API_ID_PPB_INSTANCE, instance, promise_id, key_ids)); | |
| 615 } | |
| 616 | |
| 580 void PPB_Instance_Proxy::PromiseRejected(PP_Instance instance, | 617 void PPB_Instance_Proxy::PromiseRejected(PP_Instance instance, |
| 581 uint32 promise_id, | 618 uint32 promise_id, |
| 582 PP_CdmExceptionCode exception_code, | 619 PP_CdmExceptionCode exception_code, |
| 583 uint32 system_code, | 620 uint32 system_code, |
| 584 PP_Var error_description_var) { | 621 PP_Var error_description_var) { |
| 585 dispatcher()->Send(new PpapiHostMsg_PPBInstance_PromiseRejected( | 622 dispatcher()->Send(new PpapiHostMsg_PPBInstance_PromiseRejected( |
| 586 API_ID_PPB_INSTANCE, | 623 API_ID_PPB_INSTANCE, |
| 587 instance, | 624 instance, |
| 588 promise_id, | 625 promise_id, |
| 589 exception_code, | 626 exception_code, |
| 590 system_code, | 627 system_code, |
| 591 SerializedVarSendInput(dispatcher(), error_description_var))); | 628 SerializedVarSendInput(dispatcher(), error_description_var))); |
| 592 } | 629 } |
| 593 | 630 |
| 594 void PPB_Instance_Proxy::SessionMessage(PP_Instance instance, | 631 void PPB_Instance_Proxy::SessionMessage(PP_Instance instance, |
| 595 PP_Var web_session_id_var, | 632 PP_Var web_session_id_var, |
| 596 PP_Var message_var, | 633 PP_Var message_var, |
| 597 PP_Var destination_url_var) { | 634 PP_Var destination_url_var) { |
| 598 dispatcher()->Send(new PpapiHostMsg_PPBInstance_SessionMessage( | 635 dispatcher()->Send(new PpapiHostMsg_PPBInstance_SessionMessage( |
| 599 API_ID_PPB_INSTANCE, | 636 API_ID_PPB_INSTANCE, |
| 600 instance, | 637 instance, |
| 601 SerializedVarSendInput(dispatcher(), web_session_id_var), | 638 SerializedVarSendInput(dispatcher(), web_session_id_var), |
| 602 SerializedVarSendInput(dispatcher(), message_var), | 639 SerializedVarSendInput(dispatcher(), message_var), |
| 603 SerializedVarSendInput(dispatcher(), destination_url_var))); | 640 SerializedVarSendInput(dispatcher(), destination_url_var))); |
| 604 } | 641 } |
| 605 | 642 |
| 643 void PPB_Instance_Proxy::SessionKeysChange(PP_Instance instance, | |
| 644 PP_Var web_session_id_var, | |
| 645 PP_Bool has_additional_usable_key) { | |
| 646 StringVar* session_id = StringVar::FromPPVar(web_session_id_var); | |
| 647 if (!session_id || | |
| 648 session_id->value().length() > media::limits::kMaxWebSessionIdLength) { | |
| 649 NOTREACHED(); | |
| 650 return; | |
| 651 } | |
| 652 | |
| 653 dispatcher()->Send(new PpapiHostMsg_PPBInstance_SessionKeysChange( | |
| 654 API_ID_PPB_INSTANCE, | |
| 655 instance, | |
| 656 session_id->value(), | |
| 657 has_additional_usable_key)); | |
| 658 } | |
| 659 | |
| 660 void PPB_Instance_Proxy::SessionExpirationChange(PP_Instance instance, | |
| 661 PP_Var web_session_id_var, | |
| 662 PP_Time new_expiry_time) { | |
| 663 StringVar* session_id = StringVar::FromPPVar(web_session_id_var); | |
| 664 if (!session_id || | |
| 665 session_id->value().length() > media::limits::kMaxWebSessionIdLength) { | |
| 666 NOTREACHED(); | |
| 667 return; | |
| 668 } | |
| 669 | |
| 670 dispatcher()->Send(new PpapiHostMsg_PPBInstance_SessionExpirationChange( | |
| 671 API_ID_PPB_INSTANCE, instance, session_id->value(), new_expiry_time)); | |
| 672 } | |
| 673 | |
| 606 void PPB_Instance_Proxy::SessionReady(PP_Instance instance, | 674 void PPB_Instance_Proxy::SessionReady(PP_Instance instance, |
| 607 PP_Var web_session_id_var) { | 675 PP_Var web_session_id_var) { |
| 608 dispatcher()->Send(new PpapiHostMsg_PPBInstance_SessionReady( | 676 dispatcher()->Send(new PpapiHostMsg_PPBInstance_SessionReady( |
| 609 API_ID_PPB_INSTANCE, | 677 API_ID_PPB_INSTANCE, |
| 610 instance, | 678 instance, |
| 611 SerializedVarSendInput(dispatcher(), web_session_id_var))); | 679 SerializedVarSendInput(dispatcher(), web_session_id_var))); |
| 612 } | 680 } |
| 613 | 681 |
| 614 void PPB_Instance_Proxy::SessionClosed(PP_Instance instance, | 682 void PPB_Instance_Proxy::SessionClosed(PP_Instance instance, |
| 615 PP_Var web_session_id_var) { | 683 PP_Var web_session_id_var) { |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1191 SerializedVarReceiveInput web_session_id) { | 1259 SerializedVarReceiveInput web_session_id) { |
| 1192 if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE)) | 1260 if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE)) |
| 1193 return; | 1261 return; |
| 1194 EnterInstanceNoLock enter(instance); | 1262 EnterInstanceNoLock enter(instance); |
| 1195 if (enter.succeeded()) { | 1263 if (enter.succeeded()) { |
| 1196 enter.functions()->PromiseResolvedWithSession( | 1264 enter.functions()->PromiseResolvedWithSession( |
| 1197 instance, promise_id, web_session_id.Get(dispatcher())); | 1265 instance, promise_id, web_session_id.Get(dispatcher())); |
| 1198 } | 1266 } |
| 1199 } | 1267 } |
| 1200 | 1268 |
| 1269 void PPB_Instance_Proxy::OnHostMsgPromiseResolvedWithKeyIds( | |
| 1270 PP_Instance instance, | |
| 1271 uint32_t promise_id, | |
| 1272 const std::vector<std::vector<uint8_t> >& key_ids) { | |
| 1273 if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE)) | |
| 1274 return; | |
| 1275 if (key_ids.size() > media::limits::kMaxKeyIds) { | |
| 1276 NOTREACHED(); | |
| 1277 return; | |
| 1278 } | |
| 1279 | |
| 1280 scoped_refptr<ArrayVar> key_ids_array = new ArrayVar(); | |
| 1281 key_ids_array->SetLength(key_ids.size()); | |
| 1282 for (size_t i = 0; i < key_ids.size(); ++i) { | |
| 1283 const std::vector<uint8_t>& entry = key_ids[i]; | |
| 1284 if (entry.size() < media::limits::kMinKeyIdLength || | |
| 1285 entry.size() > media::limits::kMaxKeyIdLength) { | |
| 1286 NOTREACHED(); | |
| 1287 continue; | |
| 1288 } | |
| 1289 key_ids_array->Set( | |
| 1290 i, | |
| 1291 PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar(entry.size(), | |
| 1292 &entry[0])); | |
| 1293 } | |
| 1294 | |
| 1295 EnterInstanceNoLock enter(instance); | |
| 1296 if (enter.succeeded()) { | |
| 1297 enter.functions()->PromiseResolvedWithKeyIds( | |
| 1298 instance, promise_id, key_ids_array->GetPPVar()); | |
|
dmichael (off chromium)
2014/09/04 21:17:11
GetPPVar increments the reference count, but you d
jrummell
2014/09/04 23:05:03
Done.
| |
| 1299 } | |
| 1300 } | |
| 1301 | |
| 1201 void PPB_Instance_Proxy::OnHostMsgPromiseRejected( | 1302 void PPB_Instance_Proxy::OnHostMsgPromiseRejected( |
| 1202 PP_Instance instance, | 1303 PP_Instance instance, |
| 1203 uint32_t promise_id, | 1304 uint32_t promise_id, |
| 1204 PP_CdmExceptionCode exception_code, | 1305 PP_CdmExceptionCode exception_code, |
| 1205 uint32_t system_code, | 1306 uint32_t system_code, |
| 1206 SerializedVarReceiveInput error_description) { | 1307 SerializedVarReceiveInput error_description) { |
| 1207 if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE)) | 1308 if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE)) |
| 1208 return; | 1309 return; |
| 1209 EnterInstanceNoLock enter(instance); | 1310 EnterInstanceNoLock enter(instance); |
| 1210 if (enter.succeeded()) { | 1311 if (enter.succeeded()) { |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 1225 return; | 1326 return; |
| 1226 EnterInstanceNoLock enter(instance); | 1327 EnterInstanceNoLock enter(instance); |
| 1227 if (enter.succeeded()) { | 1328 if (enter.succeeded()) { |
| 1228 enter.functions()->SessionMessage(instance, | 1329 enter.functions()->SessionMessage(instance, |
| 1229 web_session_id.Get(dispatcher()), | 1330 web_session_id.Get(dispatcher()), |
| 1230 message.Get(dispatcher()), | 1331 message.Get(dispatcher()), |
| 1231 destination_url.Get(dispatcher())); | 1332 destination_url.Get(dispatcher())); |
| 1232 } | 1333 } |
| 1233 } | 1334 } |
| 1234 | 1335 |
| 1336 void PPB_Instance_Proxy::OnHostMsgSessionKeysChange( | |
| 1337 PP_Instance instance, | |
| 1338 const std::string& web_session_id, | |
| 1339 PP_Bool has_additional_usable_key) { | |
| 1340 if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE)) | |
| 1341 return; | |
| 1342 EnterInstanceNoLock enter(instance); | |
| 1343 if (enter.succeeded()) { | |
| 1344 enter.functions()->SessionKeysChange( | |
| 1345 instance, | |
| 1346 StringVar::StringToPPVar(web_session_id), | |
|
dmichael (off chromium)
2014/09/04 21:17:11
Same problem here; StringToPPVar increments the re
jrummell
2014/09/04 23:05:03
Done.
| |
| 1347 has_additional_usable_key); | |
| 1348 } | |
| 1349 } | |
| 1350 | |
| 1351 void PPB_Instance_Proxy::OnHostMsgSessionExpirationChange( | |
| 1352 PP_Instance instance, | |
| 1353 const std::string& web_session_id, | |
| 1354 PP_Time new_expiry_time) { | |
| 1355 if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE)) | |
| 1356 return; | |
| 1357 EnterInstanceNoLock enter(instance); | |
| 1358 if (enter.succeeded()) { | |
| 1359 enter.functions()->SessionExpirationChange( | |
| 1360 instance, StringVar::StringToPPVar(web_session_id), new_expiry_time); | |
|
dmichael (off chromium)
2014/09/04 21:17:11
ditto
jrummell
2014/09/04 23:05:03
Done.
| |
| 1361 } | |
| 1362 } | |
| 1363 | |
| 1235 void PPB_Instance_Proxy::OnHostMsgSessionReady( | 1364 void PPB_Instance_Proxy::OnHostMsgSessionReady( |
| 1236 PP_Instance instance, | 1365 PP_Instance instance, |
| 1237 SerializedVarReceiveInput web_session_id) { | 1366 SerializedVarReceiveInput web_session_id) { |
| 1238 if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE)) | 1367 if (!dispatcher()->permissions().HasPermission(PERMISSION_PRIVATE)) |
| 1239 return; | 1368 return; |
| 1240 EnterInstanceNoLock enter(instance); | 1369 EnterInstanceNoLock enter(instance); |
| 1241 if (enter.succeeded()) { | 1370 if (enter.succeeded()) { |
| 1242 enter.functions()->SessionReady(instance, web_session_id.Get(dispatcher())); | 1371 enter.functions()->SessionReady(instance, web_session_id.Get(dispatcher())); |
| 1243 } | 1372 } |
| 1244 } | 1373 } |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1436 PP_Instance instance) { | 1565 PP_Instance instance) { |
| 1437 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> | 1566 InstanceData* data = static_cast<PluginDispatcher*>(dispatcher())-> |
| 1438 GetInstanceData(instance); | 1567 GetInstanceData(instance); |
| 1439 if (!data) | 1568 if (!data) |
| 1440 return; // Instance was probably deleted. | 1569 return; // Instance was probably deleted. |
| 1441 data->should_do_request_surrounding_text = false; | 1570 data->should_do_request_surrounding_text = false; |
| 1442 } | 1571 } |
| 1443 | 1572 |
| 1444 } // namespace proxy | 1573 } // namespace proxy |
| 1445 } // namespace ppapi | 1574 } // namespace ppapi |
| OLD | NEW |