Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / webui / profiler_ui.h
blob8835d49b70c926d6ab809941fe2bea4c161d6a4f
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_WEBUI_PROFILER_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_PROFILER_UI_H_
8 #include "base/memory/weak_ptr.h"
9 #include "components/metrics/profiler/tracking_synchronizer_observer.h"
10 #include "content/public/browser/web_ui_controller.h"
12 // The C++ back-end for the chrome://profiler webui page.
13 class ProfilerUI : public content::WebUIController,
14 public metrics::TrackingSynchronizerObserver {
15 public:
16 explicit ProfilerUI(content::WebUI* web_ui);
17 ~ProfilerUI() override;
19 // Get the tracking data from TrackingSynchronizer.
20 void GetData();
22 private:
23 // TrackingSynchronizerObserver:
24 void ReceivedProfilerData(
25 const tracked_objects::ProcessDataPhaseSnapshot& process_data_phase,
26 base::ProcessId process_id,
27 content::ProcessType process_type,
28 int profiling_phase,
29 base::TimeDelta phase_start,
30 base::TimeDelta phase_finish,
31 const metrics::ProfilerEvents& past_events) override;
33 // Used to get |weak_ptr_| to self on the UI thread.
34 base::WeakPtrFactory<ProfilerUI> weak_ptr_factory_;
36 DISALLOW_COPY_AND_ASSIGN(ProfilerUI);
39 #endif // CHROME_BROWSER_UI_WEBUI_PROFILER_UI_H_