OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Declaration of a Windows event trace consumer base class. | 5 // Declaration of a Windows event trace consumer base class. |
6 #ifndef BASE_WIN_EVENT_TRACE_CONSUMER_H_ | 6 #ifndef BASE_WIN_EVENT_TRACE_CONSUMER_H_ |
7 #define BASE_WIN_EVENT_TRACE_CONSUMER_H_ | 7 #define BASE_WIN_EVENT_TRACE_CONSUMER_H_ |
8 | 8 |
9 #include <windows.h> | 9 #include <windows.h> |
10 #include <wmistr.h> | 10 #include <wmistr.h> |
11 #include <evntrace.h> | 11 #include <evntrace.h> |
| 12 #include <stddef.h> |
12 #include <vector> | 13 #include <vector> |
13 #include "base/basictypes.h" | 14 |
| 15 #include "base/macros.h" |
14 | 16 |
15 namespace base { | 17 namespace base { |
16 namespace win { | 18 namespace win { |
17 | 19 |
18 // This class is a base class that makes it easier to consume events | 20 // This class is a base class that makes it easier to consume events |
19 // from realtime or file sessions. Concrete consumers need to subclass | 21 // from realtime or file sessions. Concrete consumers need to subclass |
20 // a specialization of this class and override the ProcessEvent and/or | 22 // a specialization of this class and override the ProcessEvent and/or |
21 // the ProcessBuffer methods to implement the event consumption logic. | 23 // the ProcessBuffer methods to implement the event consumption logic. |
22 // Usage might look like: | 24 // Usage might look like: |
23 // class MyConsumer: public EtwTraceConsumerBase<MyConsumer, 1> { | 25 // class MyConsumer: public EtwTraceConsumerBase<MyConsumer, 1> { |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 } | 141 } |
140 trace_handles_.clear(); | 142 trace_handles_.clear(); |
141 | 143 |
142 return hr; | 144 return hr; |
143 } | 145 } |
144 | 146 |
145 } // namespace win | 147 } // namespace win |
146 } // namespace base | 148 } // namespace base |
147 | 149 |
148 #endif // BASE_WIN_EVENT_TRACE_CONSUMER_H_ | 150 #endif // BASE_WIN_EVENT_TRACE_CONSUMER_H_ |
OLD | NEW |