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

Side by Side Diff: chrome/browser/ui/webui/performance_monitor/web_ui.cc

Issue 10820031: Modifications to performance monitor UI to address real webui. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Revised build config to mollify Android tryserver Created 8 years, 4 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
« no previous file with comments | « chrome/browser/ui/webui/performance_monitor/web_ui.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #include "chrome/browser/ui/webui/performance_monitor/web_ui.h"
6
7 #include "base/values.h"
8 #include "chrome/browser/performance_monitor/performance_monitor.h"
9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
11 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
12 #include "chrome/browser/ui/webui/performance_monitor/web_ui_handler.h"
13 #include "chrome/common/url_constants.h"
14 #include "content/public/browser/web_ui.h"
15 #include "grit/browser_resources.h"
16 #include "grit/generated_resources.h"
17
18 namespace {
19
20 ChromeWebUIDataSource* CreateWebUIHTMLSource() {
21 ChromeWebUIDataSource* source =
22 new ChromeWebUIDataSource(chrome::kChromeUIPerformanceMonitorHost);
23
24 source->add_resource_path("chart.css", IDR_PERFORMANCE_MONITOR_CHART_CSS);
25 source->add_resource_path("chart.js", IDR_PERFORMANCE_MONITOR_CHART_JS);
26 source->add_resource_path("jquery.js", IDR_PERFORMANCE_MONITOR_JQUERY_JS);
27 source->add_resource_path("flot.js", IDR_PERFORMANCE_MONITOR_JQUERY_FLOT_JS);
28 source->set_default_resource(IDR_PERFORMANCE_MONITOR_HTML);
29 return source;
30 }
31
32 } // namespace
33
34 namespace performance_monitor {
35
36 WebUI::WebUI(content::WebUI* web_ui) : WebUIController(web_ui) {
37 web_ui->AddMessageHandler(new performance_monitor::WebUIHandler());
38
39 ChromeWebUIDataSource* html_source = CreateWebUIHTMLSource();
40 Profile* profile = Profile::FromWebUI(web_ui);
41 ChromeURLDataManager::AddDataSource(profile, html_source);
42 }
43
44 } // namespace performance_monitor
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/performance_monitor/web_ui.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698