OLD | NEW |
1 // Copyright (c) 2011 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 CHROME_RENDERER_RENDERER_TRACKING_H_ | 5 #ifndef CHROME_RENDERER_RENDERER_TRACKING_H_ |
6 #define CHROME_RENDERER_RENDERER_TRACKING_H_ | 6 #define CHROME_RENDERER_RENDERER_TRACKING_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/process.h" | 14 #include "base/process.h" |
15 #include "base/task.h" | 15 #include "base/task.h" |
16 #include "content/public/renderer/render_process_observer.h" | 16 #include "content/public/renderer/render_process_observer.h" |
17 | 17 |
18 class RendererTracking : public content::RenderProcessObserver { | 18 class RendererTracking : public content::RenderProcessObserver { |
19 public: | 19 public: |
20 RendererTracking(); | 20 RendererTracking(); |
21 virtual ~RendererTracking(); | 21 virtual ~RendererTracking(); |
22 | 22 |
23 private: | 23 private: |
24 // RenderProcessObserver implementation. | 24 // RenderProcessObserver implementation. |
25 virtual bool OnControlMessageReceived(const IPC::Message& message); | 25 virtual bool OnControlMessageReceived(const IPC::Message& message); |
26 | 26 |
27 void OnGetRendererTrackingData(int sequence_number); | 27 void OnGetRendererProfilerData(int sequence_number, |
| 28 const std::string& process_type); |
28 | 29 |
29 void OnSetTrackingStatus(bool enable); | 30 void OnSetProfilerStatus(bool enable); |
30 | 31 |
31 // Extract tracking data from TrackedObjects and then send it off the | 32 // Extract profiler data from TrackedObjects and then send it off the |
32 // Browser process. | 33 // Browser process. |
33 void UploadAllTrackingData(int sequence_number); | 34 void UploadAllProfilerData(int sequence_number, |
| 35 const std::string& process_type); |
34 | 36 |
35 ScopedRunnableMethodFactory<RendererTracking> renderer_tracking_factory_; | 37 ScopedRunnableMethodFactory<RendererTracking> renderer_tracking_factory_; |
36 | 38 |
37 DISALLOW_COPY_AND_ASSIGN(RendererTracking); | 39 DISALLOW_COPY_AND_ASSIGN(RendererTracking); |
38 }; | 40 }; |
39 | 41 |
40 #endif // CHROME_RENDERER_RENDERER_TRACKING_H_ | 42 #endif // CHROME_RENDERER_RENDERER_TRACKING_H_ |
OLD | NEW |