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

Side by Side Diff: components/usb_service/usb_device.h

Issue 258783002: Extracted UsbService as interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed chromeos issue. Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « components/usb_service/usb_context.h ('k') | components/usb_service/usb_interface.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 COMPONENTS_USB_SERVICE_USB_DEVICE_H_ 5 #ifndef COMPONENTS_USB_SERVICE_USB_DEVICE_H_
6 #define COMPONENTS_USB_SERVICE_USB_DEVICE_H_ 6 #define COMPONENTS_USB_SERVICE_USB_DEVICE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // Closing a closed handle is a safe 54 // Closing a closed handle is a safe
55 // Blocking method. Must be called on FILE thread. 55 // Blocking method. Must be called on FILE thread.
56 virtual bool Close(scoped_refptr<UsbDeviceHandle> handle); 56 virtual bool Close(scoped_refptr<UsbDeviceHandle> handle);
57 57
58 // Lists the interfaces provided by the device and fills the given 58 // Lists the interfaces provided by the device and fills the given
59 // UsbConfigDescriptor. 59 // UsbConfigDescriptor.
60 // Blocking method. Must be called on FILE thread. 60 // Blocking method. Must be called on FILE thread.
61 virtual scoped_refptr<UsbConfigDescriptor> ListInterfaces(); 61 virtual scoped_refptr<UsbConfigDescriptor> ListInterfaces();
62 62
63 protected: 63 protected:
64 friend class UsbService; 64 friend class UsbServiceImpl;
65 friend class base::RefCountedThreadSafe<UsbDevice>; 65 friend class base::RefCountedThreadSafe<UsbDevice>;
66 66
67 // Called by UsbService only; 67 // Called by UsbService only;
68 UsbDevice(scoped_refptr<UsbContext> context, 68 UsbDevice(scoped_refptr<UsbContext> context,
69 PlatformUsbDevice platform_device, 69 PlatformUsbDevice platform_device,
70 uint16 vendor_id, 70 uint16 vendor_id,
71 uint16 product_id, 71 uint16 product_id,
72 uint32 unique_id); 72 uint32 unique_id);
73 73
74 // Constructor called in test only. 74 // Constructor called in test only.
(...skipping 17 matching lines...) Expand all
92 HandlesVector handles_; 92 HandlesVector handles_;
93 93
94 base::ThreadChecker thread_checker_; 94 base::ThreadChecker thread_checker_;
95 95
96 DISALLOW_COPY_AND_ASSIGN(UsbDevice); 96 DISALLOW_COPY_AND_ASSIGN(UsbDevice);
97 }; 97 };
98 98
99 } // namespace usb_service 99 } // namespace usb_service
100 100
101 #endif // COMPONENTS_USB_SERVICE_USB_DEVICE_H_ 101 #endif // COMPONENTS_USB_SERVICE_USB_DEVICE_H_
OLDNEW
« no previous file with comments | « components/usb_service/usb_context.h ('k') | components/usb_service/usb_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698