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

Unified 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: review3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/popular_sites_internals_ui.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/popular_sites_internals_ui.cc
diff --git a/chrome/browser/ui/webui/popular_sites_internals_ui.cc b/chrome/browser/ui/webui/popular_sites_internals_ui.cc
new file mode 100644
index 0000000000000000000000000000000000000000..ec777577b62ffe10057aa9e0b7cf62f68210e4a4
--- /dev/null
+++ b/chrome/browser/ui/webui/popular_sites_internals_ui.cc
@@ -0,0 +1,35 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/ui/webui/popular_sites_internals_ui.h"
+
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/webui/popular_sites_internals_message_handler.h"
+#include "chrome/common/url_constants.h"
+#include "content/public/browser/web_ui.h"
+#include "content/public/browser/web_ui_data_source.h"
+#include "grit/browser_resources.h"
+
+content::WebUIDataSource* CreatePopularSitesInternalsHTMLSource() {
+ content::WebUIDataSource* source = content::WebUIDataSource::Create(
+ chrome::kChromeUIPopularSitesInternalsHost);
+
+ source->AddResourcePath("popular_sites_internals.js",
+ IDR_POPULAR_SITES_INTERNALS_JS);
+ source->AddResourcePath("popular_sites_internals.css",
+ IDR_POPULAR_SITES_INTERNALS_CSS);
+ source->SetDefaultResource(IDR_POPULAR_SITES_INTERNALS_HTML);
+ return source;
+}
+
+PopularSitesInternalsUI::PopularSitesInternalsUI(content::WebUI* web_ui)
+ : WebUIController(web_ui) {
+ Profile* profile = Profile::FromWebUI(web_ui);
+ content::WebUIDataSource::Add(profile,
+ CreatePopularSitesInternalsHTMLSource());
+
+ web_ui->AddMessageHandler(new PopularSitesInternalsMessageHandler);
+}
+
+PopularSitesInternalsUI::~PopularSitesInternalsUI() {}
« no previous file with comments | « chrome/browser/ui/webui/popular_sites_internals_ui.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698