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

Side by Side Diff: components/webusb/webusb_detector.h

Issue 1289423002: Add webusb notification UI code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: modified WebUsbBrowserClient::Set function again 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 unified diff | Download patch
« no previous file with comments | « components/webusb/webusb_browser_client.cc ('k') | components/webusb/webusb_detector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_DETECTOR_H_
6 #define COMPONENTS_WEBUSB_WEBUSB_DETECTOR_H_
7
8 #include "base/scoped_observer.h"
9 #include "device/usb/usb_service.h"
10
11 template <typename T>
12 struct DefaultSingletonTraits;
13
14 namespace device {
15 class UsbDevice;
16 }
17
18 namespace webusb {
19
20 class UsbDevice;
21
22 class WebUsbDetector : public device::UsbService::Observer {
23 public:
24 static WebUsbDetector* GetInstance();
25
26 virtual ~WebUsbDetector();
Cait (Slow) 2015/08/24 19:50:31 I think this should be ~WebUsbDetector() override;
juncai 2015/08/25 02:10:07 Done.
27
28 private:
29 friend struct DefaultSingletonTraits<WebUsbDetector>;
30 WebUsbDetector();
31
32 // UsbService::observer override:
33 void OnDeviceAdded(scoped_refptr<device::UsbDevice> device) override;
34
35 // UsbService::observer override:
36 void OnDeviceRemoved(scoped_refptr<device::UsbDevice> device) override;
37
38 // Initializes the WebUsbDetector.
39 void Initialize();
40
41 ScopedObserver<device::UsbService, device::UsbService::Observer> observer_;
42
43 DISALLOW_COPY_AND_ASSIGN(WebUsbDetector);
44 };
45
46 } // namespace webusb
47
48 #endif // COMPONENTS_WEBUSB_WEBUSB_DETECTOR_H_
OLDNEW
« no previous file with comments | « components/webusb/webusb_browser_client.cc ('k') | components/webusb/webusb_detector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698