| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 28 matching lines...) Expand all Loading... |
| 39 const DisableMonitoringDoneCallback& callback) OVERRIDE; | 39 const DisableMonitoringDoneCallback& callback) OVERRIDE; |
| 40 virtual void GetMonitoringStatus( | 40 virtual void GetMonitoringStatus( |
| 41 bool* out_enabled, | 41 bool* out_enabled, |
| 42 base::debug::CategoryFilter* out_filter, | 42 base::debug::CategoryFilter* out_filter, |
| 43 TracingController::Options* out_options) OVERRIDE; | 43 TracingController::Options* out_options) OVERRIDE; |
| 44 virtual void CaptureMonitoringSnapshot( | 44 virtual void CaptureMonitoringSnapshot( |
| 45 const base::FilePath& result_file_path, | 45 const base::FilePath& result_file_path, |
| 46 const TracingFileResultCallback& callback) OVERRIDE; | 46 const TracingFileResultCallback& callback) OVERRIDE; |
| 47 virtual bool GetTraceBufferPercentFull( | 47 virtual bool GetTraceBufferPercentFull( |
| 48 const GetTraceBufferPercentFullCallback& callback) OVERRIDE; | 48 const GetTraceBufferPercentFullCallback& callback) OVERRIDE; |
| 49 virtual void ConfigureSyntheticDelay( |
| 50 const std::string& name, |
| 51 base::TimeDelta target_duration, |
| 52 base::debug::TraceEventSyntheticDelay::Mode mode, |
| 53 const ConfigureSyntheticDelayCallback& callback) OVERRIDE; |
| 49 | 54 |
| 50 private: | 55 private: |
| 51 typedef std::set<scoped_refptr<TraceMessageFilter> > FilterMap; | 56 typedef std::set<scoped_refptr<TraceMessageFilter> > FilterMap; |
| 52 class ResultFile; | 57 class ResultFile; |
| 53 | 58 |
| 54 friend struct base::DefaultLazyInstanceTraits<TracingControllerImpl>; | 59 friend struct base::DefaultLazyInstanceTraits<TracingControllerImpl>; |
| 55 friend class TraceMessageFilter; | 60 friend class TraceMessageFilter; |
| 56 | 61 |
| 57 TracingControllerImpl(); | 62 TracingControllerImpl(); |
| 58 virtual ~TracingControllerImpl(); | 63 virtual ~TracingControllerImpl(); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 void OnDisableRecordingAcked( | 103 void OnDisableRecordingAcked( |
| 99 const std::vector<std::string>& known_category_groups); | 104 const std::vector<std::string>& known_category_groups); |
| 100 void OnResultFileClosed(); | 105 void OnResultFileClosed(); |
| 101 | 106 |
| 102 void OnCaptureMonitoringSnapshotAcked(); | 107 void OnCaptureMonitoringSnapshotAcked(); |
| 103 void OnMonitoringSnapshotFileClosed(); | 108 void OnMonitoringSnapshotFileClosed(); |
| 104 | 109 |
| 105 void OnTraceNotification(int notification); | 110 void OnTraceNotification(int notification); |
| 106 void OnTraceBufferPercentFullReply(float percent_full); | 111 void OnTraceBufferPercentFullReply(float percent_full); |
| 107 | 112 |
| 113 void OnConfigureSyntheticDelayAcked(); |
| 114 |
| 108 FilterMap filters_; | 115 FilterMap filters_; |
| 109 // Pending acks for DisableRecording. | 116 // Pending acks for DisableRecording. |
| 110 int pending_disable_recording_ack_count_; | 117 int pending_disable_recording_ack_count_; |
| 111 // Pending acks for CaptureMonitoringSnapshot. | 118 // Pending acks for CaptureMonitoringSnapshot. |
| 112 int pending_capture_monitoring_snapshot_ack_count_; | 119 int pending_capture_monitoring_snapshot_ack_count_; |
| 113 // Pending acks for GetTraceBufferPercentFull. | 120 // Pending acks for GetTraceBufferPercentFull. |
| 114 int pending_trace_buffer_percent_full_ack_count_; | 121 int pending_trace_buffer_percent_full_ack_count_; |
| 122 // Pending acks for ConfigureSyntheticDelay. |
| 123 int pending_configure_synthetic_delay_ack_count_; |
| 115 float maximum_trace_buffer_percent_full_; | 124 float maximum_trace_buffer_percent_full_; |
| 116 | 125 |
| 117 bool is_recording_; | 126 bool is_recording_; |
| 118 bool is_monitoring_; | 127 bool is_monitoring_; |
| 119 | 128 |
| 120 GetCategoriesDoneCallback pending_get_categories_done_callback_; | 129 GetCategoriesDoneCallback pending_get_categories_done_callback_; |
| 121 TracingFileResultCallback pending_disable_recording_done_callback_; | 130 TracingFileResultCallback pending_disable_recording_done_callback_; |
| 122 TracingFileResultCallback pending_capture_monitoring_snapshot_done_callback_; | 131 TracingFileResultCallback pending_capture_monitoring_snapshot_done_callback_; |
| 123 GetTraceBufferPercentFullCallback pending_trace_buffer_percent_full_callback_; | 132 GetTraceBufferPercentFullCallback pending_trace_buffer_percent_full_callback_; |
| 133 ConfigureSyntheticDelayCallback pending_configure_synthetic_delay_callback_; |
| 124 | 134 |
| 125 std::set<std::string> known_category_groups_; | 135 std::set<std::string> known_category_groups_; |
| 126 base::debug::CategoryFilter category_filter_; | 136 base::debug::CategoryFilter category_filter_; |
| 127 scoped_ptr<ResultFile> result_file_; | 137 scoped_ptr<ResultFile> result_file_; |
| 128 scoped_ptr<ResultFile> monitoring_snapshot_file_; | 138 scoped_ptr<ResultFile> monitoring_snapshot_file_; |
| 129 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl); | 139 DISALLOW_COPY_AND_ASSIGN(TracingControllerImpl); |
| 130 }; | 140 }; |
| 131 | 141 |
| 132 } // namespace content | 142 } // namespace content |
| 133 | 143 |
| 134 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ | 144 #endif // CONTENT_BROWSER_TRACING_TRACING_CONTROLLER_IMPL_H_ |
| OLD | NEW |