OLD | NEW |
---|---|
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_FRAME_SYNC_MSG_REPLY_DISPATCHER_H_ | 5 #ifndef CHROME_FRAME_SYNC_MSG_REPLY_DISPATCHER_H_ |
6 #define CHROME_FRAME_SYNC_MSG_REPLY_DISPATCHER_H_ | 6 #define CHROME_FRAME_SYNC_MSG_REPLY_DISPATCHER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/callback.h" | 10 #include "base/callback_forward.h" |
awong
2011/11/28 18:42:21
unneeded?
erikwright (departed)
2011/11/28 19:12:19
Done.
| |
11 #include "base/synchronization/lock.h" | 11 #include "base/synchronization/lock.h" |
12 #include "ipc/ipc_channel_proxy.h" | 12 #include "ipc/ipc_channel_proxy.h" |
13 | 13 |
14 // Base class used to allow synchronous IPC messages to be sent and | 14 // Base class used to allow synchronous IPC messages to be sent and |
15 // received in an asynchronous manner. To use this class add it as a filter to | 15 // received in an asynchronous manner. To use this class add it as a filter to |
16 // your IPC channel using ChannelProxy::AddFilter(). From then on, before | 16 // your IPC channel using ChannelProxy::AddFilter(). From then on, before |
17 // sending a synchronous message, call SyncMessageReplyDispatcher::Push() with | 17 // sending a synchronous message, call SyncMessageReplyDispatcher::Push() with |
18 // a callback and a key. This class will then handle the message response and | 18 // a callback and a key. This class will then handle the message response and |
19 // will call the callback when it is received. | 19 // will call the callback when it is received. |
20 // | 20 // |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
110 } else { | 110 } else { |
111 // TODO(stoyan): How to handle errors? | 111 // TODO(stoyan): How to handle errors? |
112 } | 112 } |
113 } | 113 } |
114 | 114 |
115 PendingSyncMessageQueue message_queue_; | 115 PendingSyncMessageQueue message_queue_; |
116 base::Lock message_queue_lock_; | 116 base::Lock message_queue_lock_; |
117 }; | 117 }; |
118 | 118 |
119 #endif // CHROME_FRAME_SYNC_MSG_REPLY_DISPATCHER_H_ | 119 #endif // CHROME_FRAME_SYNC_MSG_REPLY_DISPATCHER_H_ |
OLD | NEW |