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

Side by Side Diff: chrome/browser/android/usb/web_usb_chooser_service_android.cc

Issue 1739523002: WebUsb Android chooser UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address reillgy@'s comments Created 4 years, 9 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 2016 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 #include "chrome/browser/android/usb/web_usb_chooser_service_android.h"
6
7 #include <utility>
8
9 #include "chrome/browser/ui/android/usb_chooser_android.h"
10 #include "content/public/browser/browser_thread.h"
11
12 WebUsbChooserServiceAndroid::WebUsbChooserServiceAndroid(
13 content::RenderFrameHost* render_frame_host)
14 : render_frame_host_(render_frame_host) {
15 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
16 DCHECK(render_frame_host_);
17 }
18
19 WebUsbChooserServiceAndroid::~WebUsbChooserServiceAndroid() {}
20
21 void WebUsbChooserServiceAndroid::GetPermission(
22 mojo::Array<device::usb::DeviceFilterPtr> device_filters,
23 const GetPermissionCallback& callback) {
24 usb_chooser_android_.reset(new UsbChooserAndroid(
Reilly Grant (use Gerrit) 2016/03/04 20:53:39 Never mind. This is already explicitly owned here
juncai 2016/03/05 00:18:24 Now WebUsbChooserServiceAndroid has a std::vector<
25 std::move(device_filters), render_frame_host_, callback));
26 }
27
28 void WebUsbChooserServiceAndroid::Bind(
29 mojo::InterfaceRequest<device::usb::ChooserService> request) {
30 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
31 bindings_.AddBinding(this, std::move(request));
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698