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

Unified Diff: chrome/common/extensions/api/dial.idl

Issue 2583853004: [chrome.dial] Adds chrome.dial.fetchDeviceDecription API. (Closed)
Patch Set: Rebase and fix typo. Created 3 years, 11 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
« no previous file with comments | « chrome/browser/extensions/api/dial/dial_registry.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/dial.idl
diff --git a/chrome/common/extensions/api/dial.idl b/chrome/common/extensions/api/dial.idl
index d16fdfd6919ea8af27f36f817f86f8c4d509e738..3df796f1d843adcf65a74113df3b60ca9d1bc794 100644
--- a/chrome/common/extensions/api/dial.idl
+++ b/chrome/common/extensions/api/dial.idl
@@ -21,6 +21,21 @@ namespace dial {
long? configId;
};
+ // Represents a device description resource successfully fetched from a
+ // DIAL device.
+ dictionary DialDeviceDescription {
+
+ // The label of the device that the description was fetched for.
+ DOMString deviceLabel;
+
+ // The contents of the Application-URL header in the response.
+ DOMString appUrl;
+
+ // The content of the response body. This will be an XML document
+ // (hopefully) conforming to section 2.3 of the UPnP spec.
+ DOMString deviceDescription;
+ };
+
enum DialErrorCode {
no_listeners,
no_valid_network_interfaces,
@@ -35,6 +50,7 @@ namespace dial {
};
callback BooleanCallback = void (boolean result);
+ callback DeviceDescriptionCallback = void (DialDeviceDescription result);
interface Functions {
@@ -43,6 +59,17 @@ namespace dial {
// callback is invoked with |true| if discovery was initiated or |false|
// otherwise.
static void discoverNow(BooleanCallback callback);
+
+ // Fetches the device description for the DIAL device identified by
+ // |deviceLabel|. If successful, the callback is invoked with a
+ // DialDeviceDescription containing the content of the device description.
+ //
+ // If unsuccessful, callback is invoked with |null| and lastError is set to
+ // an error message. If the error occurred during the HTTP fetch itself,
+ // the message will begin with "HTTP XXX:" where XXX is the HTTP result
+ // code.
+ static void fetchDeviceDescription(DOMString deviceLabel,
+ DeviceDescriptionCallback callback);
};
interface Events {
« no previous file with comments | « chrome/browser/extensions/api/dial/dial_registry.cc ('k') | chrome/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698