| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_SENDER_H__ | 5 #ifndef IPC_IPC_SYNC_SENDER_H__ |
| 6 #define IPC_IPC_SYNC_SENDER_H__ | 6 #define IPC_IPC_SYNC_SENDER_H__ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 base::WaitableEvent* shutdown_event() { return shutdown_event_; } | 134 base::WaitableEvent* shutdown_event() { return shutdown_event_; } |
| 135 | 135 |
| 136 ReceivedSyncMsgQueue* received_sync_msgs() { | 136 ReceivedSyncMsgQueue* received_sync_msgs() { |
| 137 return received_sync_msgs_; | 137 return received_sync_msgs_; |
| 138 } | 138 } |
| 139 | 139 |
| 140 void set_restrict_dispatch(bool value) { restrict_dispatch_ = value; } | 140 void set_restrict_dispatch(bool value) { restrict_dispatch_ = value; } |
| 141 bool restrict_dispatch() const { return restrict_dispatch_; } | 141 bool restrict_dispatch() const { return restrict_dispatch_; } |
| 142 | 142 |
| 143 private: | 143 private: |
| 144 ~SyncContext(); | 144 virtual ~SyncContext(); |
| 145 // ChannelProxy methods that we override. | 145 // ChannelProxy methods that we override. |
| 146 | 146 |
| 147 // Called on the listener thread. | 147 // Called on the listener thread. |
| 148 virtual void Clear(); | 148 virtual void Clear(); |
| 149 | 149 |
| 150 // Called on the IPC thread. | 150 // Called on the IPC thread. |
| 151 virtual bool OnMessageReceived(const Message& msg); | 151 virtual bool OnMessageReceived(const Message& msg); |
| 152 virtual void OnChannelError(); | 152 virtual void OnChannelError(); |
| 153 virtual void OnChannelOpened(); | 153 virtual void OnChannelOpened(); |
| 154 virtual void OnChannelClosed(); | 154 virtual void OnChannelClosed(); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 // Used to signal events between the IPC and listener threads. | 192 // Used to signal events between the IPC and listener threads. |
| 193 base::WaitableEventWatcher dispatch_watcher_; | 193 base::WaitableEventWatcher dispatch_watcher_; |
| 194 | 194 |
| 195 DISALLOW_COPY_AND_ASSIGN(SyncChannel); | 195 DISALLOW_COPY_AND_ASSIGN(SyncChannel); |
| 196 }; | 196 }; |
| 197 | 197 |
| 198 } // namespace IPC | 198 } // namespace IPC |
| 199 | 199 |
| 200 #endif // IPC_IPC_SYNC_SENDER_H__ | 200 #endif // IPC_IPC_SYNC_SENDER_H__ |
| OLD | NEW |