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

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

Issue 1735583002: Rename WeakBindingSet/WeakInterfacePtrSet to BindingSet/InterfacePtrSet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 "device/usb/public/interfaces/permission_provider.mojom.h" 10 #include "device/usb/public/interfaces/permission_provider.mojom.h"
11 #include "mojo/public/cpp/bindings/array.h" 11 #include "mojo/public/cpp/bindings/array.h"
12 #include "mojo/public/cpp/bindings/binding_set.h"
12 #include "mojo/public/cpp/bindings/interface_request.h" 13 #include "mojo/public/cpp/bindings/interface_request.h"
13 #include "mojo/public/cpp/bindings/weak_binding_set.h"
14 14
15 namespace content { 15 namespace content {
16 class RenderFrameHost; 16 class RenderFrameHost;
17 } 17 }
18 18
19 // This implementation of the permission provider interface enforces the rules 19 // This implementation of the permission provider interface enforces the rules
20 // of the WebUSB permission model. Devices are checked for WebUSB descriptors 20 // of the WebUSB permission model. Devices are checked for WebUSB descriptors
21 // granting access to the render frame's current origin as well as permission 21 // granting access to the render frame's current origin as well as permission
22 // granted by the user through a device chooser UI. 22 // granted by the user through a device chooser UI.
23 class WebUSBPermissionProvider : public device::usb::PermissionProvider { 23 class WebUSBPermissionProvider : public device::usb::PermissionProvider {
(...skipping 13 matching lines...) Expand all
37 const HasInterfacePermissionCallback& callback) override; 37 const HasInterfacePermissionCallback& callback) override;
38 void HasInterfacePermission( 38 void HasInterfacePermission(
39 uint8_t requested_interface, 39 uint8_t requested_interface,
40 uint8_t configuration_value, 40 uint8_t configuration_value,
41 device::usb::DeviceInfoPtr device, 41 device::usb::DeviceInfoPtr device,
42 const HasInterfacePermissionCallback& callback) override; 42 const HasInterfacePermissionCallback& callback) override;
43 void Bind( 43 void Bind(
44 mojo::InterfaceRequest<device::usb::PermissionProvider> request) override; 44 mojo::InterfaceRequest<device::usb::PermissionProvider> request) override;
45 45
46 private: 46 private:
47 mojo::WeakBindingSet<PermissionProvider> bindings_; 47 mojo::BindingSet<PermissionProvider> bindings_;
48 content::RenderFrameHost* const render_frame_host_; 48 content::RenderFrameHost* const render_frame_host_;
49 }; 49 };
50 50
51 #endif // CHROME_BROWSER_USB_WEB_USB_PERMISSION_PROVIDER_H_ 51 #endif // CHROME_BROWSER_USB_WEB_USB_PERMISSION_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/browser/usb/web_usb_permission_bubble.h ('k') | components/font_service/font_service_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698