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

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

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/peer_connection_identity_store.cc ('k') | content/renderer/media/rtc_certificate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_certificate.h
diff --git a/content/renderer/media/rtc_certificate.h b/content/renderer/media/rtc_certificate.h
new file mode 100644
index 0000000000000000000000000000000000000000..e858b0b61ba8dc295c01ecd962ec6787596d9402
--- /dev/null
+++ b/content/renderer/media/rtc_certificate.h
@@ -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.
+
+#ifndef CONTENT_RENDERER_MEDIA_RTC_CERTIFICATE_H_
+#define CONTENT_RENDERER_MEDIA_RTC_CERTIFICATE_H_
+
+#include "third_party/WebKit/public/platform/WebRTCCertificate.h"
+#include "third_party/WebKit/public/platform/WebRTCKeyType.h"
+#include "third_party/webrtc/base/rtccertificate.h"
+#include "third_party/webrtc/base/scoped_ref_ptr.h"
+
+namespace content {
+
+// Chromium's WebRTCCertificate implementation; wraps a rtc::scoped_refptr to a
+// rtc::RTCCertificate. This abstraction layer is necessary because blink does
+// not have direct access to the WebRTC stuff.
+class RTCCertificate : public blink::WebRTCCertificate {
+ public:
+ explicit RTCCertificate(
+ const blink::WebRTCKeyType& key_type,
+ const rtc::scoped_refptr<rtc::RTCCertificate>& certificate);
+ ~RTCCertificate() override;
+
+ RTCCertificate* shallowCopy() const override;
+ const blink::WebRTCKeyType& keyType() const override;
+ double expires() const override;
+
+ const rtc::scoped_refptr<rtc::RTCCertificate>*
+ rtcCertificate() const override;
+
+ private:
+ blink::WebRTCKeyType key_type_;
+ rtc::scoped_refptr<rtc::RTCCertificate> certificate_;
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_MEDIA_RTC_CERTIFICATE_H_
« no previous file with comments | « content/renderer/media/peer_connection_identity_store.cc ('k') | content/renderer/media/rtc_certificate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698