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" |
(...skipping 30 matching lines...) Expand all Loading... |
41 | 41 |
42 protected: | 42 protected: |
43 SyncMessageFilter(base::WaitableEvent* shutdown_event, | 43 SyncMessageFilter(base::WaitableEvent* shutdown_event, |
44 bool is_channel_send_thread_safe); | 44 bool is_channel_send_thread_safe); |
45 | 45 |
46 ~SyncMessageFilter() override; | 46 ~SyncMessageFilter() override; |
47 | 47 |
48 private: | 48 private: |
49 friend class SyncChannel; | 49 friend class SyncChannel; |
50 | 50 |
| 51 void set_is_channel_send_thread_safe(bool is_channel_send_thread_safe) { |
| 52 is_channel_send_thread_safe_ = is_channel_send_thread_safe; |
| 53 } |
| 54 |
51 void SendOnIOThread(Message* message); | 55 void SendOnIOThread(Message* message); |
52 // Signal all the pending sends as done, used in an error condition. | 56 // Signal all the pending sends as done, used in an error condition. |
53 void SignalAllEvents(); | 57 void SignalAllEvents(); |
54 | 58 |
55 // The channel to which this filter was added. | 59 // The channel to which this filter was added. |
56 Sender* sender_; | 60 Sender* sender_; |
57 | 61 |
58 // Indicates if |sender_|'s Send method is thread-safe. | 62 // Indicates if |sender_|'s Send method is thread-safe. |
59 bool is_channel_send_thread_safe_; | 63 bool is_channel_send_thread_safe_; |
60 | 64 |
(...skipping 13 matching lines...) Expand all Loading... |
74 base::Lock lock_; | 78 base::Lock lock_; |
75 | 79 |
76 base::WaitableEvent* shutdown_event_; | 80 base::WaitableEvent* shutdown_event_; |
77 | 81 |
78 DISALLOW_COPY_AND_ASSIGN(SyncMessageFilter); | 82 DISALLOW_COPY_AND_ASSIGN(SyncMessageFilter); |
79 }; | 83 }; |
80 | 84 |
81 } // namespace IPC | 85 } // namespace IPC |
82 | 86 |
83 #endif // IPC_IPC_SYNC_MESSAGE_FILTER_H_ | 87 #endif // IPC_IPC_SYNC_MESSAGE_FILTER_H_ |
OLD | NEW |