| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 void RegisterTracingUI(TracingUI* tracing_ui); | 55 void RegisterTracingUI(TracingUI* tracing_ui); |
| 56 void UnregisterTracingUI(TracingUI* tracing_ui); | 56 void UnregisterTracingUI(TracingUI* tracing_ui); |
| 57 | 57 |
| 58 // base::trace_event::MemoryDumpManagerDelegate implementation. | 58 // base::trace_event::MemoryDumpManagerDelegate implementation. |
| 59 void RequestGlobalMemoryDump( | 59 void RequestGlobalMemoryDump( |
| 60 const base::trace_event::MemoryDumpRequestArgs& args, | 60 const base::trace_event::MemoryDumpRequestArgs& args, |
| 61 const base::trace_event::MemoryDumpCallback& callback) override; | 61 const base::trace_event::MemoryDumpCallback& callback) override; |
| 62 bool IsCoordinatorProcess() const override; | 62 bool IsCoordinatorProcess() const override; |
| 63 | 63 |
| 64 private: | 64 typedef base::Callback<void(TraceMessageFilter*)> |
| 65 TraceMessageFilterAddedCallback; |
| 65 typedef std::set<scoped_refptr<TraceMessageFilter> > TraceMessageFilterSet; | 66 typedef std::set<scoped_refptr<TraceMessageFilter> > TraceMessageFilterSet; |
| 66 | 67 |
| 68 TraceMessageFilterAddedCallback trace_filter_added_callback_; |
| 69 void SetTraceMessageFilterAddedCallback( |
| 70 const TraceMessageFilterAddedCallback& callback); |
| 71 void GetTraceMessageFilters(TraceMessageFilterSet*); |
| 72 |
| 73 private: |
| 67 friend struct base::DefaultLazyInstanceTraits<TracingControllerImpl>; | 74 friend struct base::DefaultLazyInstanceTraits<TracingControllerImpl>; |
| 68 friend class TraceMessageFilter; | 75 friend class TraceMessageFilter; |
| 69 | 76 |
| 70 TracingControllerImpl(); | 77 TracingControllerImpl(); |
| 71 ~TracingControllerImpl() override; | 78 ~TracingControllerImpl() override; |
| 72 | 79 |
| 73 bool can_enable_recording() const { | 80 bool can_enable_recording() const { |
| 74 return !is_recording_; | 81 return !is_recording_; |
| 75 } | 82 } |
| 76 | 83 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 bool is_recording_; | 189 bool is_recording_; |
| 183 bool is_monitoring_; | 190 bool is_monitoring_; |
| 184 | 191 |
| 185 GetCategoriesDoneCallback pending_get_categories_done_callback_; | 192 GetCategoriesDoneCallback pending_get_categories_done_callback_; |
| 186 GetTraceBufferUsageCallback pending_trace_buffer_usage_callback_; | 193 GetTraceBufferUsageCallback pending_trace_buffer_usage_callback_; |
| 187 | 194 |
| 188 std::string watch_category_name_; | 195 std::string watch_category_name_; |
| 189 std::string watch_event_name_; | 196 std::string watch_event_name_; |
| 190 WatchEventCallback watch_event_callback_; | 197 WatchEventCallback watch_event_callback_; |
| 191 | 198 |
| 199 TraceMessageFilterAddedCallback trace_message_filter_added_callback_; |
| 200 |
| 192 std::set<std::string> known_category_groups_; | 201 std::set<std::string> known_category_groups_; |
| 193 std::set<TracingUI*> tracing_uis_; | 202 std::set<TracingUI*> tracing_uis_; |
| 194 scoped_refptr<TraceDataSink> trace_data_sink_; | 203 scoped_refptr<TraceDataSink> trace_data_sink_; |
| 195 scoped_refptr<TraceDataSink> monitoring_data_sink_; | 204 scoped_refptr<TraceDataSink> monitoring_data_sink_; |
| 196 | 205 |
| 197 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl); | 206 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl); |
| 198 }; | 207 }; |
| 199 | 208 |
| 200 } // namespace content | 209 } // namespace content |
| 201 | 210 |
| 202 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ | 211 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ |
| OLD | NEW |