OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ |
6 #define CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ | 6 #define CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 class TraceMessageFilter; | 22 class TraceMessageFilter; |
23 class TracingUI; | 23 class TracingUI; |
24 | 24 |
25 class TracingControllerImpl : public TracingController { | 25 class TracingControllerImpl : public TracingController { |
26 public: | 26 public: |
27 static TracingControllerImpl* GetInstance(); | 27 static TracingControllerImpl* GetInstance(); |
28 | 28 |
29 // TracingController implementation. | 29 // TracingController implementation. |
30 virtual bool GetCategories( | 30 virtual bool GetCategories( |
31 const GetCategoriesDoneCallback& callback) OVERRIDE; | 31 const GetCategoriesDoneCallback& callback) override; |
32 virtual bool EnableRecording( | 32 virtual bool EnableRecording( |
33 const base::debug::CategoryFilter& category_filter, | 33 const base::debug::CategoryFilter& category_filter, |
34 const base::debug::TraceOptions& trace_options, | 34 const base::debug::TraceOptions& trace_options, |
35 const EnableRecordingDoneCallback& callback) OVERRIDE; | 35 const EnableRecordingDoneCallback& callback) override; |
36 virtual bool DisableRecording( | 36 virtual bool DisableRecording( |
37 const scoped_refptr<TraceDataSink>& sink) OVERRIDE; | 37 const scoped_refptr<TraceDataSink>& sink) override; |
38 virtual bool EnableMonitoring( | 38 virtual bool EnableMonitoring( |
39 const base::debug::CategoryFilter& category_filter, | 39 const base::debug::CategoryFilter& category_filter, |
40 const base::debug::TraceOptions& trace_options, | 40 const base::debug::TraceOptions& trace_options, |
41 const EnableMonitoringDoneCallback& callback) OVERRIDE; | 41 const EnableMonitoringDoneCallback& callback) override; |
42 virtual bool DisableMonitoring( | 42 virtual bool DisableMonitoring( |
43 const DisableMonitoringDoneCallback& callback) OVERRIDE; | 43 const DisableMonitoringDoneCallback& callback) override; |
44 virtual void GetMonitoringStatus( | 44 virtual void GetMonitoringStatus( |
45 bool* out_enabled, | 45 bool* out_enabled, |
46 base::debug::CategoryFilter* out_category_filter, | 46 base::debug::CategoryFilter* out_category_filter, |
47 base::debug::TraceOptions* out_trace_options) OVERRIDE; | 47 base::debug::TraceOptions* out_trace_options) override; |
48 virtual bool CaptureMonitoringSnapshot( | 48 virtual bool CaptureMonitoringSnapshot( |
49 const scoped_refptr<TraceDataSink>& sink) OVERRIDE; | 49 const scoped_refptr<TraceDataSink>& sink) override; |
50 virtual bool GetTraceBufferPercentFull( | 50 virtual bool GetTraceBufferPercentFull( |
51 const GetTraceBufferPercentFullCallback& callback) OVERRIDE; | 51 const GetTraceBufferPercentFullCallback& callback) override; |
52 virtual bool SetWatchEvent(const std::string& category_name, | 52 virtual bool SetWatchEvent(const std::string& category_name, |
53 const std::string& event_name, | 53 const std::string& event_name, |
54 const WatchEventCallback& callback) OVERRIDE; | 54 const WatchEventCallback& callback) override; |
55 virtual bool CancelWatchEvent() OVERRIDE; | 55 virtual bool CancelWatchEvent() override; |
56 | 56 |
57 void RegisterTracingUI(TracingUI* tracing_ui); | 57 void RegisterTracingUI(TracingUI* tracing_ui); |
58 void UnregisterTracingUI(TracingUI* tracing_ui); | 58 void UnregisterTracingUI(TracingUI* tracing_ui); |
59 | 59 |
60 private: | 60 private: |
61 typedef std::set<scoped_refptr<TraceMessageFilter> > TraceMessageFilterSet; | 61 typedef std::set<scoped_refptr<TraceMessageFilter> > TraceMessageFilterSet; |
62 | 62 |
63 friend struct base::DefaultLazyInstanceTraits<TracingControllerImpl>; | 63 friend struct base::DefaultLazyInstanceTraits<TracingControllerImpl>; |
64 friend class TraceMessageFilter; | 64 friend class TraceMessageFilter; |
65 | 65 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 std::set<std::string> known_category_groups_; | 174 std::set<std::string> known_category_groups_; |
175 std::set<TracingUI*> tracing_uis_; | 175 std::set<TracingUI*> tracing_uis_; |
176 scoped_refptr<TraceDataSink> trace_data_sink_; | 176 scoped_refptr<TraceDataSink> trace_data_sink_; |
177 scoped_refptr<TraceDataSink> monitoring_data_sink_; | 177 scoped_refptr<TraceDataSink> monitoring_data_sink_; |
178 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl); | 178 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl); |
179 }; | 179 }; |
180 | 180 |
181 } // namespace content | 181 } // namespace content |
182 | 182 |
183 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ | 183 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ |
OLD | NEW |