| 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_SYNC_CHANNEL_H_ | 5 #ifndef IPC_IPC_SYNC_CHANNEL_H_ |
| 6 #define IPC_IPC_SYNC_CHANNEL_H_ | 6 #define IPC_IPC_SYNC_CHANNEL_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // message loop pointer to proxy it to the ipc thread. | 63 // message loop pointer to proxy it to the ipc thread. |
| 64 class IPC_EXPORT SyncChannel : public ChannelProxy { | 64 class IPC_EXPORT SyncChannel : public ChannelProxy { |
| 65 public: | 65 public: |
| 66 enum RestrictDispatchGroup { | 66 enum RestrictDispatchGroup { |
| 67 kRestrictDispatchGroup_None = 0, | 67 kRestrictDispatchGroup_None = 0, |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 // Creates and initializes a sync channel. If create_pipe_now is specified, | 70 // Creates and initializes a sync channel. If create_pipe_now is specified, |
| 71 // the channel will be initialized synchronously. | 71 // the channel will be initialized synchronously. |
| 72 // The naming pattern follows IPC::Channel. | 72 // The naming pattern follows IPC::Channel. |
| 73 // TODO(erikchen): Remove default parameter for |broker|. It exists only to | |
| 74 // make the upcoming refactor decomposable into smaller CLs. | |
| 75 // http://crbug.com/493414. | |
| 76 static scoped_ptr<SyncChannel> Create( | 73 static scoped_ptr<SyncChannel> Create( |
| 77 const IPC::ChannelHandle& channel_handle, | 74 const IPC::ChannelHandle& channel_handle, |
| 78 IPC::Channel::Mode mode, | 75 IPC::Channel::Mode mode, |
| 79 Listener* listener, | 76 Listener* listener, |
| 80 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner, | 77 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner, |
| 81 bool create_pipe_now, | 78 bool create_pipe_now, |
| 82 base::WaitableEvent* shutdown_event, | 79 base::WaitableEvent* shutdown_event); |
| 83 AttachmentBroker* broker = nullptr); | |
| 84 | 80 |
| 85 static scoped_ptr<SyncChannel> Create( | 81 static scoped_ptr<SyncChannel> Create( |
| 86 scoped_ptr<ChannelFactory> factory, | 82 scoped_ptr<ChannelFactory> factory, |
| 87 Listener* listener, | 83 Listener* listener, |
| 88 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner, | 84 const scoped_refptr<base::SingleThreadTaskRunner>& ipc_task_runner, |
| 89 bool create_pipe_now, | 85 bool create_pipe_now, |
| 90 base::WaitableEvent* shutdown_event); | 86 base::WaitableEvent* shutdown_event); |
| 91 | 87 |
| 92 // Creates an uninitialized sync channel. Call ChannelProxy::Init to | 88 // Creates an uninitialized sync channel. Call ChannelProxy::Init to |
| 93 // initialize the channel. This two-step setup allows message filters to be | 89 // initialize the channel. This two-step setup allows message filters to be |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 | 239 |
| 244 // Tracks SyncMessageFilters created before complete channel initialization. | 240 // Tracks SyncMessageFilters created before complete channel initialization. |
| 245 std::vector<scoped_refptr<SyncMessageFilter>> pre_init_sync_message_filters_; | 241 std::vector<scoped_refptr<SyncMessageFilter>> pre_init_sync_message_filters_; |
| 246 | 242 |
| 247 DISALLOW_COPY_AND_ASSIGN(SyncChannel); | 243 DISALLOW_COPY_AND_ASSIGN(SyncChannel); |
| 248 }; | 244 }; |
| 249 | 245 |
| 250 } // namespace IPC | 246 } // namespace IPC |
| 251 | 247 |
| 252 #endif // IPC_IPC_SYNC_CHANNEL_H_ | 248 #endif // IPC_IPC_SYNC_CHANNEL_H_ |
| OLD | NEW |