Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Unified Diff: components/nacl/renderer/manifest_service_channel.cc

Issue 231793003: Add IPC Channel for new ManifestService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/nacl/renderer/manifest_service_channel.h ('k') | components/nacl/renderer/nexe_load_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « components/nacl/renderer/manifest_service_channel.h ('k') | components/nacl/renderer/nexe_load_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698