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

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

Issue 2928033002: Move GetDocument method from WebFrame to WebLocalFrame. (Closed)
Patch Set: Rebasing... Created 3 years, 6 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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 11 matching lines...) Expand all
22 #include "content/common/content_export.h" 22 #include "content/common/content_export.h"
23 #include "content/renderer/media/webrtc/media_stream_track_metrics.h" 23 #include "content/renderer/media/webrtc/media_stream_track_metrics.h"
24 #include "content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.h" 24 #include "content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.h"
25 #include "ipc/ipc_platform_file.h" 25 #include "ipc/ipc_platform_file.h"
26 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h" 26 #include "third_party/WebKit/public/platform/WebMediaStreamSource.h"
27 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h" 27 #include "third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h"
28 #include "third_party/WebKit/public/platform/WebRTCStatsRequest.h" 28 #include "third_party/WebKit/public/platform/WebRTCStatsRequest.h"
29 #include "third_party/WebKit/public/platform/WebRTCStatsResponse.h" 29 #include "third_party/WebKit/public/platform/WebRTCStatsResponse.h"
30 30
31 namespace blink { 31 namespace blink {
32 class WebFrame; 32 class WebLocalFrame;
33 class WebRTCAnswerOptions; 33 class WebRTCAnswerOptions;
34 class WebRTCDataChannelHandler; 34 class WebRTCDataChannelHandler;
35 class WebRTCLegacyStats; 35 class WebRTCLegacyStats;
36 class WebRTCOfferOptions; 36 class WebRTCOfferOptions;
37 class WebRTCPeerConnectionHandlerClient; 37 class WebRTCPeerConnectionHandlerClient;
38 } 38 }
39 39
40 namespace content { 40 namespace content {
41 41
42 class PeerConnectionDependencyFactory; 42 class PeerConnectionDependencyFactory;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 : NON_EXPORTED_BASE(public blink::WebRTCPeerConnectionHandler) { 95 : NON_EXPORTED_BASE(public blink::WebRTCPeerConnectionHandler) {
96 public: 96 public:
97 RTCPeerConnectionHandler( 97 RTCPeerConnectionHandler(
98 blink::WebRTCPeerConnectionHandlerClient* client, 98 blink::WebRTCPeerConnectionHandlerClient* client,
99 PeerConnectionDependencyFactory* dependency_factory); 99 PeerConnectionDependencyFactory* dependency_factory);
100 ~RTCPeerConnectionHandler() override; 100 ~RTCPeerConnectionHandler() override;
101 101
102 // Destroy all existing RTCPeerConnectionHandler objects. 102 // Destroy all existing RTCPeerConnectionHandler objects.
103 static void DestructAllHandlers(); 103 static void DestructAllHandlers();
104 104
105 void associateWithFrame(blink::WebFrame* frame); 105 void associateWithFrame(blink::WebLocalFrame* frame);
106 106
107 // Initialize method only used for unit test. 107 // Initialize method only used for unit test.
108 bool InitializeForTest( 108 bool InitializeForTest(
109 const blink::WebRTCConfiguration& server_configuration, 109 const blink::WebRTCConfiguration& server_configuration,
110 const blink::WebMediaConstraints& options, 110 const blink::WebMediaConstraints& options,
111 const base::WeakPtr<PeerConnectionTracker>& peer_connection_tracker); 111 const base::WeakPtr<PeerConnectionTracker>& peer_connection_tracker);
112 112
113 // blink::WebRTCPeerConnectionHandler implementation 113 // blink::WebRTCPeerConnectionHandler implementation
114 bool Initialize(const blink::WebRTCConfiguration& server_configuration, 114 bool Initialize(const blink::WebRTCConfiguration& server_configuration,
115 const blink::WebMediaConstraints& options) override; 115 const blink::WebMediaConstraints& options) override;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 blink::WebRTCPeerConnectionHandlerClient* const client_; 252 blink::WebRTCPeerConnectionHandlerClient* const client_;
253 // True if this PeerConnection has been closed. 253 // True if this PeerConnection has been closed.
254 // After the PeerConnection has been closed, this object may no longer 254 // After the PeerConnection has been closed, this object may no longer
255 // forward callbacks to blink. 255 // forward callbacks to blink.
256 bool is_closed_; 256 bool is_closed_;
257 257
258 // |dependency_factory_| is a raw pointer, and is valid for the lifetime of 258 // |dependency_factory_| is a raw pointer, and is valid for the lifetime of
259 // RenderThreadImpl. 259 // RenderThreadImpl.
260 PeerConnectionDependencyFactory* const dependency_factory_; 260 PeerConnectionDependencyFactory* const dependency_factory_;
261 261
262 blink::WebFrame* frame_ = nullptr; 262 blink::WebLocalFrame* frame_ = nullptr;
263 263
264 // Map and owners of track adapters. Every track that is in use by the peer 264 // Map and owners of track adapters. Every track that is in use by the peer
265 // connection has an associated blink and webrtc layer representation of it. 265 // connection has an associated blink and webrtc layer representation of it.
266 // The map keeps track of the relationship between 266 // The map keeps track of the relationship between
267 // |blink::WebMediaStreamTrack|s and |webrtc::MediaStreamTrackInterface|s. 267 // |blink::WebMediaStreamTrack|s and |webrtc::MediaStreamTrackInterface|s.
268 // Track adapters are created on the fly when a component (such as a stream) 268 // Track adapters are created on the fly when a component (such as a stream)
269 // needs to reference it, and automatically disposed when there are no longer 269 // needs to reference it, and automatically disposed when there are no longer
270 // any components referencing it. 270 // any components referencing it.
271 scoped_refptr<WebRtcMediaStreamTrackAdapterMap> track_adapter_map_; 271 scoped_refptr<WebRtcMediaStreamTrackAdapterMap> track_adapter_map_;
272 // Local stream adapters. Every stream that is in use by the peer connection 272 // Local stream adapters. Every stream that is in use by the peer connection
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 bool ice_state_seen_[webrtc::PeerConnectionInterface::kIceConnectionMax] = {}; 316 bool ice_state_seen_[webrtc::PeerConnectionInterface::kIceConnectionMax] = {};
317 317
318 base::WeakPtrFactory<RTCPeerConnectionHandler> weak_factory_; 318 base::WeakPtrFactory<RTCPeerConnectionHandler> weak_factory_;
319 319
320 DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler); 320 DISALLOW_COPY_AND_ASSIGN(RTCPeerConnectionHandler);
321 }; 321 };
322 322
323 } // namespace content 323 } // namespace content
324 324
325 #endif // CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_ 325 #endif // CONTENT_RENDERER_MEDIA_RTC_PEER_CONNECTION_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698