| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef COMPONENTS_NACL_LOADER_NACL_IPC_ADAPTER_H_ | 5 #ifndef COMPONENTS_NACL_LOADER_NACL_IPC_ADAPTER_H_ |
| 6 #define COMPONENTS_NACL_LOADER_NACL_IPC_ADAPTER_H_ | 6 #define COMPONENTS_NACL_LOADER_NACL_IPC_ADAPTER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 // read. | 133 // read. |
| 134 int BlockingReceive(NaClImcTypedMsgHdr* msg); | 134 int BlockingReceive(NaClImcTypedMsgHdr* msg); |
| 135 | 135 |
| 136 // Closes the IPC channel. | 136 // Closes the IPC channel. |
| 137 void CloseChannel(); | 137 void CloseChannel(); |
| 138 | 138 |
| 139 // Make a NaClDesc that refers to this NaClIPCAdapter. Note that the returned | 139 // Make a NaClDesc that refers to this NaClIPCAdapter. Note that the returned |
| 140 // NaClDesc is reference-counted, and a reference is returned. | 140 // NaClDesc is reference-counted, and a reference is returned. |
| 141 NaClDesc* MakeNaClDesc(); | 141 NaClDesc* MakeNaClDesc(); |
| 142 | 142 |
| 143 #if defined(OS_POSIX) | |
| 144 base::ScopedFD TakeClientFileDescriptor(); | |
| 145 #endif | |
| 146 | |
| 147 // Listener implementation. | 143 // Listener implementation. |
| 148 bool OnMessageReceived(const IPC::Message& message) override; | 144 bool OnMessageReceived(const IPC::Message& message) override; |
| 149 void OnChannelConnected(int32_t peer_pid) override; | 145 void OnChannelConnected(int32_t peer_pid) override; |
| 150 void OnChannelError() override; | 146 void OnChannelError() override; |
| 151 | 147 |
| 152 private: | 148 private: |
| 153 friend class base::RefCountedThreadSafe<NaClIPCAdapter>; | 149 friend class base::RefCountedThreadSafe<NaClIPCAdapter>; |
| 154 | 150 |
| 155 class RewrittenMessage; | 151 class RewrittenMessage; |
| 156 | 152 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 // To be accessed on the I/O thread (via task runner) only. | 231 // To be accessed on the I/O thread (via task runner) only. |
| 236 IOThreadData io_thread_data_; | 232 IOThreadData io_thread_data_; |
| 237 | 233 |
| 238 DISALLOW_COPY_AND_ASSIGN(NaClIPCAdapter); | 234 DISALLOW_COPY_AND_ASSIGN(NaClIPCAdapter); |
| 239 }; | 235 }; |
| 240 | 236 |
| 241 // Export TranslatePepperFileReadWriteOpenFlags for testing. | 237 // Export TranslatePepperFileReadWriteOpenFlags for testing. |
| 242 int TranslatePepperFileReadWriteOpenFlagsForTesting(int32_t pp_open_flags); | 238 int TranslatePepperFileReadWriteOpenFlagsForTesting(int32_t pp_open_flags); |
| 243 | 239 |
| 244 #endif // COMPONENTS_NACL_LOADER_NACL_IPC_ADAPTER_H_ | 240 #endif // COMPONENTS_NACL_LOADER_NACL_IPC_ADAPTER_H_ |
| OLD | NEW |