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

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

Issue 1373023002: RTCCertificate, RTCPeerConnection.generateCertificate (WebRTC JavaScript) added. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make trybots compile (WebRTCCertificate not including wtf/Noncopyable) 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: 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..f933eae491254fdb2520ca78293df94531a1d737
--- /dev/null
+++ b/content/renderer/media/rtc_certificate.h
@@ -0,0 +1,41 @@
+// 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 "base/macros.h"
+#include "third_party/WebKit/public/platform/WebRTCCertificate.h"
+#include "third_party/WebKit/public/platform/WebRTCKeyParams.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 an
+// rtc::RTCCertificate. This abstraction layer is necessary because blink does
+// not have direct access to the WebRTC stuff.
Ryan Sleevi 2015/10/10 04:04:48 comment nit: "stuff" seems a bit... colloquial
hbos_chromium 2015/10/14 13:00:49 Done.
+class RTCCertificate : public blink::WebRTCCertificate {
+ public:
+ RTCCertificate(const blink::WebRTCKeyParams& key_params,
+ const rtc::scoped_refptr<rtc::RTCCertificate>& certificate);
+ ~RTCCertificate() override;
+
+ RTCCertificate* shallowCopy() const override;
+ const blink::WebRTCKeyParams& keyParams() const override;
+ double expires() const override;
+
+ const rtc::scoped_refptr<rtc::RTCCertificate>*
Ryan Sleevi 2015/10/10 04:04:48 Why are you returning a pointer to a scoped pointe
hbos_chromium 2015/10/14 13:00:49 The interface being implemented, blink::WebRTCCert
+ rtcCertificate() const override;
+
+ private:
+ blink::WebRTCKeyParams key_params_;
+ rtc::scoped_refptr<rtc::RTCCertificate> certificate_;
+
+ DISALLOW_COPY_AND_ASSIGN(RTCCertificate);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_MEDIA_RTC_CERTIFICATE_H_

Powered by Google App Engine
This is Rietveld 408576698