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

Unified Diff: components/usb_service/usb_device.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_context_unittest.cc ('k') | components/usb_service/usb_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/usb_service/usb_device.h
diff --git a/chrome/browser/usb/usb_device.h b/components/usb_service/usb_device.h
similarity index 85%
rename from chrome/browser/usb/usb_device.h
rename to components/usb_service/usb_device.h
index a8bd0a3240cec81252ca3afc17ea30948153d393..235a29331092da8899bca28ae9e8a82c4183847c 100644
--- a/chrome/browser/usb/usb_device.h
+++ b/components/usb_service/usb_device.h
@@ -2,9 +2,8 @@
// 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_DEVICE_H_
-#define CHROME_BROWSER_USB_USB_DEVICE_H_
+#ifndef COMPONENTS_USB_SERVICE_USB_DEVICE_H_
+#define COMPONENTS_USB_SERVICE_USB_DEVICE_H_
#include <vector>
@@ -12,9 +11,13 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/threading/thread_checker.h"
-#include "chrome/browser/usb/usb_interface.h"
+#include "components/usb_service/usb_interface.h"
+#include "components/usb_service/usb_service_export.h"
struct libusb_device;
+
+namespace usb_service {
+
class UsbDeviceHandle;
class UsbContext;
@@ -23,7 +26,8 @@ typedef libusb_device* PlatformUsbDevice;
// A UsbDevice object represents a detected USB device, providing basic
// information about it. For further manipulation of the device, a
// UsbDeviceHandle must be created from Open() method.
-class UsbDevice : public base::RefCountedThreadSafe<UsbDevice> {
+class USB_SERVICE_EXPORT UsbDevice
+ : public base::RefCountedThreadSafe<UsbDevice> {
public:
// Accessors to basic information.
PlatformUsbDevice platform_device() const { return platform_device_; }
@@ -37,7 +41,8 @@ class UsbDevice : public base::RefCountedThreadSafe<UsbDevice> {
// interfaces can be used. If this argument is missing, permission broker will
// not be used and this method fails if the device is claimed.
virtual void RequestUsbAcess(
- int interface_id, const base::Callback<void(bool success)>& callback);
+ int interface_id,
+ const base::Callback<void(bool success)>& callback);
#endif // OS_CHROMEOS
// Creates a UsbDeviceHandle for further manipulation.
@@ -91,4 +96,6 @@ class UsbDevice : public base::RefCountedThreadSafe<UsbDevice> {
DISALLOW_COPY_AND_ASSIGN(UsbDevice);
};
-#endif // CHROME_BROWSER_USB_USB_DEVICE_H_
+} // namespace usb_service
+
+#endif // COMPONENTS_USB_SERVICE_USB_DEVICE_H_
« no previous file with comments | « components/usb_service/usb_context_unittest.cc ('k') | components/usb_service/usb_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698