1 // Copyright 2020 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #ifndef REMOTING_HOST_WIN_ETW_TRACE_CONSUMER_H_
6 #define REMOTING_HOST_WIN_ETW_TRACE_CONSUMER_H_
7 
8 #include <memory>
9 #include <vector>
10 
11 #include "base/memory/ref_counted.h"
12 
13 namespace remoting {
14 
15 class AutoThreadTaskRunner;
16 class HostEventLogger;
17 
18 class EtwTraceConsumer {
19  public:
20   virtual ~EtwTraceConsumer() = default;
21 
22   // Creates an ETW Trace Consumer which listens for Host ETW events.
23   // Listening starts as soon as an instance is created and stops when the
24   // instance is destroyed.  Only one instance can be active at a time.
25   static std::unique_ptr<EtwTraceConsumer> Create(
26       scoped_refptr<AutoThreadTaskRunner> task_runner,
27       std::vector<std::unique_ptr<HostEventLogger>> loggers);
28 };
29 
30 }  // namespace remoting
31 
32 #endif  // REMOTING_HOST_WIN_ETW_TRACE_CONSUMER_H_
33