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

Side by Side Diff: chrome/nacl/nacl_ipc_adapter.h

Issue 10214007: Add an IPC channel between the NaCl loader process and the renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
OLDNEW
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
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
80 // Listener implementation. 84 // Listener implementation.
81 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 85 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
82 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; 86 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
83 virtual void OnChannelError() OVERRIDE; 87 virtual void OnChannelError() OVERRIDE;
84 88
85 private: 89 private:
86 friend class base::RefCountedThreadSafe<NaClIPCAdapter>; 90 friend class base::RefCountedThreadSafe<NaClIPCAdapter>;
87 91
88 class RewrittenMessage; 92 class RewrittenMessage;
89 93
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // To be accessed inside of lock_ only. 147 // To be accessed inside of lock_ only.
144 LockedData locked_data_; 148 LockedData locked_data_;
145 149
146 // To be accessed on the I/O thread (via task runner) only. 150 // To be accessed on the I/O thread (via task runner) only.
147 IOThreadData io_thread_data_; 151 IOThreadData io_thread_data_;
148 152
149 DISALLOW_COPY_AND_ASSIGN(NaClIPCAdapter); 153 DISALLOW_COPY_AND_ASSIGN(NaClIPCAdapter);
150 }; 154 };
151 155
152 #endif // CHROME_NACL_NACL_IPC_ADAPTER_H_ 156 #endif // CHROME_NACL_NACL_IPC_ADAPTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698