Chromium Code Reviews| 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 9f43c2f3d2de762411ba073813f00a1834bc7992..61f7857c2011592ba06d07b71257594172476b02 100644 |
| --- a/chrome/common/extensions/api/easy_unlock_private.idl |
| +++ b/chrome/common/extensions/api/easy_unlock_private.idl |
| @@ -18,6 +18,9 @@ |
| AES_256_CBC |
| }; |
| + // Type of a permit. |
| + enum PermitType {access, license}; |
|
tbarzic
2014/08/14 17:43:23
other enums are in all caps
xiyuan
2014/08/14 22:09:19
This has to match the enum defined in permit.Permi
|
| + |
| // Options that can be passed to |unwrapSecureMessage| method. |
| dictionary UnwrapSecureMessageOptions { |
| // The data associated with the message. For the message to be succesfully |
| @@ -60,6 +63,38 @@ |
| SignatureType? signType; |
| }; |
| + // A permit record contains the credentials used to request or grant |
| + // authorization of a permit. |
| + dictionary PermitRecord { |
| + // The id of the permit record. |
| + 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; |
| + |
| + // 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; |
| + |
| + // Base64 encoded persistent symmetric key. |
| + DOMString? psk; |
| + }; |
| + |
| // Callback for crypto methods that return a single array buffer. |
| callback DataCallback = void(optional ArrayBuffer data); |
| @@ -73,6 +108,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. |
| // |
| @@ -145,5 +186,31 @@ |
| // |callback|: Called to indicate success or failure. |
| static void seekBluetoothDeviceByAddress(DOMString deviceAddress, |
| 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); |
| + }; |
| + |
| + interface Events { |
| + // Fired when a turn-off flow has finished successfully. |
| + static void onTurnOffFlowFinished(); |
| }; |
| }; |