Roll src/third_party/skia 57a48a7:de7665a
[chromium-blink-merge.git] / device / test / usb_test_gadget.h
blob99110a1966ed640108b164f910b8014ef5055aec
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
3 // found in the LICENSE file.
5 #ifndef DEVICE_TEST_USB_TEST_GADGET_H_
6 #define DEVICE_TEST_USB_TEST_GADGET_H_
8 #include <string>
10 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
13 namespace device {
15 class UsbDevice;
17 class UsbTestGadget {
18 public:
19 enum Type {
20 DEFAULT = 0,
21 KEYBOARD,
22 MOUSE,
23 HID_ECHO,
24 ECHO,
27 virtual ~UsbTestGadget() {}
29 static bool IsTestEnabled();
30 static scoped_ptr<UsbTestGadget> Claim();
32 virtual bool Unclaim() = 0;
33 virtual bool Disconnect() = 0;
34 virtual bool Reconnect() = 0;
35 virtual bool SetType(Type type) = 0;
37 virtual UsbDevice* GetDevice() const = 0;
38 virtual const std::string& GetSerialNumber() const = 0;
40 protected:
41 UsbTestGadget() {}
43 private:
44 DISALLOW_COPY_AND_ASSIGN(UsbTestGadget);
47 } // namespace device
49 #endif // DEVICE_TEST_USB_TEST_GADGET_H_