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

Side by Side Diff: Source/platform/mediastream/RTCConfiguration.h

Issue 1315413004: Enable generation of local host candidate. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 , m_username(username) 58 , m_username(username)
59 , m_credential(credential) 59 , m_credential(credential)
60 { 60 {
61 } 61 }
62 62
63 KURL m_uri; 63 KURL m_uri;
64 String m_username; 64 String m_username;
65 String m_credential; 65 String m_credential;
66 }; 66 };
67 67
68 class RTCIceServerArray final : public GarbageCollectedFinalized<RTCIceServerArr ay> {
69 public:
70 static RTCIceServerArray* create()
71 {
72 return new RTCIceServerArray();
73 }
74
75 void appendServer(RTCIceServer* server) { m_servers.append(server); }
76 size_t numberOfServers() { return m_servers.size(); }
77 RTCIceServer* server(size_t index) { return m_servers[index].get(); }
78
79 DEFINE_INLINE_TRACE() { visitor->trace(m_servers); }
80
81 private:
82 HeapVector<Member<RTCIceServer>> m_servers;
83 };
84
68 enum RTCIceTransports { 85 enum RTCIceTransports {
69 RTCIceTransportsNone, 86 RTCIceTransportsNone,
70 RTCIceTransportsRelay, 87 RTCIceTransportsRelay,
71 RTCIceTransportsAll 88 RTCIceTransportsAll
72 }; 89 };
73 90
74 enum RTCBundlePolicy { 91 enum RTCBundlePolicy {
75 RTCBundlePolicyBalanced, 92 RTCBundlePolicyBalanced,
76 RTCBundlePolicyMaxCompat, 93 RTCBundlePolicyMaxCompat,
77 RTCBundlePolicyMaxBundle 94 RTCBundlePolicyMaxBundle
78 }; 95 };
79 96
80 enum RTCRtcpMuxPolicy { 97 enum RTCRtcpMuxPolicy {
81 RTCRtcpMuxPolicyNegotiate, 98 RTCRtcpMuxPolicyNegotiate,
82 RTCRtcpMuxPolicyRequire 99 RTCRtcpMuxPolicyRequire
83 }; 100 };
84 101
85 class RTCConfiguration final : public GarbageCollected<RTCConfiguration> { 102 class RTCConfiguration final : public GarbageCollected<RTCConfiguration> {
86 public: 103 public:
87 static RTCConfiguration* create() { return new RTCConfiguration(); } 104 static RTCConfiguration* create() { return new RTCConfiguration(); }
88 105
89 void appendServer(RTCIceServer* server) { m_servers.append(server); }
90 size_t numberOfServers() { return m_servers.size(); }
91 RTCIceServer* server(size_t index) { return m_servers[index].get(); }
92 void setIceTransports(RTCIceTransports iceTransports) { m_iceTransports = ic eTransports; } 106 void setIceTransports(RTCIceTransports iceTransports) { m_iceTransports = ic eTransports; }
93 RTCIceTransports iceTransports() { return m_iceTransports; } 107 RTCIceTransports iceTransports() { return m_iceTransports; }
94 void setBundlePolicy(RTCBundlePolicy bundlePolicy) { m_bundlePolicy = bundle Policy; } 108 void setBundlePolicy(RTCBundlePolicy bundlePolicy) { m_bundlePolicy = bundle Policy; }
95 RTCBundlePolicy bundlePolicy() { return m_bundlePolicy; } 109 RTCBundlePolicy bundlePolicy() { return m_bundlePolicy; }
96 void setRtcpMuxPolicy(RTCRtcpMuxPolicy rtcpMuxPolicy) { m_rtcpMuxPolicy = rt cpMuxPolicy; } 110 void setRtcpMuxPolicy(RTCRtcpMuxPolicy rtcpMuxPolicy) { m_rtcpMuxPolicy = rt cpMuxPolicy; }
97 RTCRtcpMuxPolicy rtcpMuxPolicy() { return m_rtcpMuxPolicy; } 111 RTCRtcpMuxPolicy rtcpMuxPolicy() { return m_rtcpMuxPolicy; }
112 void setIceServers(RTCIceServerArray* iceServers) { m_iceServers = iceServer s; }
113 RTCIceServerArray* iceServers() { return m_iceServers.get(); }
98 114
99 DEFINE_INLINE_TRACE() { visitor->trace(m_servers); } 115 DEFINE_INLINE_TRACE() { visitor->trace(m_iceServers); }
100 116
101 private: 117 private:
102 RTCConfiguration() : 118 RTCConfiguration()
103 m_iceTransports(RTCIceTransportsAll), 119 : m_iceTransports(RTCIceTransportsAll)
104 m_bundlePolicy(RTCBundlePolicyBalanced), 120 , m_bundlePolicy(RTCBundlePolicyBalanced)
105 m_rtcpMuxPolicy(RTCRtcpMuxPolicyNegotiate) { } 121 , m_rtcpMuxPolicy(RTCRtcpMuxPolicyNegotiate)
122 {
123 }
106 124
107 HeapVector<Member<RTCIceServer>> m_servers; 125 Member<RTCIceServerArray> m_iceServers;
108 RTCIceTransports m_iceTransports; 126 RTCIceTransports m_iceTransports;
109 RTCBundlePolicy m_bundlePolicy; 127 RTCBundlePolicy m_bundlePolicy;
110 RTCRtcpMuxPolicy m_rtcpMuxPolicy; 128 RTCRtcpMuxPolicy m_rtcpMuxPolicy;
111 }; 129 };
112 130
113 } // namespace blink 131 } // namespace blink
114 132
115 #endif // RTCConfiguration_h 133 #endif // RTCConfiguration_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698