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

Side by Side Diff: content/public/browser/trace_subscriber.h

Issue 10837082: implement SetWatchEvent and WaitForEvent for trace-based-tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update / merge -- no change Created 8 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/public/browser/trace_controller.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PUBLIC_BROWSER_TRACE_SUBSCRIBER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_TRACE_SUBSCRIBER_H_
6 #define CONTENT_PUBLIC_BROWSER_TRACE_SUBSCRIBER_H_ 6 #define CONTENT_PUBLIC_BROWSER_TRACE_SUBSCRIBER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/memory/ref_counted_memory.h" 10 #include "base/memory/ref_counted_memory.h"
11 11
12 namespace content { 12 namespace content {
13 13
14 // Objects interested in receiving trace data derive from TraceSubscriber. 14 // Objects interested in receiving trace data derive from TraceSubscriber. All
15 // callbacks occur on the UI thread.
15 // See also: trace_message_filter.h 16 // See also: trace_message_filter.h
16 // See also: child_trace_message_filter.h 17 // See also: child_trace_message_filter.h
17 class TraceSubscriber { 18 class TraceSubscriber {
18 public: 19 public:
19 // Called once after TraceController::EndTracingAsync. 20 // Called once after TraceController::EndTracingAsync.
20 virtual void OnEndTracingComplete() = 0; 21 virtual void OnEndTracingComplete() = 0;
21 22
22 // Called 0 or more times between TraceController::BeginTracing and 23 // Called 0 or more times between TraceController::BeginTracing and
23 // OnEndTracingComplete. Use base::debug::TraceResultBuffer to convert one or 24 // OnEndTracingComplete. Use base::debug::TraceResultBuffer to convert one or
24 // more trace fragments to JSON. 25 // more trace fragments to JSON.
25 virtual void OnTraceDataCollected( 26 virtual void OnTraceDataCollected(
26 const scoped_refptr<base::RefCountedString>& trace_fragment) = 0; 27 const scoped_refptr<base::RefCountedString>& trace_fragment) = 0;
27 28
28 // Called once after TraceController::GetKnownCategoriesAsync. 29 // Called once after TraceController::GetKnownCategoriesAsync.
29 virtual void OnKnownCategoriesCollected( 30 virtual void OnKnownCategoriesCollected(
30 const std::set<std::string>& known_categories) {} 31 const std::set<std::string>& known_categories) {}
31 32
32 virtual void OnTraceBufferPercentFullReply(float percent_full) {} 33 virtual void OnTraceBufferPercentFullReply(float percent_full) {}
33 34
35 virtual void OnEventWatchNotification() {}
36
34 protected: 37 protected:
35 virtual ~TraceSubscriber() {} 38 virtual ~TraceSubscriber() {}
36 }; 39 };
37 40
38 } // namespace content 41 } // namespace content
39 42
40 #endif // CONTENT_PUBLIC_BROWSER_TRACE_SUBSCRIBER_H_ 43 #endif // CONTENT_PUBLIC_BROWSER_TRACE_SUBSCRIBER_H_
OLDNEW
« no previous file with comments | « content/public/browser/trace_controller.h ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698