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

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

Issue 9188056: Start splitting out WebUI into an implementation class and an interface that each page implements... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/policy_ui.cc ('k') | chrome/browser/ui/webui/profiler_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_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 #pragma once 7 #pragma once
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "content/browser/webui/web_ui.h" 12 #include "content/browser/webui/web_ui.h"
13 #include "content/public/browser/web_ui_controller.h"
13 14
14 // The C++ back-end for the chrome://profiler webui page. 15 // The C++ back-end for the chrome://profiler webui page.
15 class ProfilerUI : public WebUI { 16 class ProfilerUI : public WebUI, public content::WebUIController {
16 public: 17 public:
17 explicit ProfilerUI(content::WebContents* contents); 18 explicit ProfilerUI(content::WebContents* contents);
18 virtual ~ProfilerUI(); 19 virtual ~ProfilerUI();
19 20
20 // Get the tracking data from TrackingSynchronizer. 21 // Get the tracking data from TrackingSynchronizer.
21 void GetData(); 22 void GetData();
22 23
23 // Send the data to the renderer. 24 // Send the data to the renderer.
24 void ReceivedData(base::Value* value); 25 void ReceivedData(base::Value* value);
25 26
26 private: 27 private:
27 // Used to get |weak_ptr_| to self on the UI thread. 28 // Used to get |weak_ptr_| to self on the UI thread.
28 scoped_ptr<base::WeakPtrFactory<ProfilerUI> > ui_weak_ptr_factory_; 29 scoped_ptr<base::WeakPtrFactory<ProfilerUI> > ui_weak_ptr_factory_;
29 base::WeakPtr<ProfilerUI> ui_weak_ptr_; 30 base::WeakPtr<ProfilerUI> ui_weak_ptr_;
30 31
31 DISALLOW_COPY_AND_ASSIGN(ProfilerUI); 32 DISALLOW_COPY_AND_ASSIGN(ProfilerUI);
32 }; 33 };
33 34
34 #endif // CHROME_BROWSER_UI_WEBUI_PROFILER_UI_H_ 35 #endif // CHROME_BROWSER_UI_WEBUI_PROFILER_UI_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/policy_ui.cc ('k') | chrome/browser/ui/webui/profiler_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698