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() {} |