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

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

Issue 1624573004: Rename webusb_permission_bubble.mojom and move it to //content/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added content_common_mojo_bindings dep back to chrome_browser.gypi 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 2016 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_BUBBLE_H_ 5 #ifndef CHROME_BROWSER_USB_WEB_USB_PERMISSION_REQUEST_H_
6 #define CHROME_BROWSER_USB_WEB_USB_PERMISSION_BUBBLE_H_ 6 #define CHROME_BROWSER_USB_WEB_USB_PERMISSION_REQUEST_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "components/bubble/bubble_reference.h" 11 #include "components/bubble/bubble_reference.h"
12 #include "components/webusb/public/interfaces/webusb_permission_bubble.mojom.h" 12 #include "content/public/common/web_usb_permission_request.mojom.h"
13 #include "mojo/common/weak_binding_set.h" 13 #include "mojo/common/weak_binding_set.h"
14 #include "mojo/public/cpp/bindings/array.h" 14 #include "mojo/public/cpp/bindings/array.h"
15 #include "mojo/public/cpp/bindings/interface_request.h" 15 #include "mojo/public/cpp/bindings/interface_request.h"
16 16
17 namespace content { 17 namespace content {
18 class RenderFrameHost; 18 class RenderFrameHost;
19 } 19 }
20 20
21 namespace device { 21 namespace device {
22 class UsbDevice; 22 class UsbDevice;
23 } 23 }
24 24
25 // Implementation of the public webusb::WebUsbPermissionBubble interface. 25 // Implementation of the public content::WebUsbPermissionRequest interface.
26 // This interface can be used by a webpage to request permission from user 26 // This interface can be used by a webpage to request permission from user
27 // to access a certain device. 27 // to access a certain device.
28 class ChromeWebUsbPermissionBubble : public webusb::WebUsbPermissionBubble { 28 class ChromeWebUsbPermissionRequest : public content::WebUsbPermissionRequest {
29 public: 29 public:
30 explicit ChromeWebUsbPermissionBubble( 30 explicit ChromeWebUsbPermissionRequest(
31 content::RenderFrameHost* render_frame_host); 31 content::RenderFrameHost* render_frame_host);
32 32
33 ~ChromeWebUsbPermissionBubble() override; 33 ~ChromeWebUsbPermissionRequest() override;
34 34
35 // webusb::WebUsbPermissionBubble: 35 // content::WebUsbPermissionRequest:
36 void GetPermission(mojo::Array<device::usb::DeviceFilterPtr> device_filters, 36 void GetPermission(mojo::Array<device::usb::DeviceFilterPtr> device_filters,
37 const GetPermissionCallback& callback) override; 37 const GetPermissionCallback& callback) override;
38 void Bind(mojo::InterfaceRequest<webusb::WebUsbPermissionBubble> request); 38 void Bind(mojo::InterfaceRequest<content::WebUsbPermissionRequest> request);
39 39
40 private: 40 private:
41 content::RenderFrameHost* const render_frame_host_; 41 content::RenderFrameHost* const render_frame_host_;
42 mojo::WeakBindingSet<webusb::WebUsbPermissionBubble> bindings_; 42 mojo::WeakBindingSet<content::WebUsbPermissionRequest> bindings_;
43 std::vector<BubbleReference> bubbles_; 43 std::vector<BubbleReference> bubbles_;
44 44
45 DISALLOW_COPY_AND_ASSIGN(ChromeWebUsbPermissionBubble); 45 DISALLOW_COPY_AND_ASSIGN(ChromeWebUsbPermissionRequest);
46 }; 46 };
47 47
48 #endif // CHROME_BROWSER_USB_WEB_USB_PERMISSION_BUBBLE_H_ 48 #endif // CHROME_BROWSER_USB_WEB_USB_PERMISSION_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698