OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_DEVTOOLS_PROTOCOL_TRACING_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TRACING_HANDLER_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TRACING_HANDLER_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TRACING_HANDLER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 const double* buffer_usage_reporting_interval, | 42 const double* buffer_usage_reporting_interval, |
43 scoped_refptr<DevToolsProtocol::Command> command); | 43 scoped_refptr<DevToolsProtocol::Command> command); |
44 | 44 |
45 scoped_refptr<DevToolsProtocol::Response> End( | 45 scoped_refptr<DevToolsProtocol::Response> End( |
46 scoped_refptr<DevToolsProtocol::Command> command); | 46 scoped_refptr<DevToolsProtocol::Command> command); |
47 scoped_refptr<DevToolsProtocol::Response> GetCategories( | 47 scoped_refptr<DevToolsProtocol::Response> GetCategories( |
48 scoped_refptr<DevToolsProtocol::Command> command); | 48 scoped_refptr<DevToolsProtocol::Command> command); |
49 | 49 |
50 private: | 50 private: |
51 void OnRecordingEnabled(scoped_refptr<DevToolsProtocol::Command> command); | 51 void OnRecordingEnabled(scoped_refptr<DevToolsProtocol::Command> command); |
52 void OnBufferUsage(float usage); | 52 void OnBufferUsage(float percent_full, size_t approximate_event_count); |
53 | 53 |
54 void OnCategoriesReceived(scoped_refptr<DevToolsProtocol::Command> command, | 54 void OnCategoriesReceived(scoped_refptr<DevToolsProtocol::Command> command, |
55 const std::set<std::string>& category_set); | 55 const std::set<std::string>& category_set); |
56 | 56 |
57 base::debug::TraceOptions TraceOptionsFromString(const std::string* options); | 57 base::debug::TraceOptions TraceOptionsFromString(const std::string* options); |
58 | 58 |
59 void SetupTimer(double usage_reporting_interval); | 59 void SetupTimer(double usage_reporting_interval); |
60 | 60 |
61 void DisableRecording(bool abort); | 61 void DisableRecording(bool abort); |
62 | 62 |
63 scoped_ptr<base::Timer> buffer_usage_poll_timer_; | 63 scoped_ptr<base::Timer> buffer_usage_poll_timer_; |
64 Target target_; | 64 Target target_; |
65 bool is_recording_; | 65 bool is_recording_; |
66 | 66 |
67 scoped_ptr<Client> client_; | 67 scoped_ptr<Client> client_; |
68 base::WeakPtrFactory<TracingHandler> weak_factory_; | 68 base::WeakPtrFactory<TracingHandler> weak_factory_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(TracingHandler); | 70 DISALLOW_COPY_AND_ASSIGN(TracingHandler); |
71 }; | 71 }; |
72 | 72 |
73 } // namespace tracing | 73 } // namespace tracing |
74 } // namespace devtools | 74 } // namespace devtools |
75 } // namespace content | 75 } // namespace content |
76 | 76 |
77 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TRACING_HANDLER_H_ | 77 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_TRACING_HANDLER_H_ |
OLD | NEW |