OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/nacl/renderer/ppb_nacl_private.h" | 5 #include "components/nacl/renderer/ppb_nacl_private.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 | 534 |
535 // Store the crash information shared memory handle. | 535 // Store the crash information shared memory handle. |
536 load_manager->set_crash_info_shmem_handle( | 536 load_manager->set_crash_info_shmem_handle( |
537 launch_result.crash_info_shmem_handle); | 537 launch_result.crash_info_shmem_handle); |
538 | 538 |
539 // Create the trusted plugin channel. | 539 // Create the trusted plugin channel. |
540 if (IsValidChannelHandle(launch_result.trusted_ipc_channel_handle)) { | 540 if (IsValidChannelHandle(launch_result.trusted_ipc_channel_handle)) { |
541 bool is_helper_nexe = !PP_ToBool(main_service_runtime); | 541 bool is_helper_nexe = !PP_ToBool(main_service_runtime); |
542 std::unique_ptr<TrustedPluginChannel> trusted_plugin_channel( | 542 std::unique_ptr<TrustedPluginChannel> trusted_plugin_channel( |
543 new TrustedPluginChannel( | 543 new TrustedPluginChannel( |
544 load_manager, launch_result.trusted_ipc_channel_handle, | 544 load_manager, |
545 content::RenderThread::Get()->GetShutdownEvent(), is_helper_nexe)); | 545 mojo::MakeRequest<mojom::NaClRendererHost>( |
| 546 mojo::ScopedMessagePipeHandle( |
| 547 launch_result.trusted_ipc_channel_handle.mojo_handle)), |
| 548 is_helper_nexe)); |
546 load_manager->set_trusted_plugin_channel(std::move(trusted_plugin_channel)); | 549 load_manager->set_trusted_plugin_channel(std::move(trusted_plugin_channel)); |
547 } else { | 550 } else { |
548 PostPPCompletionCallback(callback, PP_ERROR_FAILED); | 551 PostPPCompletionCallback(callback, PP_ERROR_FAILED); |
549 return; | 552 return; |
550 } | 553 } |
551 | 554 |
552 // Create the manifest service handle as well. | 555 // Create the manifest service handle as well. |
553 if (IsValidChannelHandle(launch_result.manifest_service_ipc_channel_handle)) { | 556 if (IsValidChannelHandle(launch_result.manifest_service_ipc_channel_handle)) { |
554 std::unique_ptr<ManifestServiceChannel> manifest_service_channel( | 557 std::unique_ptr<ManifestServiceChannel> manifest_service_channel( |
555 new ManifestServiceChannel( | 558 new ManifestServiceChannel( |
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1734 // Mark the request as requesting a PNaCl bitcode file, | 1737 // Mark the request as requesting a PNaCl bitcode file, |
1735 // so that component updater can detect this user action. | 1738 // so that component updater can detect this user action. |
1736 url_request.addHTTPHeaderField( | 1739 url_request.addHTTPHeaderField( |
1737 blink::WebString::fromUTF8("Accept"), | 1740 blink::WebString::fromUTF8("Accept"), |
1738 blink::WebString::fromUTF8("application/x-pnacl, */*")); | 1741 blink::WebString::fromUTF8("application/x-pnacl, */*")); |
1739 url_request.setRequestContext(blink::WebURLRequest::RequestContextObject); | 1742 url_request.setRequestContext(blink::WebURLRequest::RequestContextObject); |
1740 downloader->Load(url_request); | 1743 downloader->Load(url_request); |
1741 } | 1744 } |
1742 | 1745 |
1743 } // namespace nacl | 1746 } // namespace nacl |
OLD | NEW |