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

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

Issue 1854483002: Remove WebUSB descriptor data from device.mojom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use_interface_associations
Patch Set: Rebased. 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 10 matching lines...) Expand all
21 class WebUSBPermissionProvider : public device::usb::PermissionProvider { 21 class WebUSBPermissionProvider : public device::usb::PermissionProvider {
22 public: 22 public:
23 explicit WebUSBPermissionProvider( 23 explicit WebUSBPermissionProvider(
24 content::RenderFrameHost* render_frame_host); 24 content::RenderFrameHost* render_frame_host);
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 scoped_refptr<const device::UsbDevice> device) 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 scoped_refptr<const device::UsbDevice> device) const override;
35 bool HasFunctionPermission( 35 bool HasFunctionPermission(
36 uint8_t requested_function, 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 scoped_refptr<const device::UsbDevice> device) const override;
39 void IncrementConnectionCount() override; 39 void IncrementConnectionCount() override;
40 void DecrementConnectionCount() override; 40 void DecrementConnectionCount() override;
41 41
42 private: 42 private:
43 content::RenderFrameHost* const render_frame_host_; 43 content::RenderFrameHost* const render_frame_host_;
44 base::WeakPtrFactory<PermissionProvider> weak_factory_; 44 base::WeakPtrFactory<PermissionProvider> weak_factory_;
45 }; 45 };
46 46
47 #endif // CHROME_BROWSER_USB_WEB_USB_PERMISSION_PROVIDER_H_ 47 #endif // CHROME_BROWSER_USB_WEB_USB_PERMISSION_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/usb/usb_chooser_context_unittest.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