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

Side by Side Diff: chrome/browser/ui/webui/popular_sites_internals_ui.cc

Issue 1340493002: Add initial version of chrome://popular-sites-internals page (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@finch_country_version
Patch Set: Created 5 years, 3 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
(Empty)
1 // Copyright 2015 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/popular_sites_internals_ui.h"
6
7 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/ui/webui/popular_sites_internals_message_handler.h"
9 #include "chrome/common/url_constants.h"
10 #include "content/public/browser/web_ui.h"
11 #include "content/public/browser/web_ui_data_source.h"
12 #include "grit/browser_resources.h"
13
14 content::WebUIDataSource* CreatePopularSitesInternalsHTMLSource() {
15 content::WebUIDataSource* source = content::WebUIDataSource::Create(
16 chrome::kChromeUIPopularSitesInternalsHost);
17
18 source->AddResourcePath("popular_sites_internals.js",
19 IDR_POPULAR_SITES_INTERNALS_JS);
20 source->AddResourcePath("popular_sites_internals.css",
21 IDR_POPULAR_SITES_INTERNALS_CSS);
22 source->SetDefaultResource(IDR_POPULAR_SITES_INTERNALS_HTML);
23 return source;
24 }
25
26 PopularSitesInternalsUI::PopularSitesInternalsUI(content::WebUI* web_ui)
27 : WebUIController(web_ui) {
28 Profile* profile = Profile::FromWebUI(web_ui);
29 content::WebUIDataSource::Add(profile,
30 CreatePopularSitesInternalsHTMLSource());
31
32 web_ui->AddMessageHandler(new PopularSitesInternalsMessageHandler);
Bernhard Bauer 2015/09/11 16:00:06 If PopularSitesInternalsMessageHandler is not used
Marc Treib 2015/09/22 11:13:56 All the other "internals" sites seem to have it in
33 }
34
35 PopularSitesInternalsUI::~PopularSitesInternalsUI() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698