Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Side by Side Diff: chrome/browser/ui/webui/profiler_ui.h

Issue 1021053003: Delivering the FIRST_NONEMPTY_PAINT phase changing event to base/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@phase_splitting
Patch Set: asvitkine@: more of. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 CHROME_BROWSER_UI_WEBUI_PROFILER_UI_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_PROFILER_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_PROFILER_UI_H_ 6 #define CHROME_BROWSER_UI_WEBUI_PROFILER_UI_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "components/metrics/profiler/tracking_synchronizer_observer.h" 9 #include "components/metrics/profiler/tracking_synchronizer_observer.h"
10 #include "content/public/browser/web_ui_controller.h" 10 #include "content/public/browser/web_ui_controller.h"
11 11
12 // The C++ back-end for the chrome://profiler webui page. 12 // The C++ back-end for the chrome://profiler webui page.
13 class ProfilerUI : public content::WebUIController, 13 class ProfilerUI : public content::WebUIController,
14 public metrics::TrackingSynchronizerObserver { 14 public metrics::TrackingSynchronizerObserver {
15 public: 15 public:
16 explicit ProfilerUI(content::WebUI* web_ui); 16 explicit ProfilerUI(content::WebUI* web_ui);
17 ~ProfilerUI() override; 17 ~ProfilerUI() override;
18 18
19 // Get the tracking data from TrackingSynchronizer. 19 // Get the tracking data from TrackingSynchronizer.
20 void GetData(); 20 void GetData();
21 21
22 private: 22 private:
23 // TrackingSynchronizerObserver: 23 // TrackingSynchronizerObserver:
24 void ReceivedProfilerData( 24 void ReceivedProfilerData(
25 const tracked_objects::ProcessDataPhaseSnapshot& process_data_phase, 25 const tracked_objects::ProcessDataPhaseSnapshot& process_data_phase,
26 base::ProcessId process_id, 26 base::ProcessId process_id,
27 content::ProcessType process_type, 27 content::ProcessType process_type,
28 int profiling_phase, 28 int profiling_phase,
29 base::TimeDelta phase_start, 29 base::TimeTicks phase_start,
30 base::TimeDelta phase_finish, 30 base::TimeTicks phase_finish,
31 const metrics::ProfilerEvents& past_events) override; 31 const metrics::ProfilerEvents& past_events) override;
32 32
33 // Used to get |weak_ptr_| to self on the UI thread. 33 // Used to get |weak_ptr_| to self on the UI thread.
34 base::WeakPtrFactory<ProfilerUI> weak_ptr_factory_; 34 base::WeakPtrFactory<ProfilerUI> weak_ptr_factory_;
35 35
36 DISALLOW_COPY_AND_ASSIGN(ProfilerUI); 36 DISALLOW_COPY_AND_ASSIGN(ProfilerUI);
37 }; 37 };
38 38
39 #endif // CHROME_BROWSER_UI_WEBUI_PROFILER_UI_H_ 39 #endif // CHROME_BROWSER_UI_WEBUI_PROFILER_UI_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698