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

Unified Diff: components/usb_service/usb_device_impl.h

Issue 497363004: Merge components/usb_service into device/usb. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 6 years, 3 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_impl.cc ('k') | components/usb_service/usb_device_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/usb_service/usb_device_impl.h
diff --git a/components/usb_service/usb_device_impl.h b/components/usb_service/usb_device_impl.h
deleted file mode 100644
index 07711bc2e54f3c6ba947424853bc7a8af58a168a..0000000000000000000000000000000000000000
--- a/components/usb_service/usb_device_impl.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef COMPONENTS_USB_SERVICE_USB_DEVICE_IMPL_H_
-#define COMPONENTS_USB_SERVICE_USB_DEVICE_IMPL_H_
-
-#include <vector>
-
-#include "base/basictypes.h"
-#include "base/callback.h"
-#include "base/threading/thread_checker.h"
-#include "components/usb_service/usb_device.h"
-
-struct libusb_device;
-struct libusb_config_descriptor;
-
-namespace base {
-class SingleThreadTaskRunner;
-}
-
-namespace usb_service {
-
-class UsbDeviceHandleImpl;
-class UsbContext;
-
-typedef libusb_device* PlatformUsbDevice;
-typedef libusb_config_descriptor* PlatformUsbConfigDescriptor;
-
-class UsbDeviceImpl : public UsbDevice {
- public:
-// UsbDevice implementation:
-#if defined(OS_CHROMEOS)
- virtual void RequestUsbAccess(
- int interface_id,
- const base::Callback<void(bool success)>& callback) OVERRIDE;
-#endif // OS_CHROMEOS
- virtual scoped_refptr<UsbDeviceHandle> Open() OVERRIDE;
- virtual bool Close(scoped_refptr<UsbDeviceHandle> handle) OVERRIDE;
- virtual scoped_refptr<UsbConfigDescriptor> ListInterfaces() OVERRIDE;
-
- protected:
- friend class UsbServiceImpl;
-
- // Called by UsbServiceImpl only;
- UsbDeviceImpl(scoped_refptr<UsbContext> context,
- scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
- PlatformUsbDevice platform_device,
- uint16 vendor_id,
- uint16 product_id,
- uint32 unique_id);
-
- virtual ~UsbDeviceImpl();
-
- // Called only be UsbService.
- void OnDisconnect();
-
- private:
- base::ThreadChecker thread_checker_;
- PlatformUsbDevice platform_device_;
-
- // Retain the context so that it will not be released before UsbDevice.
- scoped_refptr<UsbContext> context_;
-
- // Opened handles.
- typedef std::vector<scoped_refptr<UsbDeviceHandleImpl> > HandlesVector;
- HandlesVector handles_;
-
- // Reference to the UI thread for permission-broker calls.
- scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
-
- DISALLOW_COPY_AND_ASSIGN(UsbDeviceImpl);
-};
-
-} // namespace usb_service
-
-#endif // COMPONENTS_USB_SERVICE_USB_DEVICE_IMPL_H_
« no previous file with comments | « components/usb_service/usb_device_handle_impl.cc ('k') | components/usb_service/usb_device_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698