Reland of Adding total available size of heap in v8 isolate memory dump provider.
[chromium-blink-merge.git] / device / test / usb_test_gadget.h
blobb1a8642c9a5ea6626324e824038293c5cd130bca
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/ref_counted.h"
12 #include "base/memory/scoped_ptr.h"
14 namespace base {
15 class SingleThreadTaskRunner;
18 namespace device {
20 class UsbDevice;
22 class UsbTestGadget {
23 public:
24 enum Type {
25 DEFAULT = 0,
26 KEYBOARD,
27 MOUSE,
28 HID_ECHO,
29 ECHO,
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;
45 protected:
46 UsbTestGadget() {}
48 private:
49 DISALLOW_COPY_AND_ASSIGN(UsbTestGadget);
52 } // namespace device
54 #endif // DEVICE_TEST_USB_TEST_GADGET_H_