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

Unified Diff: components/webusb/webusb_browser_client.h

Issue 1289423002: Add webusb notification UI code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: moved webusb::WebUsbDetector::GetInstance() call to chrome_browser_main.cc Created 5 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: components/webusb/webusb_browser_client.h
diff --git a/components/webusb/webusb_browser_client.h b/components/webusb/webusb_browser_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..554d7f53aaa03f8c22f34cbaf397fbb34aacd001
--- /dev/null
+++ b/components/webusb/webusb_browser_client.h
@@ -0,0 +1,34 @@
+// Copyright 2015 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 COMPONENTS_WEBUSB_WEBUSB_BROWSER_CLIENT_H_
+#define COMPONENTS_WEBUSB_WEBUSB_BROWSER_CLIENT_H_
+
+#include "base/macros.h"
+
+class GURL;
+
+namespace webusb {
+
+// Interface to allow the webusb module to make browser-process-specific
+// calls. Should be Set() once in the browser process.
+
+class WebUsbBrowserClient {
+ public:
+ virtual ~WebUsbBrowserClient() {}
+
+ virtual void OpenURL(const GURL& url) = 0;
+
+ virtual bool WebUsbNotificationEnabled() = 0;
+
+ // Returns the single instance of |this|.
+ static WebUsbBrowserClient* Get();
+
+ // Initialize the single instance.
+ static void Set(WebUsbBrowserClient* client);
+};
+
+} // namespace webusb
+
+#endif // COMPONENTS_WEBUSB_WEBUSB_BROWSER_CLIENT_H_

Powered by Google App Engine
This is Rietveld 408576698