| OLD | NEW |
| (Empty) |
| 1 // Copyright 2015 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. | |
| 4 | |
| 5 #ifndef DEVICE_USB_FAKE_PERMISSION_PROVIDER_H_ | |
| 6 #define DEVICE_USB_FAKE_PERMISSION_PROVIDER_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include "base/memory/weak_ptr.h" | |
| 11 #include "device/usb/mojo/permission_provider.h" | |
| 12 | |
| 13 namespace device { | |
| 14 namespace usb { | |
| 15 | |
| 16 class FakePermissionProvider : public PermissionProvider { | |
| 17 public: | |
| 18 FakePermissionProvider(); | |
| 19 ~FakePermissionProvider() override; | |
| 20 | |
| 21 base::WeakPtr<PermissionProvider> GetWeakPtr(); | |
| 22 bool HasDevicePermission(const DeviceInfo& device_info) const override; | |
| 23 bool HasConfigurationPermission(uint8_t requested_configuration, | |
| 24 const DeviceInfo& device_info) const override; | |
| 25 bool HasInterfacePermission(uint8_t requested_interface, | |
| 26 uint8_t configuration_value, | |
| 27 const DeviceInfo& device_info) const override; | |
| 28 | |
| 29 private: | |
| 30 base::WeakPtrFactory<PermissionProvider> weak_factory_; | |
| 31 }; | |
| 32 | |
| 33 } // namespace usb | |
| 34 } // namespace device | |
| 35 | |
| 36 #endif // DEVICE_USB_FAKE_PERMISSION_PROVIDER_H_ | |
| OLD | NEW |