Index: chrome/common/extensions/api/certificate_provider_internal.idl |
diff --git a/chrome/common/extensions/api/certificate_provider_internal.idl b/chrome/common/extensions/api/certificate_provider_internal.idl |
new file mode 100644 |
index 0000000000000000000000000000000000000000..408fd21d743a6c8a0ae0af340ea159f8e5ba686b |
--- /dev/null |
+++ b/chrome/common/extensions/api/certificate_provider_internal.idl |
@@ -0,0 +1,36 @@ |
+// Copyright 2015 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. |
+ |
+// Internal API used to run callbacks passed to chrome.certificateProvider API |
bartfab (slow)
2015/09/03 17:30:54
I somehow find this entire comment block incredibl
pneubeck (no reviews)
2015/09/07 17:21:33
Done.
|
+// events. |
+// When dispatching a chrome.certificateProvider API event, its arguments will |
+// be massaged in custom bindings so a callback is added. The callback uses |
+// chrome.certificateProviderInternal API to report the event results. |
+// In order to identify the event for which the callback is called, the event |
+// is internally dispatched having a requestId argument (which is removed from |
+// the argument list before the event actually reaches the event listeners). The |
+// requestId is forwarded to the chrome.certificateProviderInternal API |
+// functions. |
+[implemented_in = "chrome/browser/extensions/api/certificate_provider/certificate_provider_api.h"] |
+namespace certificateProviderInternal { |
+ callback DoneCallback = void (); |
+ callback ResultCallback = void (ArrayBuffer[] rejectedCertificates); |
+ |
+ interface Functions { |
+ // Matches certificateProvider.SignCallback. Must be called without the |
+ // signature to report an error. |
+ static void reportSignature( |
+ long requestId, |
+ optional ArrayBuffer signature, |
+ optional DoneCallback callback); |
+ |
+ // Matches certificateProvider.CertificatesCallback. Must be called without |
+ // the certificates argument to report an error. |
bartfab (slow)
2015/09/03 17:30:54
It is not documented in certificate_provider.idl t
pneubeck (no reviews)
2015/09/07 17:21:33
That's because you can't. Here certificates is opt
|
+ static void reportCertificates( |
+ long requestId, |
+ optional certificateProvider.CertificateInfo[] certificates, |
+ optional ResultCallback callback); |
+ }; |
+}; |
+ |