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

Side by Side Diff: chrome/browser/usb/usb_device.cc

Issue 11747019: Use generated shim headers for libusb (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix include path Created 7 years, 11 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 | « no previous file | chrome/browser/usb/usb_service.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/usb/usb_device.h" 5 #include "chrome/browser/usb/usb_device.h"
6 6
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "base/synchronization/lock.h" 8 #include "base/synchronization/lock.h"
9 #include "chrome/browser/usb/usb_service.h" 9 #include "chrome/browser/usb/usb_service.h"
10 #include "third_party/libusb/libusb.h" 10 #include "third_party/libusb/src/libusb/libusb.h"
11 11
12 namespace { 12 namespace {
13 13
14 static uint8 ConvertTransferDirection( 14 static uint8 ConvertTransferDirection(
15 const UsbDevice::TransferDirection direction) { 15 const UsbDevice::TransferDirection direction) {
16 switch (direction) { 16 switch (direction) {
17 case UsbDevice::INBOUND: 17 case UsbDevice::INBOUND:
18 return LIBUSB_ENDPOINT_IN; 18 return LIBUSB_ENDPOINT_IN;
19 case UsbDevice::OUTBOUND: 19 case UsbDevice::OUTBOUND:
20 return LIBUSB_ENDPOINT_OUT; 20 return LIBUSB_ENDPOINT_OUT;
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 transfer.buffer = buffer; 309 transfer.buffer = buffer;
310 transfer.length = length; 310 transfer.length = length;
311 transfer.callback = callback; 311 transfer.callback = callback;
312 312
313 { 313 {
314 base::AutoLock lock(lock_); 314 base::AutoLock lock(lock_);
315 transfers_[handle] = transfer; 315 transfers_[handle] = transfer;
316 libusb_submit_transfer(handle); 316 libusb_submit_transfer(handle);
317 } 317 }
318 } 318 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/usb/usb_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698