| 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" | 8 #include "base/files/scoped_file.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/process/process.h" | 10 #include "base/process/process.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 // message fails, the returned handle is properly closed by the IPC system. If | 66 // message fails, the returned handle is properly closed by the IPC system. If |
| 67 // should_close_source is set to true, the original handle is closed by this | 67 // should_close_source is set to true, the original handle is closed by this |
| 68 // operation and should not be used again. | 68 // operation and should not be used again. |
| 69 IPC::PlatformFileForTransit ShareHandleWithRemote( | 69 IPC::PlatformFileForTransit ShareHandleWithRemote( |
| 70 base::PlatformFile handle, | 70 base::PlatformFile handle, |
| 71 bool should_close_source); | 71 bool should_close_source); |
| 72 | 72 |
| 73 // IPC::Sender implementation. | 73 // IPC::Sender implementation. |
| 74 virtual bool Send(IPC::Message* msg) override; | 74 virtual bool Send(IPC::Message* msg) override; |
| 75 | 75 |
| 76 virtual bool SendAndStayLocked(IPC::Message* msg); | |
| 77 | |
| 78 // IPC::Listener implementation. | 76 // IPC::Listener implementation. |
| 79 virtual void OnChannelError() override; | 77 virtual void OnChannelError() override; |
| 80 | 78 |
| 81 // 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. |
| 82 IPC::SyncChannel* channel() const { | 80 IPC::SyncChannel* channel() const { |
| 83 return channel_.get(); | 81 return channel_.get(); |
| 84 } | 82 } |
| 85 | 83 |
| 86 #if defined(OS_POSIX) && !defined(OS_NACL) | 84 #if defined(OS_POSIX) && !defined(OS_NACL) |
| 87 base::ScopedFD TakeRendererFD(); | 85 base::ScopedFD TakeRendererFD(); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // remote side has crashed. | 118 // remote side has crashed. |
| 121 scoped_ptr<IPC::SyncChannel> channel_; | 119 scoped_ptr<IPC::SyncChannel> channel_; |
| 122 | 120 |
| 123 DISALLOW_COPY_AND_ASSIGN(ProxyChannel); | 121 DISALLOW_COPY_AND_ASSIGN(ProxyChannel); |
| 124 }; | 122 }; |
| 125 | 123 |
| 126 } // namespace proxy | 124 } // namespace proxy |
| 127 } // namespace ppapi | 125 } // namespace ppapi |
| 128 | 126 |
| 129 #endif // PPAPI_PROXY_PROXY_CHANNEL_H_ | 127 #endif // PPAPI_PROXY_PROXY_CHANNEL_H_ |
| OLD | NEW |