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

Unified Diff: chrome/browser/ui/webui/cleanup_tool/cleanup_tool_ui.cc

Issue 2784653004: Cleanup Tool WebUI: Add HTML content and styling with dummy JS (Closed)
Patch Set: Move build include to is_win section Created 3 years, 8 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
Index: chrome/browser/ui/webui/cleanup_tool/cleanup_tool_ui.cc
diff --git a/chrome/browser/ui/webui/cleanup_tool/cleanup_tool_ui.cc b/chrome/browser/ui/webui/cleanup_tool/cleanup_tool_ui.cc
index fe57d4cdaf34463483bf92bb2fb9f9bfb84b0803..9220e516694bc8c81ad2abbabea37a1c39996742 100644
--- a/chrome/browser/ui/webui/cleanup_tool/cleanup_tool_ui.cc
+++ b/chrome/browser/ui/webui/cleanup_tool/cleanup_tool_ui.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/webui/cleanup_tool/cleanup_tool_ui.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/webui/cleanup_tool/cleanup_action_handler.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/browser_resources.h"
#include "content/public/browser/web_ui_data_source.h"
@@ -14,8 +15,24 @@ CleanupToolUI::CleanupToolUI(content::WebUI* web_ui)
content::WebUIDataSource* html_source =
content::WebUIDataSource::Create(chrome::kChromeUICleanupToolHost);
+ // TODO(proberge): Localize strings once they are finalized.
+ html_source->AddString("title", "Chrome Cleanup");
+ html_source->AddString("sectionHeader",
+ "Remove suspicious or unwanted programs");
+ html_source->AddString("scanAction", "Scan Now");
+ html_source->AddString("scanning", "Scanning");
+ html_source->AddString("cleanAction", "Run Chrome Cleanup");
+ html_source->AddString("about", "About Chrome Cleanup");
+ html_source->SetJsonPath("strings.js");
+
+ html_source->AddResourcePath("toolbar.html", IDR_CLEANUP_TOOL_TOOLBAR_HTML);
+ html_source->AddResourcePath("toolbar.js", IDR_CLEANUP_TOOL_TOOLBAR_JS);
html_source->SetDefaultResource(IDR_CLEANUP_TOOL_HTML);
Profile* profile = Profile::FromWebUI(web_ui);
content::WebUIDataSource::Add(profile, html_source);
+
+ web_ui->AddMessageHandler(base::MakeUnique<CleanupActionHandler>());
}
+
+CleanupToolUI::~CleanupToolUI() {}
« no previous file with comments | « chrome/browser/ui/webui/cleanup_tool/cleanup_tool_ui.h ('k') | third_party/closure_compiler/compiled_resources2.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698