Index: chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.cc |
diff --git a/chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.cc b/chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.cc |
index e8a4f532da08dc72ce183d14171acde0925906fe..8be0e665fcf8a6428833f6d7429925db9c0ed9db 100644 |
--- a/chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.cc |
+++ b/chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.cc |
@@ -4,13 +4,15 @@ |
#include "chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.h" |
+#include <utility> |
+ |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/common/url_constants.h" |
#include "chrome/grit/browser_resources.h" |
#include "content/public/browser/web_ui_data_source.h" |
BluetoothInternalsUI::BluetoothInternalsUI(content::WebUI* web_ui) |
- : content::WebUIController(web_ui) { |
+ : MojoWebUIController(web_ui) { |
// Set up the chrome://bluetooth-internals source. |
content::WebUIDataSource* html_source = |
content::WebUIDataSource::Create(chrome::kChromeUIBluetoothInternalsHost); |
@@ -20,6 +22,12 @@ BluetoothInternalsUI::BluetoothInternalsUI(content::WebUI* web_ui) |
IDR_BLUETOOTH_INTERNALS_CSS); |
html_source->AddResourcePath("bluetooth_internals.js", |
IDR_BLUETOOTH_INTERNALS_JS); |
+ html_source->AddResourcePath( |
+ "chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals.mojom", |
+ IDR_BLUETOOTH_INTERNALS_MOJO_JS); |
+ html_source->AddResourcePath( |
+ "device/bluetooth/public/interfaces/bluetooth.mojom", |
+ IDR_BLUETOOTH_MOJO_JS); |
html_source->SetDefaultResource(IDR_BLUETOOTH_INTERNALS_HTML); |
Profile* profile = Profile::FromWebUI(web_ui); |
@@ -27,3 +35,8 @@ BluetoothInternalsUI::BluetoothInternalsUI(content::WebUI* web_ui) |
} |
BluetoothInternalsUI::~BluetoothInternalsUI() {} |
+ |
+void BluetoothInternalsUI::BindUIHandler( |
+ mojom::InternalsPageHandlerRequest request) { |
+ page_handler_.reset(new BluetoothInternalsPageHandler(std::move(request))); |
ortuno
2016/09/22 08:32:53
I'm probably missing some context here but why not
mbrunson
2016/09/24 01:05:47
This seems to be the established pattern but the W
|
+} |