| 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 BASE_WIN_OBJECT_WATCHER_H_ | 5 #ifndef BASE_WIN_OBJECT_WATCHER_H_ |
| 6 #define BASE_WIN_OBJECT_WATCHER_H_ | 6 #define BASE_WIN_OBJECT_WATCHER_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include "base/base_export.h" | 10 #include "base/base_export.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 private: | 81 private: |
| 82 // Called on a background thread when done waiting. | 82 // Called on a background thread when done waiting. |
| 83 static void CALLBACK DoneWaiting(void* param, BOOLEAN timed_out); | 83 static void CALLBACK DoneWaiting(void* param, BOOLEAN timed_out); |
| 84 | 84 |
| 85 void Signal(Delegate* delegate); | 85 void Signal(Delegate* delegate); |
| 86 | 86 |
| 87 // MessageLoop::DestructionObserver implementation: | 87 // MessageLoop::DestructionObserver implementation: |
| 88 virtual void WillDestroyCurrentMessageLoop(); | 88 virtual void WillDestroyCurrentMessageLoop(); |
| 89 | 89 |
| 90 // Internal state. | 90 // Internal state. |
| 91 WeakPtrFactory<ObjectWatcher> weak_factory_; | |
| 92 Closure callback_; | 91 Closure callback_; |
| 93 HANDLE object_; // The object being watched | 92 HANDLE object_; // The object being watched |
| 94 HANDLE wait_object_; // Returned by RegisterWaitForSingleObject | 93 HANDLE wait_object_; // Returned by RegisterWaitForSingleObject |
| 95 MessageLoop* origin_loop_; // Used to get back to the origin thread | 94 MessageLoop* origin_loop_; // Used to get back to the origin thread |
| 96 | 95 |
| 96 WeakPtrFactory<ObjectWatcher> weak_factory_; |
| 97 |
| 97 DISALLOW_COPY_AND_ASSIGN(ObjectWatcher); | 98 DISALLOW_COPY_AND_ASSIGN(ObjectWatcher); |
| 98 }; | 99 }; |
| 99 | 100 |
| 100 } // namespace win | 101 } // namespace win |
| 101 } // namespace base | 102 } // namespace base |
| 102 | 103 |
| 103 #endif // BASE_OBJECT_WATCHER_H_ | 104 #endif // BASE_OBJECT_WATCHER_H_ |
| OLD | NEW |