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 PPAPI_PROXY_PROXY_CHANNEL_H_ | 5 #ifndef PPAPI_PROXY_PROXY_CHANNEL_H_ |
6 #define PPAPI_PROXY_PROXY_CHANNEL_H_ | 6 #define PPAPI_PROXY_PROXY_CHANNEL_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/process.h" | 9 #include "base/process.h" |
10 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 virtual bool Send(IPC::Message* msg); | 71 virtual bool Send(IPC::Message* msg); |
72 | 72 |
73 // IPC::Channel::Listener implementation. | 73 // IPC::Channel::Listener implementation. |
74 virtual void OnChannelError(); | 74 virtual void OnChannelError(); |
75 | 75 |
76 // Will be NULL in some unit tests and if the remote side has crashed. | 76 // Will be NULL in some unit tests and if the remote side has crashed. |
77 IPC::SyncChannel* channel() const { | 77 IPC::SyncChannel* channel() const { |
78 return channel_.get(); | 78 return channel_.get(); |
79 } | 79 } |
80 | 80 |
81 #if defined(OS_POSIX) | 81 #if defined(OS_POSIX) && !defined(OS_NACL) |
82 int TakeRendererFD(); | 82 int TakeRendererFD(); |
83 #endif | 83 #endif |
84 | 84 |
85 protected: | 85 protected: |
86 explicit ProxyChannel(); | 86 explicit ProxyChannel(); |
87 | 87 |
88 // You must call this function before anything else. Returns true on success. | 88 // You must call this function before anything else. Returns true on success. |
89 // The delegate pointer must outlive this class, ownership is not | 89 // The delegate pointer must outlive this class, ownership is not |
90 // transferred. | 90 // transferred. |
91 virtual bool InitWithChannel(Delegate* delegate, | 91 virtual bool InitWithChannel(Delegate* delegate, |
(...skipping 17 matching lines...) Expand all Loading... |
109 // remote side has crashed. | 109 // remote side has crashed. |
110 scoped_ptr<IPC::SyncChannel> channel_; | 110 scoped_ptr<IPC::SyncChannel> channel_; |
111 | 111 |
112 DISALLOW_COPY_AND_ASSIGN(ProxyChannel); | 112 DISALLOW_COPY_AND_ASSIGN(ProxyChannel); |
113 }; | 113 }; |
114 | 114 |
115 } // namespace proxy | 115 } // namespace proxy |
116 } // namespace ppapi | 116 } // namespace ppapi |
117 | 117 |
118 #endif // PPAPI_PROXY_PROXY_CHANNEL_H_ | 118 #endif // PPAPI_PROXY_PROXY_CHANNEL_H_ |
OLD | NEW |