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, | 544 load_manager, launch_result.trusted_ipc_channel_handle, |
545 mojo::MakeRequest<mojom::NaClRendererHost>( | 545 content::RenderThread::Get()->GetShutdownEvent(), is_helper_nexe)); |
546 mojo::ScopedMessagePipeHandle( | |
547 launch_result.trusted_ipc_channel_handle.mojo_handle)), | |
548 is_helper_nexe)); | |
549 load_manager->set_trusted_plugin_channel(std::move(trusted_plugin_channel)); | 546 load_manager->set_trusted_plugin_channel(std::move(trusted_plugin_channel)); |
550 } else { | 547 } else { |
551 PostPPCompletionCallback(callback, PP_ERROR_FAILED); | 548 PostPPCompletionCallback(callback, PP_ERROR_FAILED); |
552 return; | 549 return; |
553 } | 550 } |
554 | 551 |
555 // Create the manifest service handle as well. | 552 // Create the manifest service handle as well. |
556 if (IsValidChannelHandle(launch_result.manifest_service_ipc_channel_handle)) { | 553 if (IsValidChannelHandle(launch_result.manifest_service_ipc_channel_handle)) { |
557 std::unique_ptr<ManifestServiceChannel> manifest_service_channel( | 554 std::unique_ptr<ManifestServiceChannel> manifest_service_channel( |
558 new ManifestServiceChannel( | 555 new ManifestServiceChannel( |
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1737 // Mark the request as requesting a PNaCl bitcode file, | 1734 // Mark the request as requesting a PNaCl bitcode file, |
1738 // so that component updater can detect this user action. | 1735 // so that component updater can detect this user action. |
1739 url_request.addHTTPHeaderField( | 1736 url_request.addHTTPHeaderField( |
1740 blink::WebString::fromUTF8("Accept"), | 1737 blink::WebString::fromUTF8("Accept"), |
1741 blink::WebString::fromUTF8("application/x-pnacl, */*")); | 1738 blink::WebString::fromUTF8("application/x-pnacl, */*")); |
1742 url_request.setRequestContext(blink::WebURLRequest::RequestContextObject); | 1739 url_request.setRequestContext(blink::WebURLRequest::RequestContextObject); |
1743 downloader->Load(url_request); | 1740 downloader->Load(url_request); |
1744 } | 1741 } |
1745 | 1742 |
1746 } // namespace nacl | 1743 } // namespace nacl |
OLD | NEW |