Chromium Code Reviews| 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/files/scoped_file.h" | |
|
dmichael (off chromium)
2014/10/20 22:34:40
optional nit: It should be possible to make a forw
Hajime Morrita
2014/10/20 22:49:53
Tried, but turned out the type is a typedef of a t
| |
| 8 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/process/process.h" | 10 #include "base/process/process.h" |
| 10 #include "ipc/ipc_listener.h" | 11 #include "ipc/ipc_listener.h" |
| 11 #include "ipc/ipc_platform_file.h" | 12 #include "ipc/ipc_platform_file.h" |
| 12 #include "ipc/ipc_sender.h" | 13 #include "ipc/ipc_sender.h" |
| 13 #include "ipc/ipc_sync_channel.h" | 14 #include "ipc/ipc_sync_channel.h" |
| 14 #include "ppapi/proxy/ppapi_proxy_export.h" | 15 #include "ppapi/proxy/ppapi_proxy_export.h" |
| 15 | 16 |
| 16 namespace base { | 17 namespace base { |
| 17 class MessageLoopProxy; | 18 class MessageLoopProxy; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 74 | 75 |
| 75 // IPC::Listener implementation. | 76 // IPC::Listener implementation. |
| 76 virtual void OnChannelError() override; | 77 virtual void OnChannelError() override; |
| 77 | 78 |
| 78 // Will be NULL in some unit tests and if the remote side has crashed. | 79 // Will be NULL in some unit tests and if the remote side has crashed. |
| 79 IPC::SyncChannel* channel() const { | 80 IPC::SyncChannel* channel() const { |
| 80 return channel_.get(); | 81 return channel_.get(); |
| 81 } | 82 } |
| 82 | 83 |
| 83 #if defined(OS_POSIX) && !defined(OS_NACL) | 84 #if defined(OS_POSIX) && !defined(OS_NACL) |
| 84 int TakeRendererFD(); | 85 base::ScopedFD TakeRendererFD(); |
| 85 #endif | 86 #endif |
| 86 | 87 |
| 87 protected: | 88 protected: |
| 88 explicit ProxyChannel(); | 89 explicit ProxyChannel(); |
| 89 | 90 |
| 90 // You must call this function before anything else. Returns true on success. | 91 // You must call this function before anything else. Returns true on success. |
| 91 // The delegate pointer must outlive this class, ownership is not | 92 // The delegate pointer must outlive this class, ownership is not |
| 92 // transferred. | 93 // transferred. |
| 93 virtual bool InitWithChannel(Delegate* delegate, | 94 virtual bool InitWithChannel(Delegate* delegate, |
| 94 base::ProcessId peer_pid, | 95 base::ProcessId peer_pid, |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 117 // remote side has crashed. | 118 // remote side has crashed. |
| 118 scoped_ptr<IPC::SyncChannel> channel_; | 119 scoped_ptr<IPC::SyncChannel> channel_; |
| 119 | 120 |
| 120 DISALLOW_COPY_AND_ASSIGN(ProxyChannel); | 121 DISALLOW_COPY_AND_ASSIGN(ProxyChannel); |
| 121 }; | 122 }; |
| 122 | 123 |
| 123 } // namespace proxy | 124 } // namespace proxy |
| 124 } // namespace ppapi | 125 } // namespace ppapi |
| 125 | 126 |
| 126 #endif // PPAPI_PROXY_PROXY_CHANNEL_H_ | 127 #endif // PPAPI_PROXY_PROXY_CHANNEL_H_ |
| OLD | NEW |