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

Side by Side Diff: device/devices_app/usb/public/interfaces/device_manager.mojom

Issue 1342663003: Pass full Mojo USB DeviceInfo object with removal notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 module device.usb; 5 module device.usb;
6 6
7 import "device.mojom"; 7 import "device.mojom";
8 8
9 enum OpenDeviceError { 9 enum OpenDeviceError {
10 // Opening the device succeeded. 10 // Opening the device succeeded.
(...skipping 22 matching lines...) Expand all
33 bool has_protocol_code; 33 bool has_protocol_code;
34 uint8 protocol_code; 34 uint8 protocol_code;
35 }; 35 };
36 36
37 struct EnumerationOptions { 37 struct EnumerationOptions {
38 array<DeviceFilter>? filters; 38 array<DeviceFilter>? filters;
39 }; 39 };
40 40
41 struct DeviceChangeNotification { 41 struct DeviceChangeNotification {
42 array<DeviceInfo> devices_added; 42 array<DeviceInfo> devices_added;
43 array<string> devices_removed; 43 array<DeviceInfo> devices_removed;
44 }; 44 };
45 45
46 interface DeviceManager { 46 interface DeviceManager {
47 // Retrieves information about all devices available to the DeviceManager 47 // Retrieves information about all devices available to the DeviceManager
48 // implementation. 48 // implementation.
49 GetDevices(EnumerationOptions? options) => (array<DeviceInfo> results); 49 GetDevices(EnumerationOptions? options) => (array<DeviceInfo> results);
50 50
51 // Retrieves information about changes to the set of devices available to the 51 // Retrieves information about changes to the set of devices available to the
52 // DeviceManager since the last call to this method. A device that is added 52 // DeviceManager since the last call to this method. A device that is added
53 // and removed between calls will not be included. 53 // and removed between calls will not be included.
54 GetDeviceChanges() => (DeviceChangeNotification changes); 54 GetDeviceChanges() => (DeviceChangeNotification changes);
55 55
56 // Attempts to open a device given its GUID. 56 // Attempts to open a device given its GUID.
57 OpenDevice(string guid, Device& device_request) => (OpenDeviceError error); 57 OpenDevice(string guid, Device& device_request) => (OpenDeviceError error);
58 }; 58 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698