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_MESSAGE_FILTER_H_ | 5 #ifndef IPC_IPC_SYNC_MESSAGE_FILTER_H_ |
6 #define IPC_IPC_SYNC_MESSAGE_FILTER_H_ | 6 #define IPC_IPC_SYNC_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_vector.h" |
12 #include "base/synchronization/lock.h" | 13 #include "base/synchronization/lock.h" |
13 #include "ipc/ipc_sender.h" | 14 #include "ipc/ipc_sender.h" |
14 #include "ipc/ipc_sync_message.h" | 15 #include "ipc/ipc_sync_message.h" |
15 #include "ipc/message_filter.h" | 16 #include "ipc/message_filter.h" |
16 | 17 |
17 namespace base { | 18 namespace base { |
18 class SingleThreadTaskRunner; | 19 class SingleThreadTaskRunner; |
19 class WaitableEvent; | 20 class WaitableEvent; |
20 } | 21 } |
21 | 22 |
(...skipping 30 matching lines...) Expand all Loading... |
52 | 53 |
53 // The process's main thread. | 54 // The process's main thread. |
54 scoped_refptr<base::SingleThreadTaskRunner> listener_task_runner_; | 55 scoped_refptr<base::SingleThreadTaskRunner> listener_task_runner_; |
55 | 56 |
56 // The message loop where the Channel lives. | 57 // The message loop where the Channel lives. |
57 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; | 58 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; |
58 | 59 |
59 typedef std::set<PendingSyncMsg*> PendingSyncMessages; | 60 typedef std::set<PendingSyncMsg*> PendingSyncMessages; |
60 PendingSyncMessages pending_sync_messages_; | 61 PendingSyncMessages pending_sync_messages_; |
61 | 62 |
| 63 // Messages waiting to be delivered after IO initialization. |
| 64 ScopedVector<Message> pending_messages_; |
| 65 |
62 // Locks data members above. | 66 // Locks data members above. |
63 base::Lock lock_; | 67 base::Lock lock_; |
64 | 68 |
65 base::WaitableEvent* shutdown_event_; | 69 base::WaitableEvent* shutdown_event_; |
66 | 70 |
67 DISALLOW_COPY_AND_ASSIGN(SyncMessageFilter); | 71 DISALLOW_COPY_AND_ASSIGN(SyncMessageFilter); |
68 }; | 72 }; |
69 | 73 |
70 } // namespace IPC | 74 } // namespace IPC |
71 | 75 |
72 #endif // IPC_IPC_SYNC_MESSAGE_FILTER_H_ | 76 #endif // IPC_IPC_SYNC_MESSAGE_FILTER_H_ |
OLD | NEW |