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

Side by Side Diff: components/usb_service/usb_interface.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_device.h ('k') | components/usb_service/usb_interface.cc » ('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_INTERFACE_H_ 5 #ifndef COMPONENTS_USB_SERVICE_USB_INTERFACE_H_
6 #define COMPONENTS_USB_SERVICE_USB_INTERFACE_H_ 6 #define COMPONENTS_USB_SERVICE_USB_INTERFACE_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "components/usb_service/usb_service_export.h" 9 #include "components/usb_service/usb_service_export.h"
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 scoped_refptr<const UsbConfigDescriptor> config_; 120 scoped_refptr<const UsbConfigDescriptor> config_;
121 PlatformUsbInterface interface_; 121 PlatformUsbInterface interface_;
122 122
123 DISALLOW_COPY_AND_ASSIGN(UsbInterfaceDescriptor); 123 DISALLOW_COPY_AND_ASSIGN(UsbInterfaceDescriptor);
124 }; 124 };
125 125
126 class USB_SERVICE_EXPORT UsbConfigDescriptor 126 class USB_SERVICE_EXPORT UsbConfigDescriptor
127 : public base::RefCounted<UsbConfigDescriptor> { 127 : public base::RefCounted<UsbConfigDescriptor> {
128 public: 128 public:
129 size_t GetNumInterfaces() const; 129 virtual size_t GetNumInterfaces() const;
130 scoped_refptr<const UsbInterfaceDescriptor> GetInterface(size_t index) const; 130 virtual scoped_refptr<const UsbInterfaceDescriptor> GetInterface(
131 size_t index) const;
132
133 protected:
134 // Constructor called in test only
135 UsbConfigDescriptor();
136 virtual ~UsbConfigDescriptor();
131 137
132 private: 138 private:
133 friend class base::RefCounted<UsbConfigDescriptor>; 139 friend class base::RefCounted<UsbConfigDescriptor>;
134 friend class UsbDevice; 140 friend class UsbDevice;
135 141
136 explicit UsbConfigDescriptor(PlatformUsbConfigDescriptor config); 142 explicit UsbConfigDescriptor(PlatformUsbConfigDescriptor config);
137 ~UsbConfigDescriptor();
138 143
139 PlatformUsbConfigDescriptor config_; 144 PlatformUsbConfigDescriptor config_;
140 145
141 DISALLOW_COPY_AND_ASSIGN(UsbConfigDescriptor); 146 DISALLOW_COPY_AND_ASSIGN(UsbConfigDescriptor);
142 }; 147 };
143 148
144 } // namespace usb_service; 149 } // namespace usb_service;
145 150
146 #endif // COMPONENTS_USB_SERVICE_USB_INTERFACE_H_ 151 #endif // COMPONENTS_USB_SERVICE_USB_INTERFACE_H_
OLDNEW
« no previous file with comments | « components/usb_service/usb_device.h ('k') | components/usb_service/usb_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698