diff options
author | juncai <juncai@chromium.org> | 2016-03-14 11:04:30 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-14 18:05:47 +0000 |
commit | 0f6c2ac3d767f8bd859db4cc0bdddaf08a2ffd59 (patch) | |
tree | e5d866cc75c7e5e2542131fec265d508ac7605cf /device | |
parent | 2052a822d87267737a19c85b1e88edb8ec2f7e23 (diff) | |
download | chromium_src-0f6c2ac3d767f8bd859db4cc0bdddaf08a2ffd59.zip chromium_src-0f6c2ac3d767f8bd859db4cc0bdddaf08a2ffd59.tar.gz chromium_src-0f6c2ac3d767f8bd859db4cc0bdddaf08a2ffd59.tar.bz2 |
Rename web_usb_permission_bubble.cc/h and webusb_permission_bubble.mojom
This patch renamed the following three files:
web_usb_permission_bubble.cc/h -> web_usb_chooser_service.cc/h
//components/webusb/public/interfaces/webusb_permission_bubble.mojom ->
//device/usb/public/interfaces/chooser_service.mojom
The previous filenames are misleading and confusing,
since the word "bubble" in the original filename
is a Chrome UI concept, but these files are not UI
related. The new filenames better reflect the
responsibilities and roles of these files.
By moving
//components/webusb/public/interfaces/webusb_permission_bubble.mojom to
//device/usb/public/interfaces/chooser_service.mojom,
it removes the //components dependency of:
//content/renderer/usb/DEPS, the depencency breaks the DEP rule at:
//content/renderer/DEPS
This patch is a follow-up patch for:
https://codereview.chromium.org/1624573004/
The above patch is closed.
BUG=492204, 590268
Review URL: https://codereview.chromium.org/1742753002
Cr-Commit-Position: refs/heads/master@{#381004}
Diffstat (limited to 'device')
-rw-r--r-- | device/usb/public/interfaces/BUILD.gn | 1 | ||||
-rw-r--r-- | device/usb/public/interfaces/chooser_service.mojom | 19 | ||||
-rw-r--r-- | device/usb/usb.gyp | 1 |
3 files changed, 21 insertions, 0 deletions
diff --git a/device/usb/public/interfaces/BUILD.gn b/device/usb/public/interfaces/BUILD.gn index eca5418..7f12a84 100644 --- a/device/usb/public/interfaces/BUILD.gn +++ b/device/usb/public/interfaces/BUILD.gn @@ -6,6 +6,7 @@ import("//mojo/public/tools/bindings/mojom.gni") mojom("interfaces") { sources = [ + "chooser_service.mojom", "device.mojom", "device_manager.mojom", ] diff --git a/device/usb/public/interfaces/chooser_service.mojom b/device/usb/public/interfaces/chooser_service.mojom new file mode 100644 index 0000000..29f130b --- /dev/null +++ b/device/usb/public/interfaces/chooser_service.mojom @@ -0,0 +1,19 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module device.usb; + +import "device.mojom"; +import "device_manager.mojom"; + +interface ChooserService { + // Get permission from user to use the device. + // + // |device_filters| filters the available devices and the filtered + // devices will be listed for user to grant permission. + // + // |result| is the device that user grants permission to use. + GetPermission(array<device.usb.DeviceFilter> device_filters) + => (device.usb.DeviceInfo? result); +}; diff --git a/device/usb/usb.gyp b/device/usb/usb.gyp index a553f57..ef2cf89 100644 --- a/device/usb/usb.gyp +++ b/device/usb/usb.gyp @@ -128,6 +128,7 @@ 'target_name': 'device_usb_mojo_bindings', 'type': 'static_library', 'sources': [ + 'public/interfaces/chooser_service.mojom', 'public/interfaces/device.mojom', 'public/interfaces/device_manager.mojom', ], |