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

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: Port in review changes on now-deleted main.html to cleanup.html Created 3 years, 9 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..47e342e7446a70ff687526a152c48a7647fea04b 100644
--- a/chrome/browser/ui/webui/cleanup_tool/cleanup_tool_ui.cc
+++ b/chrome/browser/ui/webui/cleanup_tool/cleanup_tool_ui.cc
@@ -5,8 +5,10 @@
#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 "chrome/grit/generated_resources.h"
#include "content/public/browser/web_ui_data_source.h"
CleanupToolUI::CleanupToolUI(content::WebUI* web_ui)
@@ -14,8 +16,25 @@ 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("icons.html", IDR_CLEANUP_TOOL_ICONS_HTML);
+ html_source->AddResourcePath("manager.html", IDR_CLEANUP_TOOL_MANAGER_HTML);
+ html_source->AddResourcePath("manager.js", IDR_CLEANUP_TOOL_MANAGER_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>());
}

Powered by Google App Engine
This is Rietveld 408576698