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 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 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 // Returns true if the message was processed, false otherwise. | 219 // Returns true if the message was processed, false otherwise. |
220 bool TryFilters(const Message& message); | 220 bool TryFilters(const Message& message); |
221 | 221 |
222 // Like Open and Close, but called on the IPC thread. | 222 // Like Open and Close, but called on the IPC thread. |
223 virtual void OnChannelOpened(); | 223 virtual void OnChannelOpened(); |
224 virtual void OnChannelClosed(); | 224 virtual void OnChannelClosed(); |
225 | 225 |
226 // Called on the consumers thread when the ChannelProxy is closed. At that | 226 // Called on the consumers thread when the ChannelProxy is closed. At that |
227 // point the consumer is telling us that they don't want to receive any | 227 // point the consumer is telling us that they don't want to receive any |
228 // more messages, so we honor that wish by forgetting them! | 228 // more messages, so we honor that wish by forgetting them! |
229 virtual void Clear() { listener_ = NULL; } | 229 virtual void Clear(); |
230 | 230 |
231 private: | 231 private: |
232 friend class ChannelProxy; | 232 friend class ChannelProxy; |
233 friend class SendCallbackHelper; | 233 friend class SendCallbackHelper; |
234 | 234 |
235 // Create the Channel | 235 // Create the Channel |
236 void CreateChannel(const IPC::ChannelHandle& channel_handle, | 236 void CreateChannel(const IPC::ChannelHandle& channel_handle, |
237 const Channel::Mode& mode); | 237 const Channel::Mode& mode); |
238 | 238 |
239 // Methods called on the IO thread. | 239 // Methods called on the IO thread. |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 | 283 |
284 OutgoingMessageFilter* outgoing_message_filter_; | 284 OutgoingMessageFilter* outgoing_message_filter_; |
285 | 285 |
286 // Whether the channel has been initialized. | 286 // Whether the channel has been initialized. |
287 bool did_init_; | 287 bool did_init_; |
288 }; | 288 }; |
289 | 289 |
290 } // namespace IPC | 290 } // namespace IPC |
291 | 291 |
292 #endif // IPC_IPC_CHANNEL_PROXY_H_ | 292 #endif // IPC_IPC_CHANNEL_PROXY_H_ |
OLD | NEW |