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

Side by Side Diff: device/test/usb_test_gadget_impl.cc

Issue 423473008: [usb_gadget p13] Replace LUFA with UsbTestGadget in HidConnection tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « device/test/usb_test_gadget.h ('k') | tools/usb_gadget.gyp » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "device/test/usb_test_gadget.h" 5 #include "device/test/usb_test_gadget.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 struct UsbTestGadgetConfiguration { 54 struct UsbTestGadgetConfiguration {
55 UsbTestGadget::Type type; 55 UsbTestGadget::Type type;
56 const char* http_resource; 56 const char* http_resource;
57 uint16 product_id; 57 uint16 product_id;
58 }; 58 };
59 59
60 static const struct UsbTestGadgetConfiguration kConfigurations[] = { 60 static const struct UsbTestGadgetConfiguration kConfigurations[] = {
61 { UsbTestGadget::DEFAULT, "/unconfigure", 0x2000 }, 61 { UsbTestGadget::DEFAULT, "/unconfigure", 0x2000 },
62 { UsbTestGadget::KEYBOARD, "/keyboard/configure", 0x2001 }, 62 { UsbTestGadget::KEYBOARD, "/keyboard/configure", 0x2001 },
63 { UsbTestGadget::MOUSE, "/mouse/configure", 0x2002 }, 63 { UsbTestGadget::MOUSE, "/mouse/configure", 0x2002 },
64 { UsbTestGadget::HID_ECHO, "/hid_echo/configure", 0x2003 },
64 }; 65 };
65 66
66 class UsbTestGadgetImpl : public UsbTestGadget { 67 class UsbTestGadgetImpl : public UsbTestGadget {
67 public: 68 public:
68 virtual ~UsbTestGadgetImpl(); 69 virtual ~UsbTestGadgetImpl();
69 70
70 virtual bool Unclaim() OVERRIDE; 71 virtual bool Unclaim() OVERRIDE;
71 virtual bool Disconnect() OVERRIDE; 72 virtual bool Disconnect() OVERRIDE;
72 virtual bool Reconnect() OVERRIDE; 73 virtual bool Reconnect() OVERRIDE;
73 virtual bool SetType(Type type) OVERRIDE; 74 virtual bool SetType(Type type) OVERRIDE;
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 } 526 }
526 PlatformThread::Sleep(TimeDelta::FromMilliseconds(kRetryPeriod)); 527 PlatformThread::Sleep(TimeDelta::FromMilliseconds(kRetryPeriod));
527 } 528 }
528 VLOG(1) << "It took " << (kDisconnectRetries - retries) 529 VLOG(1) << "It took " << (kDisconnectRetries - retries)
529 << " retries for the device to reconnect."; 530 << " retries for the device to reconnect.";
530 531
531 return true; 532 return true;
532 } 533 }
533 534
534 } // namespace device 535 } // namespace device
OLDNEW
« no previous file with comments | « device/test/usb_test_gadget.h ('k') | tools/usb_gadget.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698