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

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

Issue 1232553003: Add new certificateProvider extension API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 5 years, 3 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/common/extensions/api/certificate_provider.idl ('k') | chrome/common/extensions/api/schemas.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..aa179d269709379b93a2d09c8feb718ffc7a9baa
--- /dev/null
+++ b/chrome/common/extensions/api/certificate_provider_internal.idl
@@ -0,0 +1,34 @@
+// 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 backing the chrome.certificateProvider API events.
+// The internal API associates events with replies to these events using request
+// IDs. A custom binding is used to hide these IDs from the public API.
+// Before an event hits the extension, the request ID is removed and instead a
+// callback is added to the event arguments. On the way back, when the extension
+// runs the callback to report its results, the callback magically prepends the
+// request ID to the results and calls the respective internal report function
+// (reportSignature or reportCertificates).
+[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.
+ static void reportCertificates(
+ long requestId,
+ optional certificateProvider.CertificateInfo[] certificates,
+ optional ResultCallback callback);
+ };
+};
+
« no previous file with comments | « chrome/common/extensions/api/certificate_provider.idl ('k') | chrome/common/extensions/api/schemas.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698