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" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/macros.h" |
12 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
13 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
14 | 15 |
15 namespace base { | 16 namespace base { |
16 namespace win { | 17 namespace win { |
17 | 18 |
18 // A class that provides a means to asynchronously wait for a Windows object to | 19 // A class that provides a means to asynchronously wait for a Windows object to |
19 // become signaled. It is an abstraction around RegisterWaitForSingleObject | 20 // become signaled. It is an abstraction around RegisterWaitForSingleObject |
20 // that provides a notification callback, OnObjectSignaled, that runs back on | 21 // that provides a notification callback, OnObjectSignaled, that runs back on |
21 // the origin thread (i.e., the thread that called StartWatching). | 22 // the origin thread (i.e., the thread that called StartWatching). |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 bool run_once_; | 106 bool run_once_; |
106 WeakPtrFactory<ObjectWatcher> weak_factory_; | 107 WeakPtrFactory<ObjectWatcher> weak_factory_; |
107 | 108 |
108 DISALLOW_COPY_AND_ASSIGN(ObjectWatcher); | 109 DISALLOW_COPY_AND_ASSIGN(ObjectWatcher); |
109 }; | 110 }; |
110 | 111 |
111 } // namespace win | 112 } // namespace win |
112 } // namespace base | 113 } // namespace base |
113 | 114 |
114 #endif // BASE_WIN_OBJECT_WATCHER_H_ | 115 #endif // BASE_WIN_OBJECT_WATCHER_H_ |
OLD | NEW |