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

Unified Diff: third_party/WebKit/public/platform/WebRTCCertificate.h

Issue 1373023002: RTCCertificate, RTCPeerConnection.generateCertificate (WebRTC JavaScript) added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed jochen's comments Created 5 years, 2 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/public/platform/WebRTCCertificate.h
diff --git a/third_party/WebKit/public/platform/WebRTCCertificate.h b/third_party/WebKit/public/platform/WebRTCCertificate.h
new file mode 100644
index 0000000000000000000000000000000000000000..6e66a26ad99d41f4c7f8f9f6181aa170fe20acef
--- /dev/null
+++ b/third_party/WebKit/public/platform/WebRTCCertificate.h
@@ -0,0 +1,40 @@
+// 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.
+
+#ifndef WebRTCCertificate_h
+#define WebRTCCertificate_h
+
+#include "public/platform/WebRTCKeyParams.h"
+
+namespace blink {
+
+// WebRTCCertificate is an interface defining what Blink needs to know about certificates,
+// hiding Chromium and WebRTC layer implementation details. It is possible to create
+// shallow copies of the WebRTCCertificate. When all copies are destroyed, the
+// implementation specific data must be freed. WebRTCCertificate objects thus act as
+// references to the reference counted internal data.
+class WebRTCCertificate {
+public:
+ WebRTCCertificate() = default;
+ virtual ~WebRTCCertificate() = default;
+
+ // Copies the WebRTCCertificate object without copying the underlying implementation
+ // specific (WebRTC layer) certificate. When all copies are destroyed the underlying
+ // data is freed.
+ virtual WebRTCCertificate* shallowCopy() const = 0;
+
+ virtual const WebRTCKeyParams& keyParams() const = 0;
+
+ // The date and time after which the certificate should be considered invalid.
+ // Expressed in time since 1970-01-01T00:00:00Z in milliseconds.
+ virtual double expires() const = 0;
+
+private:
+ WebRTCCertificate(const WebRTCCertificate&) = delete;
+ WebRTCCertificate& operator=(const WebRTCCertificate&) = delete;
+};
+
+} // namespace blink
+
+#endif // WebRTCCertificate_h

Powered by Google App Engine
This is Rietveld 408576698