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 "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" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 }; | 61 }; |
62 | 62 |
63 ManifestService::ManifestService( | 63 ManifestService::ManifestService( |
64 const IPC::ChannelHandle& handle, | 64 const IPC::ChannelHandle& handle, |
65 scoped_refptr<base::MessageLoopProxy> io_message_loop, | 65 scoped_refptr<base::MessageLoopProxy> io_message_loop, |
66 base::WaitableEvent* shutdown_event) { | 66 base::WaitableEvent* shutdown_event) { |
67 filter_ = new ManifestMessageFilter(shutdown_event); | 67 filter_ = new ManifestMessageFilter(shutdown_event); |
68 channel_ = IPC::ChannelProxy::Create(handle, | 68 channel_ = IPC::ChannelProxy::Create(handle, |
69 IPC::Channel::MODE_SERVER, | 69 IPC::Channel::MODE_SERVER, |
70 NULL, // Listener | 70 NULL, // Listener |
71 io_message_loop); | 71 io_message_loop.get()); |
72 channel_->AddFilter(filter_.get()); | 72 channel_->AddFilter(filter_.get()); |
73 } | 73 } |
74 | 74 |
75 ManifestService::~ManifestService() { | 75 ManifestService::~ManifestService() { |
76 } | 76 } |
77 | 77 |
78 void ManifestService::StartupInitializationComplete() { | 78 void ManifestService::StartupInitializationComplete() { |
79 filter_->Send(new PpapiHostMsg_StartupInitializationComplete); | 79 filter_->Send(new PpapiHostMsg_StartupInitializationComplete); |
80 } | 80 } |
81 | 81 |
(...skipping 21 matching lines...) Expand all Loading... |
103 ManifestService* manifest_service = GetManifestService(); | 103 ManifestService* manifest_service = GetManifestService(); |
104 if (manifest_service == NULL || | 104 if (manifest_service == NULL || |
105 !manifest_service->OpenResource(file, fd)) { | 105 !manifest_service->OpenResource(file, fd)) { |
106 return NACL_ABI_EIO; | 106 return NACL_ABI_EIO; |
107 } | 107 } |
108 | 108 |
109 return (*fd == -1) ? NACL_ABI_ENOENT : 0; | 109 return (*fd == -1) ? NACL_ABI_ENOENT : 0; |
110 } | 110 } |
111 | 111 |
112 } // namespace ppapi | 112 } // namespace ppapi |
OLD | NEW |