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

Side by Side Diff: content/renderer/media/rtc_peer_connection_handler.h

Issue 396193005: Converts RTCOfferOptions to constriants in the glue code for createOffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix sync Created 6 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_
6 #define CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ 6 #define CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "content/renderer/media/webrtc/media_stream_track_metrics.h" 15 #include "content/renderer/media/webrtc/media_stream_track_metrics.h"
16 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h" 16 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h"
17 #include "third_party/WebKit/public/platform/WebRTCStatsRequest.h" 17 #include "third_party/WebKit/public/platform/WebRTCStatsRequest.h"
18 #include "third_party/WebKit/public/platform/WebRTCStatsResponse.h" 18 #include "third_party/WebKit/public/platform/WebRTCStatsResponse.h"
19 19
20 namespace blink { 20 namespace blink {
21 class WebFrame; 21 class WebFrame;
22 class WebRTCDataChannelHandler; 22 class WebRTCDataChannelHandler;
23 class WebRTCOfferOptions;
23 } 24 }
24 25
25 namespace content { 26 namespace content {
26 27
27 class PeerConnectionDependencyFactory; 28 class PeerConnectionDependencyFactory;
28 class PeerConnectionTracker; 29 class PeerConnectionTracker;
29 class RemoteMediaStreamImpl; 30 class RemoteMediaStreamImpl;
31 class RTCMediaConstraints;
30 class WebRtcMediaStreamAdapter; 32 class WebRtcMediaStreamAdapter;
31 33
32 // Mockable wrapper for blink::WebRTCStatsResponse 34 // Mockable wrapper for blink::WebRTCStatsResponse
33 class CONTENT_EXPORT LocalRTCStatsResponse 35 class CONTENT_EXPORT LocalRTCStatsResponse
34 : public NON_EXPORTED_BASE(talk_base::RefCountInterface) { 36 : public NON_EXPORTED_BASE(talk_base::RefCountInterface) {
35 public: 37 public:
36 explicit LocalRTCStatsResponse(const blink::WebRTCStatsResponse& impl) 38 explicit LocalRTCStatsResponse(const blink::WebRTCStatsResponse& impl)
37 : impl_(impl) { 39 : impl_(impl) {
38 } 40 }
39 41
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 NON_EXPORTED_BASE(public webrtc::PeerConnectionObserver) { 86 NON_EXPORTED_BASE(public webrtc::PeerConnectionObserver) {
85 public: 87 public:
86 RTCPeerConnectionHandler( 88 RTCPeerConnectionHandler(
87 blink::WebRTCPeerConnectionHandlerClient* client, 89 blink::WebRTCPeerConnectionHandlerClient* client,
88 PeerConnectionDependencyFactory* dependency_factory); 90 PeerConnectionDependencyFactory* dependency_factory);
89 virtual ~RTCPeerConnectionHandler(); 91 virtual ~RTCPeerConnectionHandler();
90 92
91 // Destroy all existing RTCPeerConnectionHandler objects. 93 // Destroy all existing RTCPeerConnectionHandler objects.
92 static void DestructAllHandlers(); 94 static void DestructAllHandlers();
93 95
96 static void ConvertOfferOptionsToConstraints(
97 const blink::WebRTCOfferOptions& options,
98 RTCMediaConstraints* output);
99
94 void associateWithFrame(blink::WebFrame* frame); 100 void associateWithFrame(blink::WebFrame* frame);
95 101
96 // Initialize method only used for unit test. 102 // Initialize method only used for unit test.
97 bool InitializeForTest( 103 bool InitializeForTest(
98 const blink::WebRTCConfiguration& server_configuration, 104 const blink::WebRTCConfiguration& server_configuration,
99 const blink::WebMediaConstraints& options, 105 const blink::WebMediaConstraints& options,
100 PeerConnectionTracker* peer_connection_tracker); 106 PeerConnectionTracker* peer_connection_tracker);
101 107
102 // blink::WebRTCPeerConnectionHandler implementation 108 // blink::WebRTCPeerConnectionHandler implementation
103 virtual bool initialize( 109 virtual bool initialize(
104 const blink::WebRTCConfiguration& server_configuration, 110 const blink::WebRTCConfiguration& server_configuration,
105 const blink::WebMediaConstraints& options) OVERRIDE; 111 const blink::WebMediaConstraints& options) OVERRIDE;
106 112
107 virtual void createOffer( 113 virtual void createOffer(
108 const blink::WebRTCSessionDescriptionRequest& request, 114 const blink::WebRTCSessionDescriptionRequest& request,
109 const blink::WebMediaConstraints& options) OVERRIDE; 115 const blink::WebMediaConstraints& options) OVERRIDE;
116 virtual void createOffer(
117 const blink::WebRTCSessionDescriptionRequest& request,
118 const blink::WebRTCOfferOptions& options) OVERRIDE;
119
110 virtual void createAnswer( 120 virtual void createAnswer(
111 const blink::WebRTCSessionDescriptionRequest& request, 121 const blink::WebRTCSessionDescriptionRequest& request,
112 const blink::WebMediaConstraints& options) OVERRIDE; 122 const blink::WebMediaConstraints& options) OVERRIDE;
113 123
114 virtual void setLocalDescription( 124 virtual void setLocalDescription(
115 const blink::WebRTCVoidRequest& request, 125 const blink::WebRTCVoidRequest& request,
116 const blink::WebRTCSessionDescription& description) OVERRIDE; 126 const blink::WebRTCSessionDescription& description) OVERRIDE;
117 virtual void setRemoteDescription( 127 virtual void setRemoteDescription(
118 const blink::WebRTCVoidRequest& request, 128 const blink::WebRTCVoidRequest& request,
119 const blink::WebRTCSessionDescription& description) OVERRIDE; 129 const blink::WebRTCSessionDescription& description) OVERRIDE;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 content::RemoteMediaStreamImpl*> RemoteStreamMap; 222 content::RemoteMediaStreamImpl*> RemoteStreamMap;
213 RemoteStreamMap remote_streams_; 223 RemoteStreamMap remote_streams_;
214 scoped_refptr<webrtc::UMAObserver> uma_observer_; 224 scoped_refptr<webrtc::UMAObserver> uma_observer_;
215 225
216 DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler); 226 DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler);
217 }; 227 };
218 228
219 } // namespace content 229 } // namespace content
220 230
221 #endif // CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ 231 #endif // CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_
OLDNEW
« no previous file with comments | « content/renderer/media/peer_connection_tracker.cc ('k') | content/renderer/media/rtc_peer_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698