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

Unified Diff: third_party/WebKit/public/platform/WebRTCConfiguration.h

Issue 2415673003: Merge RTCConfiguration into WebRTCConfiguration (Closed)
Patch Set: headers, kConstants Created 4 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/WebRTCConfiguration.h
diff --git a/third_party/WebKit/public/platform/WebRTCConfiguration.h b/third_party/WebKit/public/platform/WebRTCConfiguration.h
index 61954c170dffb199b9d339c5c536471c92a13681..805404893402f6e67c3c27b3a09e6598e5cad000 100644
--- a/third_party/WebKit/public/platform/WebRTCConfiguration.h
+++ b/third_party/WebKit/public/platform/WebRTCConfiguration.h
@@ -32,96 +32,34 @@
#define WebRTCConfiguration_h
#include "WebCommon.h"
-#include "WebNonCopyable.h"
-#include "WebPrivatePtr.h"
+#include "WebRTCCertificate.h"
+#include "WebURL.h"
#include "WebVector.h"
+#include <memory>
+
namespace blink {
-class RTCIceServer;
-class RTCConfiguration;
-class WebRTCCertificate;
class WebString;
-class WebURL;
-
-class WebRTCICEServer {
- public:
- WebRTCICEServer() {}
- WebRTCICEServer(const WebRTCICEServer& other) { assign(other); }
- ~WebRTCICEServer() { reset(); }
-
- WebRTCICEServer& operator=(const WebRTCICEServer& other) {
- assign(other);
- return *this;
- }
-
- BLINK_PLATFORM_EXPORT void assign(const WebRTCICEServer&);
-
- BLINK_PLATFORM_EXPORT void reset();
- bool isNull() const { return m_private.isNull(); }
- BLINK_PLATFORM_EXPORT WebURL uri() const;
- BLINK_PLATFORM_EXPORT WebString username() const;
- BLINK_PLATFORM_EXPORT WebString credential() const;
-
-#if INSIDE_BLINK
- BLINK_PLATFORM_EXPORT WebRTCICEServer(RTCIceServer*);
-#endif
-
- private:
- WebPrivatePtr<RTCIceServer> m_private;
+struct WebRTCIceServer {
+ WebURL url;
+ WebString username;
+ WebString credential;
};
-enum WebRTCIceTransports {
- WebRTCIceTransportsNone,
- WebRTCIceTransportsRelay,
- WebRTCIceTransportsAll
-};
-
-enum WebRTCBundlePolicy {
- WebRTCBundlePolicyBalanced,
- WebRTCBundlePolicyMaxCompat,
- WebRTCBundlePolicyMaxBundle
-};
-
-enum WebRTCRtcpMuxPolicy {
- WebRTCRtcpMuxPolicyNegotiate,
- WebRTCRtcpMuxPolicyRequire
-};
-
-class WebRTCConfiguration {
- public:
- WebRTCConfiguration() {}
- WebRTCConfiguration(const WebRTCConfiguration& other) { assign(other); }
- ~WebRTCConfiguration() { reset(); }
-
- WebRTCConfiguration& operator=(const WebRTCConfiguration& other) {
- assign(other);
- return *this;
- }
-
- BLINK_PLATFORM_EXPORT void assign(const WebRTCConfiguration&);
-
- BLINK_PLATFORM_EXPORT void reset();
- bool isNull() const { return m_private.isNull(); }
-
- BLINK_PLATFORM_EXPORT WebRTCIceTransports iceTransports() const;
-
- BLINK_PLATFORM_EXPORT WebRTCBundlePolicy bundlePolicy() const;
-
- BLINK_PLATFORM_EXPORT WebRTCRtcpMuxPolicy rtcpMuxPolicy() const;
- BLINK_PLATFORM_EXPORT size_t numberOfServers() const;
- BLINK_PLATFORM_EXPORT WebRTCICEServer server(size_t index) const;
+enum class WebRTCIceTransports { kNone, kRelay, kAll };
- BLINK_PLATFORM_EXPORT size_t numberOfCertificates() const;
- BLINK_PLATFORM_EXPORT WebRTCCertificate* certificate(size_t index) const;
+enum class WebRTCBundlePolicy { kBalanced, kMaxCompat, kMaxBundle };
-#if INSIDE_BLINK
- BLINK_PLATFORM_EXPORT WebRTCConfiguration(RTCConfiguration*);
-#endif
+enum class WebRTCRtcpMuxPolicy { kNegotiate, kRequire };
- private:
- WebPrivatePtr<RTCConfiguration> m_private;
+struct WebRTCConfiguration {
+ WebVector<WebRTCIceServer> iceServers;
+ WebRTCIceTransports iceTransports = WebRTCIceTransports::kAll;
+ WebRTCBundlePolicy bundlePolicy = WebRTCBundlePolicy::kBalanced;
+ WebRTCRtcpMuxPolicy rtcpMuxPolicy = WebRTCRtcpMuxPolicy::kNegotiate;
+ WebVector<std::unique_ptr<WebRTCCertificate>> certificates;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698