| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROME_NACL_NACL_IPC_ADAPTER_H_ | 5 #ifndef CHROME_NACL_NACL_IPC_ADAPTER_H_ |
| 6 #define CHROME_NACL_NACL_IPC_ADAPTER_H_ | 6 #define CHROME_NACL_NACL_IPC_ADAPTER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 // read. | 70 // read. |
| 71 int BlockingReceive(char* output_buffer, size_t output_buffer_size); | 71 int BlockingReceive(char* output_buffer, size_t output_buffer_size); |
| 72 | 72 |
| 73 // Closes the IPC channel. | 73 // Closes the IPC channel. |
| 74 void CloseChannel(); | 74 void CloseChannel(); |
| 75 | 75 |
| 76 // Make a NaClDesc that refers to this NaClIPCAdapter. Note that the returned | 76 // Make a NaClDesc that refers to this NaClIPCAdapter. Note that the returned |
| 77 // NaClDesc is reference-counted, and a reference is returned. | 77 // NaClDesc is reference-counted, and a reference is returned. |
| 78 NaClDesc* MakeNaClDesc(); | 78 NaClDesc* MakeNaClDesc(); |
| 79 | 79 |
| 80 #if defined(OS_POSIX) | |
| 81 int TakeClientFileDescriptor(); | |
| 82 #endif | |
| 83 | |
| 84 // Listener implementation. | 80 // Listener implementation. |
| 85 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 81 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 86 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 82 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
| 87 virtual void OnChannelError() OVERRIDE; | 83 virtual void OnChannelError() OVERRIDE; |
| 88 | 84 |
| 89 private: | 85 private: |
| 90 friend class base::RefCountedThreadSafe<NaClIPCAdapter>; | 86 friend class base::RefCountedThreadSafe<NaClIPCAdapter>; |
| 91 | 87 |
| 92 class RewrittenMessage; | 88 class RewrittenMessage; |
| 93 | 89 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // To be accessed inside of lock_ only. | 143 // To be accessed inside of lock_ only. |
| 148 LockedData locked_data_; | 144 LockedData locked_data_; |
| 149 | 145 |
| 150 // To be accessed on the I/O thread (via task runner) only. | 146 // To be accessed on the I/O thread (via task runner) only. |
| 151 IOThreadData io_thread_data_; | 147 IOThreadData io_thread_data_; |
| 152 | 148 |
| 153 DISALLOW_COPY_AND_ASSIGN(NaClIPCAdapter); | 149 DISALLOW_COPY_AND_ASSIGN(NaClIPCAdapter); |
| 154 }; | 150 }; |
| 155 | 151 |
| 156 #endif // CHROME_NACL_NACL_IPC_ADAPTER_H_ | 152 #endif // CHROME_NACL_NACL_IPC_ADAPTER_H_ |
| OLD | NEW |