Chromium Code Reviews| Index: device/usb/public/cpp/device_manager_delegate.h |
| diff --git a/device/usb/public/cpp/device_manager_delegate.h b/device/usb/public/cpp/device_manager_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..25b631ddda3d4e92a95864a27521e651aba21a06 |
| --- /dev/null |
| +++ b/device/usb/public/cpp/device_manager_delegate.h |
| @@ -0,0 +1,29 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef DEVICE_USB_PUBLIC_CPP_DEVICE_MANAGER_DELEGATE_H_ |
| +#define DEVICE_USB_PUBLIC_CPP_DEVICE_MANAGER_DELEGATE_H_ |
| + |
| +#include "base/memory/ref_counted.h" |
| +#include "base/sequenced_task_runner.h" |
|
Reilly Grant (use Gerrit)
2015/05/27 21:00:53
The two headers above are unnecessary.
Ken Rockot(use gerrit already)
2015/05/27 22:35:03
Good catch. They were used once upon a time, I swe
|
| +#include "device/usb/public/interfaces/device.mojom.h" |
| + |
| +namespace device { |
| +namespace usb { |
| + |
| +// Interface used by DeviceManager instances to delegate certain decisions and |
| +// behaviors out to their embedder. |
| +class DeviceManagerDelegate { |
| + public: |
| + virtual ~DeviceManagerDelegate() {} |
| + |
| + // Determines whether a given device should be accessible to clients of the |
| + // DeviceManager instance. |
| + virtual bool IsDeviceAllowed(const DeviceInfo& info) = 0; |
| +}; |
| + |
| +} // namespace usb |
| +} // namespace device |
| + |
| +#endif // DEVICE_USB_PUBLIC_CPP_DEVICE_MANAGER_DELEGATE_H_ |