OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PROFILER_CONTROLLER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_PROFILER_CONTROLLER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_PROFILER_CONTROLLER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_PROFILER_CONTROLLER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 | 12 |
13 #include "base/tracked_objects.h" | |
14 | |
15 namespace base { | 13 namespace base { |
16 class DictionaryValue; | 14 class DictionaryValue; |
17 } | 15 } |
18 | 16 |
19 namespace content { | 17 namespace content { |
20 | 18 |
21 class ProfilerSubscriber; | 19 class ProfilerSubscriber; |
22 | 20 |
23 // ProfilerController is used on the browser process to collect profiler data. | 21 // ProfilerController is used on the browser process to collect profiler data. |
24 // Only the browser UI thread is allowed to interact with the ProfilerController | 22 // Only the browser UI thread is allowed to interact with the ProfilerController |
(...skipping 13 matching lines...) Expand all Loading... |
38 | 36 |
39 // Unregister the subscriber so that it will not be called when for example | 37 // Unregister the subscriber so that it will not be called when for example |
40 // OnProfilerDataCollected is returning profiler data from a child process. | 38 // OnProfilerDataCollected is returning profiler data from a child process. |
41 // Safe to call even if caller is not the current subscriber. | 39 // Safe to call even if caller is not the current subscriber. |
42 virtual void Unregister(ProfilerSubscriber* subscriber) = 0; | 40 virtual void Unregister(ProfilerSubscriber* subscriber) = 0; |
43 | 41 |
44 // Contact all processes and get their profiler data. | 42 // Contact all processes and get their profiler data. |
45 virtual void GetProfilerData(int sequence_number) = 0; | 43 virtual void GetProfilerData(int sequence_number) = 0; |
46 | 44 |
47 // Contact all processes and set profiler status to |enable|. | 45 // Contact all processes and set profiler status to |enable|. |
48 virtual void SetProfilerStatus( | 46 virtual void SetProfilerStatus(bool enable) = 0; |
49 tracked_objects::ThreadData::Status status) = 0; | |
50 | 47 |
51 }; | 48 }; |
52 | 49 |
53 } // namespace content | 50 } // namespace content |
54 | 51 |
55 #endif // CONTENT_PUBLIC_BROWSER_PROFILER_CONTROLLER_H_ | 52 #endif // CONTENT_PUBLIC_BROWSER_PROFILER_CONTROLLER_H_ |
56 | 53 |
OLD | NEW |