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

Unified Diff: extensions/browser/api/usb/usb_api.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 | « extensions/browser/api/usb/DEPS ('k') | extensions/browser/api/usb/usb_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/usb/usb_api.h
diff --git a/extensions/browser/api/usb/usb_api.h b/extensions/browser/api/usb/usb_api.h
index 1549f97f7391aabc9a42a8b3189348128f93ef67..fd02d8087d71270f3f2460b953d7c4f1c5a82918 100644
--- a/extensions/browser/api/usb/usb_api.h
+++ b/extensions/browser/api/usb/usb_api.h
@@ -10,9 +10,9 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "components/usb_service/usb_device.h"
-#include "components/usb_service/usb_device_filter.h"
-#include "components/usb_service/usb_device_handle.h"
+#include "device/usb/usb_device.h"
+#include "device/usb/usb_device_filter.h"
+#include "device/usb/usb_device_handle.h"
#include "extensions/browser/api/api_resource_manager.h"
#include "extensions/browser/api/async_api_function.h"
#include "extensions/common/api/usb.h"
@@ -34,17 +34,15 @@ class UsbAsyncApiFunction : public AsyncApiFunction {
static void CreateDeviceFilter(
const extensions::core_api::usb::DeviceFilter& input,
- usb_service::UsbDeviceFilter* output);
+ device::UsbDeviceFilter* output);
- bool HasDevicePermission(scoped_refptr<usb_service::UsbDevice> device);
+ bool HasDevicePermission(scoped_refptr<device::UsbDevice> device);
- scoped_refptr<usb_service::UsbDevice> GetDeviceOrCompleteWithError(
+ scoped_refptr<device::UsbDevice> GetDeviceOrCompleteWithError(
const extensions::core_api::usb::Device& input_device);
- scoped_refptr<usb_service::UsbDeviceHandle>
- GetDeviceHandleOrCompleteWithError(
- const extensions::core_api::usb::ConnectionHandle&
- input_device_handle);
+ scoped_refptr<device::UsbDeviceHandle> GetDeviceHandleOrCompleteWithError(
+ const extensions::core_api::usb::ConnectionHandle& input_device_handle);
void RemoveUsbDeviceResource(int api_resource_id);
@@ -59,15 +57,15 @@ class UsbAsyncApiTransferFunction : public UsbAsyncApiFunction {
virtual ~UsbAsyncApiTransferFunction();
bool ConvertDirectionSafely(const extensions::core_api::usb::Direction& input,
- usb_service::UsbEndpointDirection* output);
+ device::UsbEndpointDirection* output);
bool ConvertRequestTypeSafely(
const extensions::core_api::usb::RequestType& input,
- usb_service::UsbDeviceHandle::TransferRequestType* output);
+ device::UsbDeviceHandle::TransferRequestType* output);
bool ConvertRecipientSafely(
const extensions::core_api::usb::Recipient& input,
- usb_service::UsbDeviceHandle::TransferRecipient* output);
+ device::UsbDeviceHandle::TransferRecipient* output);
- void OnCompleted(usb_service::UsbTransferStatus status,
+ void OnCompleted(device::UsbTransferStatus status,
scoped_refptr<net::IOBuffer> data,
size_t length);
};
@@ -86,9 +84,9 @@ class UsbFindDevicesFunction : public UsbAsyncApiFunction {
private:
void OpenDevices(
- scoped_ptr<std::vector<scoped_refptr<usb_service::UsbDevice> > > devices);
+ scoped_ptr<std::vector<scoped_refptr<device::UsbDevice> > > devices);
- std::vector<scoped_refptr<usb_service::UsbDeviceHandle> > device_handles_;
+ std::vector<scoped_refptr<device::UsbDeviceHandle> > device_handles_;
scoped_ptr<extensions::core_api::usb::FindDevices::Params> parameters_;
};
@@ -106,7 +104,7 @@ class UsbGetDevicesFunction : public UsbAsyncApiFunction {
private:
void EnumerationCompletedFileThread(
- scoped_ptr<std::vector<scoped_refptr<usb_service::UsbDevice> > > devices);
+ scoped_ptr<std::vector<scoped_refptr<device::UsbDevice> > > devices);
scoped_ptr<extensions::core_api::usb::GetDevices::Params> parameters_;
};
@@ -142,7 +140,7 @@ class UsbOpenDeviceFunction : public UsbAsyncApiFunction {
virtual ~UsbOpenDeviceFunction();
private:
- scoped_refptr<usb_service::UsbDeviceHandle> handle_;
+ scoped_refptr<device::UsbDeviceHandle> handle_;
scoped_ptr<extensions::core_api::usb::OpenDevice::Params> parameters_;
};
@@ -159,15 +157,15 @@ class UsbListInterfacesFunction : public UsbAsyncApiFunction {
virtual void AsyncWorkStart() OVERRIDE;
private:
- bool ConvertDirectionSafely(const usb_service::UsbEndpointDirection& input,
+ bool ConvertDirectionSafely(const device::UsbEndpointDirection& input,
extensions::core_api::usb::Direction* output);
bool ConvertSynchronizationTypeSafely(
- const usb_service::UsbSynchronizationType& input,
+ const device::UsbSynchronizationType& input,
extensions::core_api::usb::SynchronizationType* output);
bool ConvertTransferTypeSafely(
- const usb_service::UsbTransferType& input,
+ const device::UsbTransferType& input,
extensions::core_api::usb::TransferType* output);
- bool ConvertUsageTypeSafely(const usb_service::UsbUsageType& input,
+ bool ConvertUsageTypeSafely(const device::UsbUsageType& input,
extensions::core_api::usb::UsageType* output);
scoped_ptr<base::ListValue> result_;
« no previous file with comments | « extensions/browser/api/usb/DEPS ('k') | extensions/browser/api/usb/usb_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698