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

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

Issue 475483003: Wire easy unlock settings UI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | extensions/browser/extension_function_histogram_value.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/easy_unlock_private.idl
diff --git a/chrome/common/extensions/api/easy_unlock_private.idl b/chrome/common/extensions/api/easy_unlock_private.idl
index 32e6410d7b3015a7ad7d02e60017754c8a4a6be4..1648853257bfe8f14e563310b27b8da1a45a652b 100644
--- a/chrome/common/extensions/api/easy_unlock_private.idl
+++ b/chrome/common/extensions/api/easy_unlock_private.idl
@@ -44,6 +44,9 @@
AUTHENTICATED
};
+ // Type of a permit. All lower case to match permit.PermitRecord.Type.
+ enum PermitType {access, license};
+
// Options that can be passed to |unwrapSecureMessage| method.
dictionary UnwrapSecureMessageOptions {
// The data associated with the message. For the message to be succesfully
@@ -86,6 +89,39 @@
SignatureType? signType;
};
+ // A permit record contains the credentials used to request or grant
+ // authorization of a permit.
+ dictionary PermitRecord {
+ // ID of the permit, which identifies the service/application that these
+ // permit records are used in.
+ DOMString permitId;
+
+ // An identifier for this record that should be unique among all other
+ // records of the same permit.
+ DOMString id;
+
+ // Type of the record.
+ PermitType type;
+
+ // Websafe base64 encoded payload data of the record.
+ DOMString data;
+ };
+
+ // Device information that can be authenticated for Easy unlock.
+ dictionary Device {
+ // The Bluetooth address of the device.
+ DOMString bluetoothAddress;
+
+ // The name of the device.
+ DOMString? name;
+
+ // The permit record of the device.
+ PermitRecord? permitRecord;
+
+ // Websafe base64 encoded persistent symmetric key.
+ DOMString? psk;
+ };
+
// Callback for crypto methods that return a single array buffer.
callback DataCallback = void(optional ArrayBuffer data);
@@ -99,6 +135,12 @@
callback KeyPairCallback = void(optional ArrayBuffer public_key,
optional ArrayBuffer private_key);
+ // Callback for the getPermitAccess() method.
+ callback GetPermitAccessCallback = void(optional PermitRecord permitAccess);
+
+ // Callback for the getRemoteDevices() method.
+ callback GetRemoteDevicesCallback = void(Device[] devices);
+
interface Functions {
// Gets localized strings required to render the API.
//
@@ -175,5 +217,26 @@
// Updates the screenlock state to reflect the Easy Unlock app state.
static void updateScreenlockState(State state,
optional EmptyCallback callback);
+
+ // Saves the permit record for the local device.
+ // |permitAccess|: The permit record to be saved.
+ // |callback|: Called to indicate success or failure.
+ static void setPermitAccess(PermitRecord permitAccess,
+ optional EmptyCallback callback);
+
+ // Gets the permit record for the local device.
+ static void getPermitAccess(GetPermitAccessCallback callback);
+
+ // Clears the permit record for the local device.
+ static void clearPermitAccess(optional EmptyCallback callback);
+
+ // Saves the remote device list.
+ // |devices|: The list of remote devices to be saved.
+ // |callback|: Called to indicate success or failure.
+ static void setRemoteDevices(Device[] devices,
+ optional EmptyCallback callback);
+
+ // Gets the remote device list.
+ static void getRemoteDevices(GetRemoteDevicesCallback callback);
};
};
« no previous file with comments | « chrome/chrome_browser_ui.gypi ('k') | extensions/browser/extension_function_histogram_value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698