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

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

Issue 1408193003: Add chrome side webusb permission UI code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed mac sources from chrome_browser_ui.gypi Created 5 years, 2 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
(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 CHROME_BROWSER_USB_WEB_USB_PERMISSION_BUBBLE_H_
6 #define CHROME_BROWSER_USB_WEB_USB_PERMISSION_BUBBLE_H_
7
8 #include "base/macros.h"
9 #include "components/webusb/public/interfaces/webusb_permission_bubble.mojom.h"
10 #include "third_party/mojo/src/mojo/public/cpp/bindings/array.h"
11 #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
12 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
13
14 namespace content {
15 class RenderFrameHost;
16 }
17
18 // Implementation of the public webusb::WebUsbPermissionBubble interface.
19 // This interface can be used by a webpage to request permission from user
20 // to access a certain device.
21 class ChromeWebUsbPermissionBubble : public webusb::WebUsbPermissionBubble {
22 public:
23 static void Create(
24 content::RenderFrameHost* render_frame_host,
25 mojo::InterfaceRequest<webusb::WebUsbPermissionBubble> request);
26
27 ChromeWebUsbPermissionBubble(
28 content::RenderFrameHost* render_frame_host,
29 mojo::InterfaceRequest<WebUsbPermissionBubble> request);
30
31 ~ChromeWebUsbPermissionBubble() override;
32
33 // webusb::WebUsbPermissionBubble implementation:
34 void GetPermission(mojo::Array<device::usb::DeviceFilterPtr> device_filters,
35 const GetPermissionCallback& callback) override;
36
37 private:
38 content::RenderFrameHost* const render_frame_host_;
39 mojo::StrongBinding<WebUsbPermissionBubble> binding_;
40
41 DISALLOW_COPY_AND_ASSIGN(ChromeWebUsbPermissionBubble);
42 };
43
44 #endif // CHROME_BROWSER_USB_WEB_USB_PERMISSION_BUBBLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698