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

Unified Diff: third_party/WebKit/Source/modules/peerconnection/RTCCertificate.h

Issue 2828563002: RTCCertificate.getFingerprints added (exposed to the web) (Closed)
Patch Set: Created 3 years, 8 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
Index: third_party/WebKit/Source/modules/peerconnection/RTCCertificate.h
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.h b/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.h
index 837ff114825262c9a5435341d13c46490ccb5816..2a00b62161bd86af5810f05afb0cdba4bc6a00ca 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.h
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.h
@@ -34,12 +34,19 @@
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/dom/DOMTimeStamp.h"
#include "modules/ModulesExport.h"
+#include "modules/peerconnection/RTCDtlsFingerprint.h"
#include "platform/heap/GarbageCollected.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
#include "public/platform/WebRTCCertificate.h"
+#include "v8/include/v8.h"
+
#include <memory>
namespace blink {
+class ScriptState;
+
class MODULES_EXPORT RTCCertificate final
: public GarbageCollectedFinalized<RTCCertificate>,
public ScriptWrappable {
@@ -57,9 +64,17 @@ class MODULES_EXPORT RTCCertificate final
// Returns the expiration time in ms relative to epoch, 1970-01-01T00:00:00Z.
DOMTimeStamp expires() const;
+ // Returns "FrozenArray<RTCDtlsFingerprint>" as per IDL. Because
+ // |RTCDtlsFingerprint| is a dictionary type, vectors of
+ // |RTCDtlsFingerprint| are not allowed (due to
+ // |DISALLOW_NEW_EXCEPT_PLACEMENT_NEW|). |toV8| is used to convert the
+ // |RTCDtlsFingerprint| objects to |v8::Value|s which can populate vectors.
+ Vector<v8::Local<v8::Value>> fingerprints(ScriptState*);
private:
std::unique_ptr<WebRTCCertificate> certificate_;
+ // Cache for the result of |fingerprints|.
+ Vector<v8::Global<v8::Value>> fingerprints_;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698