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

Unified Diff: chrome/browser/ui/webui/user_actions/user_actions_ui.cc

Issue 11415063: Adds about:user-actions page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing OVERRIDE. Created 8 years, 1 month 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
Index: chrome/browser/ui/webui/user_actions/user_actions_ui.cc
diff --git a/chrome/browser/ui/webui/user_actions/user_actions_ui.cc b/chrome/browser/ui/webui/user_actions/user_actions_ui.cc
new file mode 100644
index 0000000000000000000000000000000000000000..75f36206651aecbb5f223743e5215440ad2021da
--- /dev/null
+++ b/chrome/browser/ui/webui/user_actions/user_actions_ui.cc
@@ -0,0 +1,32 @@
+// Copyright 2012 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/user_actions/user_actions_ui.h"
+
+#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/webui/chrome_url_data_manager.h"
+#include "chrome/browser/ui/webui/chrome_web_ui_data_source.h"
+#include "chrome/browser/ui/webui/user_actions/user_actions_ui_handler.h"
+#include "chrome/common/url_constants.h"
+#include "content/public/browser/web_ui.h"
+#include "content/public/browser/web_ui_controller.h"
+#include "grit/browser_resources.h"
+
+UserActionsUI::UserActionsUI(content::WebUI* web_ui)
+ : content::WebUIController(web_ui) {
+ // Set up the chrome://user-actions/ source.
+ ChromeWebUIDataSource* html_source =
+ new ChromeWebUIDataSource(chrome::kChromeUIUserActionsHost);
+ html_source->set_default_resource(IDR_USER_ACTIONS_HTML);
+ html_source->add_resource_path("user_actions.css", IDR_USER_ACTIONS_CSS);
+ html_source->add_resource_path("user_actions.js", IDR_USER_ACTIONS_JS);
+
+ Profile* profile = Profile::FromWebUI(web_ui);
+ ChromeURLDataManager::AddDataSource(profile, html_source);
+
+ // AddMessageHandler takes ownership of UserActionsUIHandler.
+ web_ui->AddMessageHandler(new UserActionsUIHandler());
+}
+
+UserActionsUI::~UserActionsUI() {}
« no previous file with comments | « chrome/browser/ui/webui/user_actions/user_actions_ui.h ('k') | chrome/browser/ui/webui/user_actions/user_actions_ui_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698