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_
10 #include "base/macros.h"
11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h"
15 class SingleThreadTaskRunner
;
32 virtual ~UsbTestGadget() {}
34 static bool IsTestEnabled();
35 static scoped_ptr
<UsbTestGadget
> Claim(
36 scoped_refptr
<base::SingleThreadTaskRunner
> io_task_runner
);
38 virtual bool Unclaim() = 0;
39 virtual bool Disconnect() = 0;
40 virtual bool Reconnect() = 0;
41 virtual bool SetType(Type type
) = 0;
43 virtual UsbDevice
* GetDevice() const = 0;
49 DISALLOW_COPY_AND_ASSIGN(UsbTestGadget
);
54 #endif // DEVICE_TEST_USB_TEST_GADGET_H_