OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 SERVICES_TRACING_PUBLIC_CPP_PROVIDER_H_ | 5 #ifndef SERVICES_TRACING_PUBLIC_CPP_PROVIDER_H_ |
6 #define SERVICES_TRACING_PUBLIC_CPP_PROVIDER_H_ | 6 #define SERVICES_TRACING_PUBLIC_CPP_PROVIDER_H_ |
7 | 7 |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "mojo/public/cpp/bindings/binding.h" | 12 #include "mojo/public/cpp/bindings/binding.h" |
13 #include "mojo/public/cpp/bindings/interface_request.h" | 13 #include "mojo/public/cpp/bindings/interface_request.h" |
14 #include "services/tracing/public/interfaces/tracing.mojom.h" | 14 #include "services/tracing/public/interfaces/tracing.mojom.h" |
15 | 15 |
16 namespace shell { | 16 namespace service_manager { |
17 class Connector; | 17 class Connector; |
18 } | 18 } |
19 | 19 |
20 namespace tracing { | 20 namespace tracing { |
21 | 21 |
22 class Provider : public mojom::Provider { | 22 class Provider : public mojom::Provider { |
23 public: | 23 public: |
24 Provider(); | 24 Provider(); |
25 ~Provider() override; | 25 ~Provider() override; |
26 | 26 |
27 void Initialize(shell::Connector* connector, const std::string& url); | 27 void Initialize(service_manager::Connector* connector, |
| 28 const std::string& url); |
28 | 29 |
29 void Bind(mojom::ProviderRequest request); | 30 void Bind(mojom::ProviderRequest request); |
30 | 31 |
31 private: | 32 private: |
32 // mojom::Provider implementation: | 33 // mojom::Provider implementation: |
33 void StartTracing(const std::string& categories, | 34 void StartTracing(const std::string& categories, |
34 mojom::RecorderPtr recorder) override; | 35 mojom::RecorderPtr recorder) override; |
35 void StopTracing() override; | 36 void StopTracing() override; |
36 | 37 |
37 void SendChunk(const scoped_refptr<base::RefCountedString>& events_str, | 38 void SendChunk(const scoped_refptr<base::RefCountedString>& events_str, |
(...skipping 11 matching lines...) Expand all Loading... |
49 bool tracing_forced_; | 50 bool tracing_forced_; |
50 mojom::RecorderPtr recorder_; | 51 mojom::RecorderPtr recorder_; |
51 | 52 |
52 base::WeakPtrFactory<Provider> weak_factory_; | 53 base::WeakPtrFactory<Provider> weak_factory_; |
53 DISALLOW_COPY_AND_ASSIGN(Provider); | 54 DISALLOW_COPY_AND_ASSIGN(Provider); |
54 }; | 55 }; |
55 | 56 |
56 } // namespace tracing | 57 } // namespace tracing |
57 | 58 |
58 #endif // SERVICES_TRACING_PUBLIC_CPP_PROVIDER_H_ | 59 #endif // SERVICES_TRACING_PUBLIC_CPP_PROVIDER_H_ |
OLD | NEW |