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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 }; | 282 }; |
283 | 283 |
284 Context* context() { return context_.get(); } | 284 Context* context() { return context_.get(); } |
285 | 285 |
286 #if defined(ENABLE_IPC_FUZZER) | 286 #if defined(ENABLE_IPC_FUZZER) |
287 OutgoingMessageFilter* outgoing_message_filter() const { | 287 OutgoingMessageFilter* outgoing_message_filter() const { |
288 return outgoing_message_filter_; | 288 return outgoing_message_filter_; |
289 } | 289 } |
290 #endif | 290 #endif |
291 | 291 |
| 292 protected: |
| 293 bool did_init() const { return did_init_; } |
| 294 |
292 private: | 295 private: |
293 friend class IpcSecurityTestUtil; | 296 friend class IpcSecurityTestUtil; |
294 | 297 |
| 298 // Always called once immediately after Init. |
| 299 virtual void OnChannelInit(); |
| 300 |
295 // By maintaining this indirection (ref-counted) to our internal state, we | 301 // By maintaining this indirection (ref-counted) to our internal state, we |
296 // can safely be destroyed while the background thread continues to do stuff | 302 // can safely be destroyed while the background thread continues to do stuff |
297 // that involves this data. | 303 // that involves this data. |
298 scoped_refptr<Context> context_; | 304 scoped_refptr<Context> context_; |
299 | 305 |
300 // Whether the channel has been initialized. | 306 // Whether the channel has been initialized. |
301 bool did_init_; | 307 bool did_init_; |
302 | 308 |
303 #if defined(ENABLE_IPC_FUZZER) | 309 #if defined(ENABLE_IPC_FUZZER) |
304 OutgoingMessageFilter* outgoing_message_filter_; | 310 OutgoingMessageFilter* outgoing_message_filter_; |
305 #endif | 311 #endif |
306 }; | 312 }; |
307 | 313 |
308 } // namespace IPC | 314 } // namespace IPC |
309 | 315 |
310 #endif // IPC_IPC_CHANNEL_PROXY_H_ | 316 #endif // IPC_IPC_CHANNEL_PROXY_H_ |
OLD | NEW |