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

Unified Diff: chrome/browser/ui/webui/usb_internals/usb_internals.mojom

Issue 2204713006: Add chrome://usb-internals page for adding and removing test devices. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/usb_internals/usb_internals.mojom
diff --git a/chrome/browser/ui/webui/usb_internals/usb_internals.mojom b/chrome/browser/ui/webui/usb_internals/usb_internals.mojom
new file mode 100644
index 0000000000000000000000000000000000000000..2614565a2c6590468f5e16a7b54863c168aa3b1a
--- /dev/null
+++ b/chrome/browser/ui/webui/usb_internals/usb_internals.mojom
@@ -0,0 +1,27 @@
+// Copyright 2016 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 mojom;
+
+struct TestDeviceInfo {
+ string guid;
+ string name;
+ string serial_number;
+ string landing_page;
+ string allowed_origin;
+};
+
+interface UsbInternalsPageHandler {
+ // Simulate the connection of a new device with the given properties.
+ AddDeviceForTesting(string name,
+ string serial_number,
+ string landing_page,
+ string allowed_origin) => (bool success, string message);
dpapad 2016/08/04 20:55:34 Ideally we would want the Promise that JS holds to
Reilly Grant (use Gerrit) 2016/08/05 01:30:55 There is not, because it doesn't translate well to
+
+ // Simulate the disconnection of a device added with the function above.
+ RemoveDeviceForTesting(string guid) => ();
dpapad 2016/08/04 20:55:34 It is not clear where the guid is found. Based on
Reilly Grant (use Gerrit) 2016/08/05 01:30:55 It simplifies the JS code if it doesn't have to ha
+
+ // Retrieves the list of test devices added with this API.
+ GetTestDevices() => (array<TestDeviceInfo> devices);
+};

Powered by Google App Engine
This is Rietveld 408576698