blob: 102de1ae422178728d9d9cafcf60ffc27df90818 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
// 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_PROFILER_SUBSCRIBER_H_
#define CONTENT_PUBLIC_BROWSER_PROFILER_SUBSCRIBER_H_
#include "content/common/content_export.h"
namespace tracked_objects {
struct ProcessDataSnapshot;
}
namespace content {
// Objects interested in receiving profiler data derive from ProfilerSubscriber.
class CONTENT_EXPORT ProfilerSubscriber {
public:
// Send number of pending processes to subscriber. |end| is set to true if it
// is the last time. This is called on the UI thread.
virtual void OnPendingProcesses(int sequence_number,
int pending_processes,
bool end) = 0;
// Send |profiler_data| back to subscriber.
// This is called on the UI thread.
virtual void OnProfilerDataCollected(
int sequence_number,
const tracked_objects::ProcessDataSnapshot& profiler_data,
int process_type) = 0;
protected:
virtual ~ProfilerSubscriber() {}
};
} // namespace content
#endif // CONTENT_PUBLIC_BROWSER_PROFILER_SUBSCRIBER_H_
|