Index: content/public/browser/trace_subscriber.h |
=================================================================== |
--- content/public/browser/trace_subscriber.h (revision 0) |
+++ content/public/browser/trace_subscriber.h (revision 0) |
@@ -0,0 +1,40 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CONTENT_PUBLIC_BROWSER_TRACE_SUBSCRIBER_H_ |
+#define CONTENT_PUBLIC_BROWSER_TRACE_SUBSCRIBER_H_ |
+ |
+#include <set> |
+ |
+#include "base/memory/ref_counted_memory.h" |
+ |
+namespace content { |
+ |
+// Objects interested in receiving trace data derive from TraceSubscriber. |
+// See also: trace_message_filter.h |
+// See also: child_trace_message_filter.h |
+class TraceSubscriber { |
Jói
2012/03/13 10:13:51
Since this is in the Content API, shouldn't it be
Jói
2012/03/13 13:03:41
Never mind, just realized this is pure virtual.
|
+ public: |
+ // Called once after TraceController::EndTracingAsync. |
+ virtual void OnEndTracingComplete() = 0; |
+ |
+ // Called 0 or more times between TraceController::BeginTracing and |
+ // OnEndTracingComplete. Use base::debug::TraceResultBuffer to convert one or |
+ // more trace fragments to JSON. |
+ virtual void OnTraceDataCollected( |
+ const scoped_refptr<base::RefCountedString>& trace_fragment) = 0; |
+ |
+ // Called once after TraceController::GetKnownCategoriesAsync. |
+ virtual void OnKnownCategoriesCollected( |
+ const std::set<std::string>& known_categories) {} |
+ |
+ virtual void OnTraceBufferPercentFullReply(float percent_full) {} |
+ |
+ protected: |
+ virtual ~TraceSubscriber() {} |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_PUBLIC_BROWSER_TRACE_SUBSCRIBER_H_ |
Property changes on: content\public\browser\trace_subscriber.h |
___________________________________________________________________ |
Added: svn:eol-style |
+ LF |