OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #include "ipc/ipc_sync_channel.h" | 5 #include "ipc/ipc_sync_channel.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/threading/thread_local.h" | 10 #include "base/threading/thread_local.h" |
11 #include "base/waitable_event.h" | 11 #include "base/synchronization/waitable_event.h" |
12 #include "base/waitable_event_watcher.h" | 12 #include "base/synchronization/waitable_event_watcher.h" |
13 #include "ipc/ipc_sync_message.h" | 13 #include "ipc/ipc_sync_message.h" |
14 | 14 |
15 using base::TimeDelta; | 15 using base::TimeDelta; |
16 using base::TimeTicks; | 16 using base::TimeTicks; |
17 using base::WaitableEvent; | 17 using base::WaitableEvent; |
18 | 18 |
19 namespace IPC { | 19 namespace IPC { |
20 // When we're blocked in a Send(), we need to process incoming synchronous | 20 // When we're blocked in a Send(), we need to process incoming synchronous |
21 // messages right away because it could be blocking our reply (either | 21 // messages right away because it could be blocking our reply (either |
22 // directly from the same object we're calling, or indirectly through one or | 22 // directly from the same object we're calling, or indirectly through one or |
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 void SyncChannel::OnWaitableEventSignaled(WaitableEvent* event) { | 485 void SyncChannel::OnWaitableEventSignaled(WaitableEvent* event) { |
486 DCHECK(event == sync_context()->GetDispatchEvent()); | 486 DCHECK(event == sync_context()->GetDispatchEvent()); |
487 // The call to DispatchMessages might delete this object, so reregister | 487 // The call to DispatchMessages might delete this object, so reregister |
488 // the object watcher first. | 488 // the object watcher first. |
489 event->Reset(); | 489 event->Reset(); |
490 dispatch_watcher_.StartWatching(event, this); | 490 dispatch_watcher_.StartWatching(event, this); |
491 sync_context()->DispatchMessages(); | 491 sync_context()->DispatchMessages(); |
492 } | 492 } |
493 | 493 |
494 } // namespace IPC | 494 } // namespace IPC |
OLD | NEW |