| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_USB_INTERNALS_USB_INTERNALS_PAGE_HANDLER_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_USB_INTERNALS_USB_INTERNALS_PAGE_HANDLER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "chrome/browser/ui/webui/mojo_web_ui_handler.h" |
| 10 #include "chrome/browser/ui/webui/usb_internals/usb_internals.mojom.h" |
| 11 #include "mojo/public/cpp/bindings/binding.h" |
| 12 |
| 13 class UsbInternalsPageHandler : public mojom::UsbInternalsPageHandler, |
| 14 public MojoWebUIHandler { |
| 15 public: |
| 16 explicit UsbInternalsPageHandler( |
| 17 mojom::UsbInternalsPageHandlerRequest request); |
| 18 ~UsbInternalsPageHandler() override; |
| 19 |
| 20 // mojom::UsbInternalsPageHandler overrides: |
| 21 void AddDeviceForTesting( |
| 22 const std::string& name, |
| 23 const std::string& serial_number, |
| 24 const std::string& landing_page, |
| 25 const std::string& allowed_origin, |
| 26 const AddDeviceForTestingCallback& callback) override; |
| 27 void RemoveDeviceForTesting( |
| 28 const std::string& guid, |
| 29 const RemoveDeviceForTestingCallback& callback) override; |
| 30 void GetTestDevices(const GetTestDevicesCallback& callback) override; |
| 31 |
| 32 private: |
| 33 mojo::Binding<mojom::UsbInternalsPageHandler> binding_; |
| 34 |
| 35 DISALLOW_COPY_AND_ASSIGN(UsbInternalsPageHandler); |
| 36 }; |
| 37 |
| 38 #endif // CHROME_BROWSER_UI_WEBUI_USB_INTERNALS_USB_INTERNALS_PAGE_HANDLER_H_ |
| OLD | NEW |