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

Side by Side Diff: device/usb/usb_service.h

Issue 800963005: Add browser tests for USB device add/remove events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 DEVICE_USB_USB_SERVICE_H_ 5 #ifndef DEVICE_USB_USB_SERVICE_H_
6 #define DEVICE_USB_USB_SERVICE_H_ 6 #define DEVICE_USB_USB_SERVICE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 // Get all of the devices attached to the system, inserting them into 49 // Get all of the devices attached to the system, inserting them into
50 // |devices|. Clears |devices| before use. The result will be sorted by id 50 // |devices|. Clears |devices| before use. The result will be sorted by id
51 // in increasing order. 51 // in increasing order.
52 virtual void GetDevices(std::vector<scoped_refptr<UsbDevice> >* devices) = 0; 52 virtual void GetDevices(std::vector<scoped_refptr<UsbDevice> >* devices) = 0;
53 53
54 void AddObserver(Observer* observer); 54 void AddObserver(Observer* observer);
55 void RemoveObserver(Observer* observer); 55 void RemoveObserver(Observer* observer);
56 56
57 protected: 57 protected:
58 friend struct base::DefaultDeleter<UsbService>;
59
60 UsbService(); 58 UsbService();
61 virtual ~UsbService(); 59 virtual ~UsbService();
62 60
63 void NotifyDeviceAdded(scoped_refptr<UsbDevice> device); 61 void NotifyDeviceAdded(scoped_refptr<UsbDevice> device);
64 void NotifyDeviceRemoved(scoped_refptr<UsbDevice> device); 62 void NotifyDeviceRemoved(scoped_refptr<UsbDevice> device);
65 63
66 ObserverList<Observer, true> observer_list_; 64 ObserverList<Observer, true> observer_list_;
67 65
66 private:
67 class Destroyer;
68
68 DISALLOW_COPY_AND_ASSIGN(UsbService); 69 DISALLOW_COPY_AND_ASSIGN(UsbService);
69 }; 70 };
70 71
71 } // namespace device 72 } // namespace device
72 73
73 #endif // DEVICE_USB_USB_SERVICE_H_ 74 #endif // DEVICE_USB_USB_SERVICE_H_
OLDNEW
« no previous file with comments | « device/usb/usb.gyp ('k') | device/usb/usb_service.cc » ('j') | device/usb/usb_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698