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

Side by Side Diff: webrtc/pc/channel.h

Issue 1528843005: Add support for GCM cipher suites from RFC 7714. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Disable GCM if ENABLE_EXTERNAL_AUTH is defined. Created 4 years, 5 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
« no previous file with comments | « webrtc/base/sslstreamadapter_unittest.cc ('k') | webrtc/pc/channel.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 // Only public for unit tests. Otherwise, consider protected. 164 // Only public for unit tests. Otherwise, consider protected.
165 int SetOption(SocketType type, rtc::Socket::Option o, int val) 165 int SetOption(SocketType type, rtc::Socket::Option o, int val)
166 override; 166 override;
167 int SetOption_n(SocketType type, rtc::Socket::Option o, int val); 167 int SetOption_n(SocketType type, rtc::Socket::Option o, int val);
168 168
169 SrtpFilter* srtp_filter() { return &srtp_filter_; } 169 SrtpFilter* srtp_filter() { return &srtp_filter_; }
170 170
171 virtual cricket::MediaType media_type() = 0; 171 virtual cricket::MediaType media_type() = 0;
172 172
173 bool SetCryptoOptions(const rtc::CryptoOptions& crypto_options);
174
173 protected: 175 protected:
174 virtual MediaChannel* media_channel() const { return media_channel_; } 176 virtual MediaChannel* media_channel() const { return media_channel_; }
175 // Sets the |transport_channel_| (and |rtcp_transport_channel_|, if |rtcp_| is 177 // Sets the |transport_channel_| (and |rtcp_transport_channel_|, if |rtcp_| is
176 // true). Gets the transport channels from |transport_controller_|. 178 // true). Gets the transport channels from |transport_controller_|.
177 bool SetTransport_n(const std::string& transport_name); 179 bool SetTransport_n(const std::string& transport_name);
178 180
179 void SetTransportChannel_n(TransportChannel* transport); 181 void SetTransportChannel_n(TransportChannel* transport);
180 void SetRtcpTransportChannel_n(TransportChannel* transport, 182 void SetRtcpTransportChannel_n(TransportChannel* transport,
181 bool update_writablity); 183 bool update_writablity);
182 184
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 std::string* error_desc); 298 std::string* error_desc);
297 void ActivateRtcpMux_n(); 299 void ActivateRtcpMux_n();
298 bool SetRtcpMux_n(bool enable, 300 bool SetRtcpMux_n(bool enable,
299 ContentAction action, 301 ContentAction action,
300 ContentSource src, 302 ContentSource src,
301 std::string* error_desc); 303 std::string* error_desc);
302 304
303 // From MessageHandler 305 // From MessageHandler
304 void OnMessage(rtc::Message* pmsg) override; 306 void OnMessage(rtc::Message* pmsg) override;
305 307
308 const rtc::CryptoOptions& crypto_options() const {
309 return crypto_options_;
310 }
311
306 // Handled in derived classes 312 // Handled in derived classes
307 // Get the SRTP crypto suites to use for RTP media 313 // Get the SRTP crypto suites to use for RTP media
308 virtual void GetSrtpCryptoSuites_n(std::vector<int>* crypto_suites) const = 0; 314 virtual void GetSrtpCryptoSuites_n(std::vector<int>* crypto_suites) const = 0;
309 virtual void OnConnectionMonitorUpdate(ConnectionMonitor* monitor, 315 virtual void OnConnectionMonitorUpdate(ConnectionMonitor* monitor,
310 const std::vector<ConnectionInfo>& infos) = 0; 316 const std::vector<ConnectionInfo>& infos) = 0;
311 317
312 // Helper function for invoking bool-returning methods on the worker thread. 318 // Helper function for invoking bool-returning methods on the worker thread.
313 template <class FunctorT> 319 template <class FunctorT>
314 bool InvokeOnWorker(const rtc::Location& posted_from, 320 bool InvokeOnWorker(const rtc::Location& posted_from,
315 const FunctorT& functor) { 321 const FunctorT& functor) {
(...skipping 28 matching lines...) Expand all
344 SrtpFilter srtp_filter_; 350 SrtpFilter srtp_filter_;
345 RtcpMuxFilter rtcp_mux_filter_; 351 RtcpMuxFilter rtcp_mux_filter_;
346 BundleFilter bundle_filter_; 352 BundleFilter bundle_filter_;
347 bool rtp_ready_to_send_; 353 bool rtp_ready_to_send_;
348 bool rtcp_ready_to_send_; 354 bool rtcp_ready_to_send_;
349 bool writable_; 355 bool writable_;
350 bool was_ever_writable_; 356 bool was_ever_writable_;
351 bool has_received_packet_; 357 bool has_received_packet_;
352 bool dtls_keyed_; 358 bool dtls_keyed_;
353 bool secure_required_; 359 bool secure_required_;
360 rtc::CryptoOptions crypto_options_;
354 int rtp_abs_sendtime_extn_id_; 361 int rtp_abs_sendtime_extn_id_;
355 362
356 // MediaChannel related members that should be access from worker thread. 363 // MediaChannel related members that should be access from worker thread.
357 MediaChannel* const media_channel_; 364 MediaChannel* const media_channel_;
358 // Currently enabled_ flag accessed from signaling thread too, but it can 365 // Currently enabled_ flag accessed from signaling thread too, but it can
359 // be changed only when signaling thread does sunchronious call to worker 366 // be changed only when signaling thread does sunchronious call to worker
360 // thread, so it should be safe. 367 // thread, so it should be safe.
361 bool enabled_; 368 bool enabled_;
362 std::vector<StreamParams> local_streams_; 369 std::vector<StreamParams> local_streams_;
363 std::vector<StreamParams> remote_streams_; 370 std::vector<StreamParams> remote_streams_;
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 // SetSendParameters. 687 // SetSendParameters.
681 DataSendParameters last_send_params_; 688 DataSendParameters last_send_params_;
682 // Last DataRecvParameters sent down to the media_channel() via 689 // Last DataRecvParameters sent down to the media_channel() via
683 // SetRecvParameters. 690 // SetRecvParameters.
684 DataRecvParameters last_recv_params_; 691 DataRecvParameters last_recv_params_;
685 }; 692 };
686 693
687 } // namespace cricket 694 } // namespace cricket
688 695
689 #endif // WEBRTC_PC_CHANNEL_H_ 696 #endif // WEBRTC_PC_CHANNEL_H_
OLDNEW
« no previous file with comments | « webrtc/base/sslstreamadapter_unittest.cc ('k') | webrtc/pc/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698