OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 IPC_IPC_CHANNEL_PROXY_H_ | 5 #ifndef IPC_IPC_CHANNEL_PROXY_H_ |
6 #define IPC_IPC_CHANNEL_PROXY_H_ | 6 #define IPC_IPC_CHANNEL_PROXY_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 // call this method multiple times. Redundant calls are ignored. | 140 // call this method multiple times. Redundant calls are ignored. |
141 // | 141 // |
142 // WARNING: The MessageFilter object held by the ChannelProxy is also | 142 // WARNING: The MessageFilter object held by the ChannelProxy is also |
143 // released asynchronously, and it may in fact have its final reference | 143 // released asynchronously, and it may in fact have its final reference |
144 // released on the background thread. The caller should be careful to deal | 144 // released on the background thread. The caller should be careful to deal |
145 // with / allow for this possibility. | 145 // with / allow for this possibility. |
146 void Close(); | 146 void Close(); |
147 | 147 |
148 // Send a message asynchronously. The message is routed to the background | 148 // Send a message asynchronously. The message is routed to the background |
149 // thread where it is passed to the IPC::Channel's Send method. | 149 // thread where it is passed to the IPC::Channel's Send method. |
150 virtual bool Send(Message* message); | 150 virtual bool Send(Message* message) OVERRIDE; |
151 | 151 |
152 // Used to intercept messages as they are received on the background thread. | 152 // Used to intercept messages as they are received on the background thread. |
153 // | 153 // |
154 // Ordinarily, messages sent to the ChannelProxy are routed to the matching | 154 // Ordinarily, messages sent to the ChannelProxy are routed to the matching |
155 // listener on the worker thread. This API allows code to intercept messages | 155 // listener on the worker thread. This API allows code to intercept messages |
156 // before they are sent to the worker thread. | 156 // before they are sent to the worker thread. |
157 // If you call this before the target process is launched, then you're | 157 // If you call this before the target process is launched, then you're |
158 // guaranteed to not miss any messages. But if you call this anytime after, | 158 // guaranteed to not miss any messages. But if you call this anytime after, |
159 // then some messages might be missed since the filter is added internally on | 159 // then some messages might be missed since the filter is added internally on |
160 // the IO thread. | 160 // the IO thread. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 | 272 |
273 OutgoingMessageFilter* outgoing_message_filter_; | 273 OutgoingMessageFilter* outgoing_message_filter_; |
274 | 274 |
275 // Whether the channel has been initialized. | 275 // Whether the channel has been initialized. |
276 bool did_init_; | 276 bool did_init_; |
277 }; | 277 }; |
278 | 278 |
279 } // namespace IPC | 279 } // namespace IPC |
280 | 280 |
281 #endif // IPC_IPC_CHANNEL_PROXY_H_ | 281 #endif // IPC_IPC_CHANNEL_PROXY_H_ |
OLD | NEW |