| Index: components/nacl/renderer/manifest_service_channel.cc
|
| diff --git a/components/nacl/renderer/trusted_plugin_channel.cc b/components/nacl/renderer/manifest_service_channel.cc
|
| similarity index 68%
|
| copy from components/nacl/renderer/trusted_plugin_channel.cc
|
| copy to components/nacl/renderer/manifest_service_channel.cc
|
| index 7ce3d843994745e3d65536b5988c43f040664a0b..d2ac5ef9eb5cf4a19152be9341a277e3be3a54cd 100644
|
| --- a/components/nacl/renderer/trusted_plugin_channel.cc
|
| +++ b/components/nacl/renderer/manifest_service_channel.cc
|
| @@ -2,8 +2,9 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "components/nacl/renderer/trusted_plugin_channel.h"
|
| +#include "components/nacl/renderer/manifest_service_channel.h"
|
|
|
| +#include "base/callback.h"
|
| #include "base/callback_helpers.h"
|
| #include "content/public/renderer/render_thread.h"
|
| #include "ipc/ipc_channel.h"
|
| @@ -12,36 +13,33 @@
|
|
|
| namespace nacl {
|
|
|
| -TrustedPluginChannel::TrustedPluginChannel(
|
| +ManifestServiceChannel::ManifestServiceChannel(
|
| const IPC::ChannelHandle& handle,
|
| const base::Callback<void(int32_t)>& connected_callback,
|
| base::WaitableEvent* waitable_event)
|
| : connected_callback_(connected_callback),
|
| channel_(new IPC::SyncChannel(
|
| handle, IPC::Channel::MODE_CLIENT, this,
|
| - content::RenderThread::Get()->GetIOMessageLoopProxy(), true,
|
| - waitable_event)) {
|
| + content::RenderThread::Get()->GetIOMessageLoopProxy(),
|
| + true, waitable_event)) {
|
| }
|
|
|
| -TrustedPluginChannel::~TrustedPluginChannel() {
|
| +ManifestServiceChannel::~ManifestServiceChannel() {
|
| if (!connected_callback_.is_null())
|
| base::ResetAndReturn(&connected_callback_).Run(PP_ERROR_FAILED);
|
| }
|
|
|
| -bool TrustedPluginChannel::Send(IPC::Message* message) {
|
| - return channel_->Send(message);
|
| -}
|
| -
|
| -bool TrustedPluginChannel::OnMessageReceived(const IPC::Message& message) {
|
| +bool ManifestServiceChannel::OnMessageReceived(const IPC::Message& message) {
|
| + // TODO(hidehiko): Implement StartCompleted and OpenResource.
|
| return false;
|
| }
|
|
|
| -void TrustedPluginChannel::OnChannelConnected(int32 peer_pid) {
|
| +void ManifestServiceChannel::OnChannelConnected(int32 peer_pid) {
|
| if (!connected_callback_.is_null())
|
| base::ResetAndReturn(&connected_callback_).Run(PP_OK);
|
| }
|
|
|
| -void TrustedPluginChannel::OnChannelError() {
|
| +void ManifestServiceChannel::OnChannelError() {
|
| if (!connected_callback_.is_null())
|
| base::ResetAndReturn(&connected_callback_).Run(PP_ERROR_FAILED);
|
| }
|
|
|