blob: aa179d269709379b93a2d09c8feb718ffc7a9baa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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);
};
};
|