Chromium Code Reviews| Index: chrome/common/extensions/api/enterprise_platform_keys.json |
| diff --git a/chrome/common/extensions/api/enterprise_platform_keys.json b/chrome/common/extensions/api/enterprise_platform_keys.json |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..85533b1aa85b31c1dcef0173eab86cc9f5fe9bac |
| --- /dev/null |
| +++ b/chrome/common/extensions/api/enterprise_platform_keys.json |
| @@ -0,0 +1,115 @@ |
| +// Copyright 2014 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. |
| + |
| +[{ |
|
not at google - send to devlin
2014/05/02 18:31:56
why is this JSON while the other is IDL?
pneubeck (no reviews)
2014/05/05 20:09:35
I preferred IDL over JSON. However, I feared that
|
| + "namespace" : "enterprise.platformKeys", |
| + "description" : "none", |
| + "platforms" : ["chromeos"], |
| + "types" :[ |
| + { |
| + "id" : "Token", |
| + "type" : "object", |
| + "properties" : { |
| + "id" : {"type" : "string"}, |
| + "subtleCrypto" : { |
| + "$ref" : "SubtleCrypto", |
| + "description" : "SubtleCrypto backed by platform's TPM", |
| + "nocompile" : true |
| + } |
| + } |
| + }, |
| + { |
| + "id" : "SubtleCrypto", |
|
not at google - send to devlin
2014/05/02 18:31:56
SubtleCrypto is something that's supposed to be de
pneubeck (no reviews)
2014/05/05 20:09:35
Is there a canonical way to declare this as a refe
not at google - send to devlin
2014/05/05 21:09:24
isInstanceOf should do it, which in IDL is instanc
|
| + "type" : "object", |
| + "properties" : { |
| + "generateKey" : { |
| + "type" : "function", |
| + "parameters" : [{ |
| + "name" : "algorithm", |
| + "type" : "object", |
| + "properties" : {} |
| + }] |
| + } |
| + } |
| + } |
| + ], |
| + "properties" : {}, |
| + "functions" :[ |
| + { |
| + "name" : "getTokens", |
| + "type" : "function", |
| + "description" : "Gets all available Tokens.", |
| + "nocompile" : true, |
| + "parameters" : [{ |
| + "name" : "callback", |
| + "type" : "function", |
| + "description" : "Callback to which the available Tokens are passed.", |
| + "parameters" : [{ |
| + "name" : "tokens", |
| + "type" : "array", |
| + "items" : {"$ref" : "Token"} |
| + }] |
| + }] |
| + }, |
| + { |
| + "name" : "getCertificates", |
| + "type" : "function", |
| + "description" : "Gets all certificates of the provided token.", |
| + "parameters" :[ |
| + {"name" : "tokenId", "type" : "string"}, |
| + { |
| + "name" : "callback", |
| + "type" : "function", |
| + "description" : "Callback to which the certificates are passed.", |
| + "parameters" : [{ |
| + "name" : "certificates", |
| + "type" : "array", |
| + "items" : |
| + {"type" : "binary", "isInstanceOf" : "ArrayBuffer"} |
| + }] |
| + } |
| + ] |
| + }, |
| + { |
| + "name" : "importCertificate", |
| + "type" : "function", |
| + "description" : "Import a certificate", |
| + "parameters" :[ |
| + {"name" : "tokenId", "type" : "string"}, |
| + { |
| + "name" : "certificate", |
| + "type" : "binary", |
| + "isInstanceOf" : "ArrayBuffer" |
| + }, |
| + { |
| + "name" : "callback", |
| + "type" : "function", |
| + "description" : "Called when the import is done.", |
| + "optional" : true, |
| + "parameters" : [] |
| + } |
| + ] |
| + }, |
| + { |
| + "name" : "removeCertificate", |
| + "type" : "function", |
| + "description" : "Remove a certificate", |
| + "parameters" :[ |
| + {"name" : "tokenId", "type" : "string"}, |
| + { |
| + "name" : "certificate", |
| + "type" : "binary", |
| + "isInstanceOf" : "ArrayBuffer" |
| + }, |
| + { |
| + "name" : "callback", |
| + "type" : "function", |
| + "description" : "Called when the removal is done.", |
| + "optional" : true, |
| + "parameters" : [] |
| + } |
| + ] |
| + } |
| + ] |
| +}] |