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

Unified Diff: chrome/browser/ui/webui/usb_internals/usb_internals_page_handler.h

Issue 2204713006: Add chrome://usb-internals page for adding and removing test devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use typemaped types in the TestDeviceInfo struct. Created 4 years, 4 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/usb_internals/usb_internals_page_handler.h
diff --git a/chrome/browser/ui/webui/usb_internals/usb_internals_page_handler.h b/chrome/browser/ui/webui/usb_internals/usb_internals_page_handler.h
new file mode 100644
index 0000000000000000000000000000000000000000..c978a30c0fe7d6db4476a9d2300a2d55fec2ef45
--- /dev/null
+++ b/chrome/browser/ui/webui/usb_internals/usb_internals_page_handler.h
@@ -0,0 +1,38 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_USB_INTERNALS_USB_INTERNALS_PAGE_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_USB_INTERNALS_USB_INTERNALS_PAGE_HANDLER_H_
+
+#include "base/macros.h"
+#include "chrome/browser/ui/webui/mojo_web_ui_handler.h"
+#include "chrome/browser/ui/webui/usb_internals/usb_internals.mojom.h"
+#include "mojo/public/cpp/bindings/binding.h"
+
+class UsbInternalsPageHandler : public mojom::UsbInternalsPageHandler,
+ public MojoWebUIHandler {
+ public:
+ explicit UsbInternalsPageHandler(
+ mojom::UsbInternalsPageHandlerRequest request);
+ ~UsbInternalsPageHandler() override;
+
+ // mojom::UsbInternalsPageHandler overrides:
+ void AddDeviceForTesting(
+ const std::string& name,
+ const std::string& serial_number,
+ const std::string& landing_page,
+ const std::string& allowed_origin,
+ const AddDeviceForTestingCallback& callback) override;
+ void RemoveDeviceForTesting(
+ const std::string& guid,
+ const RemoveDeviceForTestingCallback& callback) override;
+ void GetTestDevices(const GetTestDevicesCallback& callback) override;
+
+ private:
+ mojo::Binding<mojom::UsbInternalsPageHandler> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(UsbInternalsPageHandler);
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_USB_INTERNALS_USB_INTERNALS_PAGE_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698