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

Side by Side 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: updated code so that Chrome browser process owns WebUsbBrowserClient and WebUsbDetector objects Created 5 years, 3 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 unified diff | Download patch
OLDNEW
(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 <string>
9
10 #include "base/macros.h"
11 #include "base/strings/string16.h"
12
13 class GURL;
14
15 namespace webusb {
16
17 // Interface to allow the webusb module to make browser-process-specific
18 // calls. Should be Set() once in the browser process.
19
20 class WebUsbBrowserClient {
21 public:
22 virtual ~WebUsbBrowserClient() {}
23
24 virtual void OnDeviceAdded(const base::string16& product_name,
25 const GURL& landing_page,
26 const std::string& notification_id) = 0;
27
28 virtual void OnDeviceRemoved(const std::string& notification_id) = 0;
29
30 // Returns the single instance of |this|.
31 static WebUsbBrowserClient* Get();
stevenjb 2015/08/28 16:55:06 This doesn't appear to be used outside of WebUsbDe
juncai 2015/08/28 20:23:56 Done.
32
33 // Initialize the single instance.
34 static void Set(WebUsbBrowserClient* client);
35 };
36
37 } // namespace webusb
38
39 #endif // COMPONENTS_WEBUSB_WEBUSB_BROWSER_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698