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..cf78ad59828bd517db663e8dbfd38d74258158d0 100644 |
--- a/chrome/browser/ui/webui/plugins/plugins_ui.cc |
+++ b/chrome/browser/ui/webui/plugins/plugins_ui.cc |
@@ -69,20 +69,26 @@ 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); |
+ source->AddMojoResources(); |
+ |
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) { |
+ LOG(ERROR) << "PluginsUI"; |
// 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) { |
@@ -98,3 +104,10 @@ void PluginsUI::RegisterProfilePrefs( |
prefs::kContentSettingsPluginWhitelist, |
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
} |
+ |
+void PluginsUI::BindUIHandler( |
+ mojo::InterfaceRequest<PluginsHandlerMojo> request) { |
+ // PluginsHandler deletes itself when the pipe is closed. |
+ LOG(ERROR) << "bindUIHandler"; |
+ plugins_handler_.reset(new PluginsHandler(web_ui(), std::move(request))); |
+} |