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

Unified Diff: components/usb_service/usb_interface.h

Issue 236203019: Move UsbService to its own component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move usb_service component symbols into usb_service namespace Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/usb_service/usb_device_handle.cc ('k') | components/usb_service/usb_interface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/usb_service/usb_interface.h
diff --git a/chrome/browser/usb/usb_interface.h b/components/usb_service/usb_interface.h
similarity index 83%
rename from chrome/browser/usb/usb_interface.h
rename to components/usb_service/usb_interface.h
index e73b044ca0df776f68b911f57e619450d9cb309a..f1f61515f57fd85ba6fd6b43866e90cc110fe475 100644
--- a/chrome/browser/usb/usb_interface.h
+++ b/components/usb_service/usb_interface.h
@@ -2,16 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_USB_USB_INTERFACE_H_
-#define CHROME_BROWSER_USB_USB_INTERFACE_H_
+#ifndef COMPONENTS_USB_SERVICE_USB_INTERFACE_H_
+#define COMPONENTS_USB_SERVICE_USB_INTERFACE_H_
#include "base/memory/ref_counted.h"
+#include "components/usb_service/usb_service_export.h"
struct libusb_config_descriptor;
struct libusb_endpoint_descriptor;
struct libusb_interface;
struct libusb_interface_descriptor;
+namespace usb_service {
+
typedef libusb_config_descriptor* PlatformUsbConfigDescriptor;
typedef const libusb_endpoint_descriptor* PlatformUsbEndpointDescriptor;
typedef const libusb_interface* PlatformUsbInterface;
@@ -47,7 +50,7 @@ class UsbConfigDescriptor;
class UsbInterfaceDescriptor;
class UsbInterfaceAltSettingDescriptor;
-class UsbEndpointDescriptor
+class USB_SERVICE_EXPORT UsbEndpointDescriptor
: public base::RefCounted<const UsbEndpointDescriptor> {
public:
int GetAddress() const;
@@ -62,9 +65,8 @@ class UsbEndpointDescriptor
friend class base::RefCounted<const UsbEndpointDescriptor>;
friend class UsbInterfaceAltSettingDescriptor;
- UsbEndpointDescriptor(
- scoped_refptr<const UsbConfigDescriptor> config,
- PlatformUsbEndpointDescriptor descriptor);
+ UsbEndpointDescriptor(scoped_refptr<const UsbConfigDescriptor> config,
+ PlatformUsbEndpointDescriptor descriptor);
~UsbEndpointDescriptor();
scoped_refptr<const UsbConfigDescriptor> config_;
@@ -73,7 +75,7 @@ class UsbEndpointDescriptor
DISALLOW_COPY_AND_ASSIGN(UsbEndpointDescriptor);
};
-class UsbInterfaceAltSettingDescriptor
+class USB_SERVICE_EXPORT UsbInterfaceAltSettingDescriptor
: public base::RefCounted<const UsbInterfaceAltSettingDescriptor> {
public:
size_t GetNumEndpoints() const;
@@ -100,7 +102,7 @@ class UsbInterfaceAltSettingDescriptor
DISALLOW_COPY_AND_ASSIGN(UsbInterfaceAltSettingDescriptor);
};
-class UsbInterfaceDescriptor
+class USB_SERVICE_EXPORT UsbInterfaceDescriptor
: public base::RefCounted<const UsbInterfaceDescriptor> {
public:
size_t GetNumAltSettings() const;
@@ -112,7 +114,7 @@ class UsbInterfaceDescriptor
friend class UsbConfigDescriptor;
UsbInterfaceDescriptor(scoped_refptr<const UsbConfigDescriptor> config,
- PlatformUsbInterface usbInterface);
+ PlatformUsbInterface usbInterface);
~UsbInterfaceDescriptor();
scoped_refptr<const UsbConfigDescriptor> config_;
@@ -121,7 +123,8 @@ class UsbInterfaceDescriptor
DISALLOW_COPY_AND_ASSIGN(UsbInterfaceDescriptor);
};
-class UsbConfigDescriptor : public base::RefCounted<UsbConfigDescriptor> {
+class USB_SERVICE_EXPORT UsbConfigDescriptor
+ : public base::RefCounted<UsbConfigDescriptor> {
public:
size_t GetNumInterfaces() const;
scoped_refptr<const UsbInterfaceDescriptor> GetInterface(size_t index) const;
@@ -138,4 +141,6 @@ class UsbConfigDescriptor : public base::RefCounted<UsbConfigDescriptor> {
DISALLOW_COPY_AND_ASSIGN(UsbConfigDescriptor);
};
-#endif // CHROME_BROWSER_USB_USB_INTERFACE_H_
+} // namespace usb_service;
+
+#endif // COMPONENTS_USB_SERVICE_USB_INTERFACE_H_
« no previous file with comments | « components/usb_service/usb_device_handle.cc ('k') | components/usb_service/usb_interface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698