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

Side by Side Diff: ppapi/nacl_irt/manifest_service.cc

Issue 301973003: Introduce IPC::ChannelProxy::Create*() and IPC::SynChannel::Create*() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing mac build Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ipc/ipc_test_base.cc ('k') | ppapi/nacl_irt/ppapi_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ppapi/nacl_irt/manifest_service.h" 5 #include "ppapi/nacl_irt/manifest_service.h"
6 6
7 #include "base/message_loop/message_loop_proxy.h" 7 #include "base/message_loop/message_loop_proxy.h"
8 #include "ipc/ipc_channel_handle.h" 8 #include "ipc/ipc_channel_handle.h"
9 #include "ipc/ipc_channel_proxy.h" 9 #include "ipc/ipc_channel_proxy.h"
10 #include "ipc/ipc_sync_message_filter.h" 10 #include "ipc/ipc_sync_message_filter.h"
11 #include "native_client/src/trusted/service_runtime/include/sys/errno.h" 11 #include "native_client/src/trusted/service_runtime/include/sys/errno.h"
12 #include "ppapi/nacl_irt/irt_manifest.h" 12 #include "ppapi/nacl_irt/irt_manifest.h"
13 #include "ppapi/nacl_irt/plugin_startup.h" 13 #include "ppapi/nacl_irt/plugin_startup.h"
14 #include "ppapi/proxy/ppapi_messages.h" 14 #include "ppapi/proxy/ppapi_messages.h"
15 15
16 namespace ppapi { 16 namespace ppapi {
17 17
18 const char kFilePrefix[] = "files/"; 18 const char kFilePrefix[] = "files/";
19 19
20 ManifestService::ManifestService( 20 ManifestService::ManifestService(
21 const IPC::ChannelHandle& handle, 21 const IPC::ChannelHandle& handle,
22 scoped_refptr<base::MessageLoopProxy> io_message_loop, 22 scoped_refptr<base::MessageLoopProxy> io_message_loop,
23 base::WaitableEvent* shutdown_event) { 23 base::WaitableEvent* shutdown_event) {
24 filter_ = new IPC::SyncMessageFilter(shutdown_event); 24 filter_ = new IPC::SyncMessageFilter(shutdown_event);
25 channel_.reset(new IPC::ChannelProxy(handle, 25 channel_ = IPC::ChannelProxy::CreateServer(handle,
26 IPC::Channel::MODE_SERVER, 26 NULL, // Listener
27 NULL, // Listener 27 io_message_loop);
28 io_message_loop));
29 channel_->AddFilter(filter_.get()); 28 channel_->AddFilter(filter_.get());
30 } 29 }
31 30
32 ManifestService::~ManifestService() { 31 ManifestService::~ManifestService() {
33 } 32 }
34 33
35 void ManifestService::StartupInitializationComplete() { 34 void ManifestService::StartupInitializationComplete() {
36 filter_->Send(new PpapiHostMsg_StartupInitializationComplete); 35 filter_->Send(new PpapiHostMsg_StartupInitializationComplete);
37 } 36 }
38 37
(...skipping 21 matching lines...) Expand all
60 ManifestService* manifest_service = GetManifestService(); 59 ManifestService* manifest_service = GetManifestService();
61 if (manifest_service == NULL || 60 if (manifest_service == NULL ||
62 !manifest_service->OpenResource(file, fd)) { 61 !manifest_service->OpenResource(file, fd)) {
63 return NACL_ABI_EIO; 62 return NACL_ABI_EIO;
64 } 63 }
65 64
66 return (*fd == -1) ? NACL_ABI_ENOENT : 0; 65 return (*fd == -1) ? NACL_ABI_ENOENT : 0;
67 } 66 }
68 67
69 } // namespace ppapi 68 } // namespace ppapi
OLDNEW
« no previous file with comments | « ipc/ipc_test_base.cc ('k') | ppapi/nacl_irt/ppapi_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698