OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_WEBUSB_WEBUSB_BROWSER_CLIENT_H_ |
| 6 #define COMPONENTS_WEBUSB_WEBUSB_BROWSER_CLIENT_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 |
| 10 class GURL; |
| 11 |
| 12 namespace webusb { |
| 13 |
| 14 // Interface to allow the webusb module to make browser-process-specific |
| 15 // calls. Should be Set() once in the browser process. |
| 16 |
| 17 class WebUsbBrowserClient { |
| 18 public: |
| 19 virtual ~WebUsbBrowserClient() {} |
| 20 |
| 21 virtual void OpenURL(const GURL& url) = 0; |
| 22 |
| 23 virtual bool WebUsbNotificationEnabled() = 0; |
| 24 |
| 25 // Returns the single instance of |this|. |
| 26 static WebUsbBrowserClient* Get(); |
| 27 |
| 28 // Initialize the single instance. |
| 29 static void Set(WebUsbBrowserClient* client); |
| 30 }; |
| 31 |
| 32 } // namespace webusb |
| 33 |
| 34 #endif // COMPONENTS_WEBUSB_WEBUSB_BROWSER_CLIENT_H_ |
OLD | NEW |