| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROME_WEBUSB_BROWSER_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_CHROME_WEBUSB_BROWSER_CLIENT_H_ |
| 6 #define CHROME_BROWSER_CHROME_WEBUSB_BROWSER_CLIENT_H_ | 6 #define CHROME_BROWSER_CHROME_WEBUSB_BROWSER_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" |
| 8 #include "components/webusb/webusb_browser_client.h" | 9 #include "components/webusb/webusb_browser_client.h" |
| 9 | 10 |
| 10 class GURL; | 11 class GURL; |
| 11 | 12 |
| 12 // Implementation of webusb::WebUsbBrowserClient. | 13 // Implementation of webusb::WebUsbBrowserClient. |
| 13 // singletons appropriate for use within the Chrome application. | 14 // singletons appropriate for use within the Chrome application. |
| 14 class ChromeWebUsbBrowserClient : public webusb::WebUsbBrowserClient { | 15 class ChromeWebUsbBrowserClient : public webusb::WebUsbBrowserClient { |
| 15 public: | 16 public: |
| 16 ChromeWebUsbBrowserClient(); | 17 ChromeWebUsbBrowserClient(); |
| 17 ~ChromeWebUsbBrowserClient() override; | 18 ~ChromeWebUsbBrowserClient() override; |
| 18 | 19 |
| 19 // webusb::WebUsbBrowserClient implementation | 20 // webusb::WebUsbBrowserClient implementation |
| 20 void OnDeviceAdded(const base::string16& product_name, | 21 void OnDeviceAdded(const base::string16& product_name, |
| 21 const GURL& landing_page, | 22 const GURL& landing_page, |
| 22 const std::string& notification_id) override; | 23 const std::string& notification_id) override; |
| 23 | 24 |
| 24 // webusb::WebUsbBrowserClient implementation | 25 // webusb::WebUsbBrowserClient implementation |
| 25 void OnDeviceRemoved(const std::string& notification_id) override; | 26 void OnDeviceRemoved(const std::string& notification_id) override; |
| 26 | 27 |
| 27 private: | 28 private: |
| 28 DISALLOW_COPY_AND_ASSIGN(ChromeWebUsbBrowserClient); | 29 DISALLOW_COPY_AND_ASSIGN(ChromeWebUsbBrowserClient); |
| 29 }; | 30 }; |
| 30 | 31 |
| 31 #endif // CHROME_BROWSER_CHROME_WEBUSB_BROWSER_CLIENT_H_ | 32 #endif // CHROME_BROWSER_CHROME_WEBUSB_BROWSER_CLIENT_H_ |
| OLD | NEW |