Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1426)

Unified Diff: content/public/browser/trace_subscriber.h

Issue 9694028: Add a Content API around TracingController. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix linux Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/trace_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « content/public/browser/trace_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698