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

Unified Diff: chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.h

Issue 2357383002: bluetooth: Add device list retrieval for chrome://bluetooth-internals (Closed)
Patch Set: Mojo interface and implementation fixes Created 4 years, 3 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/bluetooth_internals/bluetooth_internals_ui.h
diff --git a/chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.h b/chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.h
index 4d39a811b0b0acb826c072c6a966560a5d61d497..5c7a9ed939ab1724412d0317d62a31fc7c286764 100644
--- a/chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.h
+++ b/chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals_ui.h
@@ -5,16 +5,34 @@
#ifndef CHROME_BROWSER_UI_WEBUI_BLUETOOTH_INTERNALS_BLUETOOTH_INTERNALS_UI_H_
#define CHROME_BROWSER_UI_WEBUI_BLUETOOTH_INTERNALS_BLUETOOTH_INTERNALS_UI_H_
+#include <memory>
+
#include "base/macros.h"
-#include "content/public/browser/web_ui_controller.h"
+#include "chrome/browser/ui/webui/bluetooth_internals/bluetooth_internals.mojom.h"
+#include "chrome/browser/ui/webui/mojo_web_ui_controller.h"
+#include "chrome/browser/ui/webui/mojo_web_ui_handler.h"
+#include "device/bluetooth/public/interfaces/bluetooth.mojom.h"
-// The WebUI for chrome://bluetooth-internals
-class BluetoothInternalsUI : public content::WebUIController {
+// WebUI for chrome://bluetooth-internals; Exposes Bluetooth Adapter Mojo
+// service from device/bluetooth/public/interfaces/bluetooth.mojom.
+class BluetoothInternalsUI
+ : public mojom::InternalsPageHandler,
+ public MojoWebUIController<mojom::InternalsPageHandler>,
+ public MojoWebUIHandler {
public:
explicit BluetoothInternalsUI(content::WebUI* web_ui);
~BluetoothInternalsUI() override;
private:
+ // MojoWebUIController overrides:
+ void BindUIHandler(mojom::InternalsPageHandlerRequest request) override;
+
+ // mojom::InternalsPageHandler overrides:
ortuno 2016/09/26 01:57:56 The structure you had before was fine. Sorry!
mbrunson 2016/09/28 02:18:22 I'm reverting the entire WebUI to its state before
+ void GetAdapterService(bluetooth::mojom::AdapterRequest request,
+ bluetooth::mojom::AdapterClientPtr client) override;
+
+ std::unique_ptr<mojo::Binding<mojom::InternalsPageHandler>> binding_ptr_;
+
DISALLOW_COPY_AND_ASSIGN(BluetoothInternalsUI);
};

Powered by Google App Engine
This is Rietveld 408576698