| OLD | NEW |
| 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_BROWSER_PROFILER_CONTROLLER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_PROFILER_CONTROLLER_IMPL_H_ |
| 6 #define CONTENT_BROWSER_PROFILER_CONTROLLER_IMPL_H_ | 6 #define CONTENT_BROWSER_PROFILER_CONTROLLER_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "base/process/process.h" | 9 #include "base/process/process.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // Send the |profiler_data| back to the |subscriber_|. | 37 // Send the |profiler_data| back to the |subscriber_|. |
| 38 // This can be called from any thread. | 38 // This can be called from any thread. |
| 39 void OnProfilerDataCollected( | 39 void OnProfilerDataCollected( |
| 40 int sequence_number, | 40 int sequence_number, |
| 41 const tracked_objects::ProcessDataSnapshot& profiler_data, | 41 const tracked_objects::ProcessDataSnapshot& profiler_data, |
| 42 int process_type); | 42 int process_type); |
| 43 | 43 |
| 44 // ProfilerController implementation: | 44 // ProfilerController implementation: |
| 45 void Register(ProfilerSubscriber* subscriber) override; | 45 void Register(ProfilerSubscriber* subscriber) override; |
| 46 void Unregister(const ProfilerSubscriber* subscriber) override; | 46 void Unregister(const ProfilerSubscriber* subscriber) override; |
| 47 void GetProfilerData(int sequence_number) override; | 47 void GetProfilerData(int sequence_number, int profiling_phase) override; |
| 48 void OnProfilingPhaseCompletion(int profiling_phase) override; |
| 48 | 49 |
| 49 private: | 50 private: |
| 50 friend struct DefaultSingletonTraits<ProfilerControllerImpl>; | 51 friend struct DefaultSingletonTraits<ProfilerControllerImpl>; |
| 51 | 52 |
| 52 // Contact child processes and get their profiler data. | 53 // Contact child processes and get their profiler data. |
| 53 void GetProfilerDataFromChildProcesses(int sequence_number); | 54 void GetProfilerDataFromChildProcesses(int sequence_number, |
| 55 int profiling_phase); |
| 56 |
| 57 // Contact child processes and notify them of a profiling phase completion. |
| 58 void NotifyChildProcessesOfProfilingPhaseCompletion(int profiling_phase); |
| 54 | 59 |
| 55 ProfilerSubscriber* subscriber_; | 60 ProfilerSubscriber* subscriber_; |
| 56 | 61 |
| 57 DISALLOW_COPY_AND_ASSIGN(ProfilerControllerImpl); | 62 DISALLOW_COPY_AND_ASSIGN(ProfilerControllerImpl); |
| 58 }; | 63 }; |
| 59 | 64 |
| 60 } // namespace content | 65 } // namespace content |
| 61 | 66 |
| 62 #endif // CONTENT_BROWSER_PROFILER_CONTROLLER_IMPL_H_ | 67 #endif // CONTENT_BROWSER_PROFILER_CONTROLLER_IMPL_H_ |
| OLD | NEW |