| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/manifest_service_channel.h" | 5 #include "components/nacl/renderer/manifest_service_channel.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 const IPC::ChannelHandle& handle, | 25 const IPC::ChannelHandle& handle, |
| 26 const base::Callback<void(int32_t)>& connected_callback, | 26 const base::Callback<void(int32_t)>& connected_callback, |
| 27 std::unique_ptr<Delegate> delegate, | 27 std::unique_ptr<Delegate> delegate, |
| 28 base::WaitableEvent* waitable_event) | 28 base::WaitableEvent* waitable_event) |
| 29 : connected_callback_(connected_callback), | 29 : connected_callback_(connected_callback), |
| 30 delegate_(std::move(delegate)), | 30 delegate_(std::move(delegate)), |
| 31 channel_(IPC::SyncChannel::Create( | 31 channel_(IPC::SyncChannel::Create( |
| 32 handle, | 32 handle, |
| 33 IPC::Channel::MODE_CLIENT, | 33 IPC::Channel::MODE_CLIENT, |
| 34 this, | 34 this, |
| 35 content::RenderThread::Get()->GetIOMessageLoopProxy(), | 35 content::RenderThread::Get()->GetIOTaskRunner(), |
| 36 true, | 36 true, |
| 37 waitable_event)), | 37 waitable_event)), |
| 38 peer_pid_(base::kNullProcessId), | 38 peer_pid_(base::kNullProcessId), |
| 39 weak_ptr_factory_(this) {} | 39 weak_ptr_factory_(this) {} |
| 40 | 40 |
| 41 ManifestServiceChannel::~ManifestServiceChannel() { | 41 ManifestServiceChannel::~ManifestServiceChannel() { |
| 42 if (!connected_callback_.is_null()) | 42 if (!connected_callback_.is_null()) |
| 43 base::ResetAndReturn(&connected_callback_).Run(PP_ERROR_FAILED); | 43 base::ResetAndReturn(&connected_callback_).Run(PP_ERROR_FAILED); |
| 44 } | 44 } |
| 45 | 45 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 IPC::PlatformFileForTransit file_for_transit = | 91 IPC::PlatformFileForTransit file_for_transit = |
| 92 IPC::TakePlatformFileForTransit(std::move(file)); | 92 IPC::TakePlatformFileForTransit(std::move(file)); |
| 93 handle.set_file_handle(file_for_transit, PP_FILEOPENFLAG_READ, 0); | 93 handle.set_file_handle(file_for_transit, PP_FILEOPENFLAG_READ, 0); |
| 94 } | 94 } |
| 95 PpapiHostMsg_OpenResource::WriteReplyParams(reply, token_lo, token_hi, | 95 PpapiHostMsg_OpenResource::WriteReplyParams(reply, token_lo, token_hi, |
| 96 handle); | 96 handle); |
| 97 Send(reply); | 97 Send(reply); |
| 98 } | 98 } |
| 99 | 99 |
| 100 } // namespace nacl | 100 } // namespace nacl |
| OLD | NEW |