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

Unified Diff: Source/platform/mediastream/RTCConfiguration.h

Issue 1311853005: RTCCertificate and RTCPeerConnection.generateCertificate added to JavaScript (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed guidou's 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
Index: Source/platform/mediastream/RTCConfiguration.h
diff --git a/Source/platform/mediastream/RTCConfiguration.h b/Source/platform/mediastream/RTCConfiguration.h
index e64b7f40a7995e18667ee795ae849f4706ed6522..b57d9c238c3bb3361b45734c7e93e624586820fa 100644
--- a/Source/platform/mediastream/RTCConfiguration.h
+++ b/Source/platform/mediastream/RTCConfiguration.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
+ * Copyright (C) 2015 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -33,6 +33,7 @@
#include "platform/heap/Handle.h"
#include "platform/weborigin/KURL.h"
+#include "public/platform/WebRTCCertificate.h"
#include "wtf/PassRefPtr.h"
#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
@@ -82,10 +83,16 @@ enum RTCRtcpMuxPolicy {
RTCRtcpMuxPolicyRequire
};
-class RTCConfiguration final : public GarbageCollected<RTCConfiguration> {
+class RTCConfiguration final : public GarbageCollectedFinalized<RTCConfiguration> {
public:
static RTCConfiguration* create() { return new RTCConfiguration(); }
+ ~RTCConfiguration()
+ {
jochen (gone - plz use gerrit) 2015/09/15 08:04:19 non-trivial dtors shouldn't go into the header
hbos_chromium 2015/09/21 16:12:22 Done. I saw that nearby classes uses PLATFORM_EXPO
+ for (WebRTCCertificate* certificate : m_certificates)
+ delete certificate;
+ }
+
void appendServer(RTCIceServer* server) { m_servers.append(server); }
size_t numberOfServers() { return m_servers.size(); }
RTCIceServer* server(size_t index) { return m_servers[index].get(); }
@@ -95,6 +102,9 @@ public:
RTCBundlePolicy bundlePolicy() { return m_bundlePolicy; }
void setRtcpMuxPolicy(RTCRtcpMuxPolicy rtcpMuxPolicy) { m_rtcpMuxPolicy = rtcpMuxPolicy; }
RTCRtcpMuxPolicy rtcpMuxPolicy() { return m_rtcpMuxPolicy; }
+ void appendCertificate(WebRTCCertificate* certificate) { m_certificates.append(certificate); }
+ size_t numberOfCertificates() const { return m_certificates.size(); }
+ WebRTCCertificate* certificate(size_t index) const { return m_certificates[index]; }
DEFINE_INLINE_TRACE() { visitor->trace(m_servers); }
@@ -108,6 +118,7 @@ private:
RTCIceTransports m_iceTransports;
RTCBundlePolicy m_bundlePolicy;
RTCRtcpMuxPolicy m_rtcpMuxPolicy;
+ Vector<WebRTCCertificate*> m_certificates;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698