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

Unified Diff: content/renderer/media/rtc_certificate.cc

Issue 1311853005: RTCCertificate and RTCPeerConnection.generateCertificate added to JavaScript (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Chromium implementation of Blink interfaces. Addressed comments. 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 | « content/renderer/media/rtc_certificate.h ('k') | content/renderer/media/rtc_certificate_generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_certificate.cc
diff --git a/content/renderer/media/rtc_certificate.cc b/content/renderer/media/rtc_certificate.cc
new file mode 100644
index 0000000000000000000000000000000000000000..1ef3072ee0589629b2df446b478ba6963f226e90
--- /dev/null
+++ b/content/renderer/media/rtc_certificate.cc
@@ -0,0 +1,39 @@
+// Copyright (c) 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.
+
+#include "content/renderer/media/rtc_certificate.h"
+
+#include "content/renderer/media/peer_connection_identity_store.h"
+#include "url/gurl.h"
+
+namespace content {
+
+RTCCertificate::RTCCertificate(
+ const blink::WebRTCKeyType& key_type,
+ const rtc::scoped_refptr<rtc::RTCCertificate>& certificate)
+ : key_type_(key_type), certificate_(certificate) {
+ DCHECK(certificate_);
+}
+
+RTCCertificate::~RTCCertificate() {
+}
+
+RTCCertificate* RTCCertificate::shallowCopy() const {
+ return new RTCCertificate(key_type_, certificate_);
+}
+
+const blink::WebRTCKeyType& RTCCertificate::keyType() const {
+ return key_type_;
+}
+
+double RTCCertificate::expires() const {
+ return static_cast<double>(certificate_->expires_timestamp_ns());
+}
+
+const rtc::scoped_refptr<rtc::RTCCertificate>*
+RTCCertificate::rtcCertificate() const {
+ return &certificate_;
+}
+
+} // namespace content
« no previous file with comments | « content/renderer/media/rtc_certificate.h ('k') | content/renderer/media/rtc_certificate_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698