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

Unified Diff: chrome/browser/ui/webui/plugins/plugins_ui.cc

Issue 1576183003: chrome://plugins Mojo-ification part 2/2, populating the page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@plugins_mojo1
Patch Set: Nit Created 4 years, 11 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/plugins/plugins_ui.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/plugins/plugins_ui.cc
diff --git a/chrome/browser/ui/webui/plugins/plugins_ui.cc b/chrome/browser/ui/webui/plugins/plugins_ui.cc
index 7e1326d7dd837fc6d76870db33b5fc565d7e04e8..48efdbd9ac0239b5aa1010933b4f3202c8e6b15f 100644
--- a/chrome/browser/ui/webui/plugins/plugins_ui.cc
+++ b/chrome/browser/ui/webui/plugins/plugins_ui.cc
@@ -69,25 +69,27 @@ content::WebUIDataSource* CreatePluginsUIHTMLSource(Profile* profile) {
#if defined(OS_CHROMEOS)
chromeos::AddAccountUITweaksLocalizedValues(source, profile);
#endif
+ source->AddResourcePath("chrome/browser/ui/webui/plugins/plugins.mojom",
+ IDR_PLUGINS_MOJO_JS);
+
return source;
}
} // namespace
-
-PluginsUI::PluginsUI(content::WebUI* web_ui) : WebUIController(web_ui) {
- web_ui->AddMessageHandler(new PluginsHandler());
-
+PluginsUI::PluginsUI(content::WebUI* web_ui) : MojoWebUIController(web_ui) {
// Set up the chrome://plugins/ source.
Profile* profile = Profile::FromWebUI(web_ui);
content::WebUIDataSource::Add(profile, CreatePluginsUIHTMLSource(profile));
}
+PluginsUI::~PluginsUI() {}
+
// static
base::RefCountedMemory* PluginsUI::GetFaviconResourceBytes(
- ui::ScaleFactor scale_factor) {
- return ResourceBundle::GetSharedInstance().
- LoadDataResourceBytesForScale(IDR_PLUGINS_FAVICON, scale_factor);
+ ui::ScaleFactor scale_factor) {
+ return ResourceBundle::GetSharedInstance().LoadDataResourceBytesForScale(
+ IDR_PLUGINS_FAVICON, scale_factor);
}
// static
@@ -98,3 +100,8 @@ void PluginsUI::RegisterProfilePrefs(
prefs::kContentSettingsPluginWhitelist,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
}
+
+void PluginsUI::BindUIHandler(
+ mojo::InterfaceRequest<PluginsHandlerMojo> request) {
+ plugins_handler_.reset(new PluginsHandler(web_ui(), std::move(request)));
+}
« no previous file with comments | « chrome/browser/ui/webui/plugins/plugins_ui.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698