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

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 nits + Pass webkit_tests (updated global-interface-listing-expected.txt) 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..7c8df656052475f411566aed848abfff7721610a
--- /dev/null
+++ b/third_party/WebKit/public/platform/WebRTCCertificate.h
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2015 Google Inc. All rights reserved.
jochen (gone - plz use gerrit) 2015/10/20 12:27:35 please use a short form header
hbos_chromium 2015/10/20 15:42:24 Done.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebRTCCertificate_h
+#define WebRTCCertificate_h
+
+#include "public/platform/WebRTCKeyParams.h"
+
+namespace rtc {
jochen (gone - plz use gerrit) 2015/10/20 12:27:35 blink shouldn't know about rtc
hbos_chromium 2015/10/20 15:42:24 Done.
+class RTCCertificate;
+template<class T>
+class scoped_refptr;
+}
+
+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;
+
+ // Returns a reference to the WebRTC layer version of the certificate. Using a
+ // const reference to a scoped_refptr member variable because the Blink layer
+ // does not have knowledge of the WebRTC class implementations.
+ virtual const rtc::scoped_refptr<rtc::RTCCertificate>& rtcCertificate() 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