Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: chrome/browser/usb/web_usb_permission_provider.h

Issue 1847183002: Use interface associations to check function permissions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nit and fixed Windows build. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_USB_WEB_USB_PERMISSION_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_USB_WEB_USB_PERMISSION_PROVIDER_H_
6 #define CHROME_BROWSER_USB_WEB_USB_PERMISSION_PROVIDER_H_ 6 #define CHROME_BROWSER_USB_WEB_USB_PERMISSION_PROVIDER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 14 matching lines...) Expand all
25 ~WebUSBPermissionProvider() override; 25 ~WebUSBPermissionProvider() override;
26 26
27 base::WeakPtr<PermissionProvider> GetWeakPtr(); 27 base::WeakPtr<PermissionProvider> GetWeakPtr();
28 28
29 // device::usb::PermissionProvider implementation. 29 // device::usb::PermissionProvider implementation.
30 bool HasDevicePermission( 30 bool HasDevicePermission(
31 const device::usb::DeviceInfo& device_info) const override; 31 const device::usb::DeviceInfo& device_info) const override;
32 bool HasConfigurationPermission( 32 bool HasConfigurationPermission(
33 uint8_t requested_configuration, 33 uint8_t requested_configuration,
34 const device::usb::DeviceInfo& device_info) const override; 34 const device::usb::DeviceInfo& device_info) const override;
35 bool HasInterfacePermission( 35 bool HasFunctionPermission(
36 uint8_t requested_interface, 36 uint8_t requested_function,
37 uint8_t configuration_value, 37 uint8_t configuration_value,
38 const device::usb::DeviceInfo& device_info) const override; 38 const device::usb::DeviceInfo& device_info) const override;
39 39
40 private: 40 private:
41 content::RenderFrameHost* const render_frame_host_; 41 content::RenderFrameHost* const render_frame_host_;
42 base::WeakPtrFactory<PermissionProvider> weak_factory_; 42 base::WeakPtrFactory<PermissionProvider> weak_factory_;
43 }; 43 };
44 44
45 #endif // CHROME_BROWSER_USB_WEB_USB_PERMISSION_PROVIDER_H_ 45 #endif // CHROME_BROWSER_USB_WEB_USB_PERMISSION_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/devtools/device/usb/android_usb_browsertest.cc ('k') | chrome/browser/usb/web_usb_permission_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698