| 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 #ifndef BASE_WAITABLE_EVENT_WATCHER_H_ | 5 #ifndef BASE_WAITABLE_EVENT_WATCHER_H_ |
| 6 #define BASE_WAITABLE_EVENT_WATCHER_H_ | 6 #define BASE_WAITABLE_EVENT_WATCHER_H_ |
| 7 | 7 |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 | 9 |
| 10 #if defined(OS_WIN) | 10 #if defined(OS_WIN) |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 // pointer. | 48 // pointer. |
| 49 // | 49 // |
| 50 // BEWARE: With automatically reset WaitableEvents, a signal may be lost if it | 50 // BEWARE: With automatically reset WaitableEvents, a signal may be lost if it |
| 51 // occurs just before a WaitableEventWatcher is deleted. There is currently no | 51 // occurs just before a WaitableEventWatcher is deleted. There is currently no |
| 52 // safe way to stop watching an automatic reset WaitableEvent without possibly | 52 // safe way to stop watching an automatic reset WaitableEvent without possibly |
| 53 // missing a signal. | 53 // missing a signal. |
| 54 // ----------------------------------------------------------------------------- | 54 // ----------------------------------------------------------------------------- |
| 55 | 55 |
| 56 class WaitableEventWatcher | 56 class WaitableEventWatcher |
| 57 #if defined(OS_POSIX) | 57 #if defined(OS_POSIX) |
| 58 : public MessageLoop::DestructionObserver | 58 » : public MessageLoop::DestructionObserver |
| 59 #endif | 59 #endif |
| 60 { | 60 { |
| 61 public: | 61 public: |
| 62 | 62 |
| 63 WaitableEventWatcher(); | 63 WaitableEventWatcher(); |
| 64 ~WaitableEventWatcher(); | 64 ~WaitableEventWatcher(); |
| 65 | 65 |
| 66 class Delegate { | 66 class Delegate { |
| 67 public: | 67 public: |
| 68 virtual ~Delegate() { } | 68 virtual ~Delegate() { } |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 MessageLoop* message_loop_; | 139 MessageLoop* message_loop_; |
| 140 scoped_refptr<Flag> cancel_flag_; | 140 scoped_refptr<Flag> cancel_flag_; |
| 141 AsyncWaiter* waiter_; | 141 AsyncWaiter* waiter_; |
| 142 AsyncCallbackTask* callback_task_; | 142 AsyncCallbackTask* callback_task_; |
| 143 #endif | 143 #endif |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 } // namespace base | 146 } // namespace base |
| 147 | 147 |
| 148 #endif // BASE_WAITABLE_EVENT_WATCHER_H_ | 148 #endif // BASE_WAITABLE_EVENT_WATCHER_H_ |
| OLD | NEW |