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

Side by Side Diff: content/renderer/media/media_stream_impl.cc

Issue 10836025: Part 1: Plumb render view ID to render host (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 years, 4 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 | Annotate | Revision Log
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 #include "content/renderer/media/media_stream_impl.h" 5 #include "content/renderer/media/media_stream_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "base/string_number_conversions.h" 12 #include "base/string_number_conversions.h"
13 #include "base/stringprintf.h" 13 #include "base/stringprintf.h"
14 #include "base/synchronization/waitable_event.h" 14 #include "base/synchronization/waitable_event.h"
15 #include "base/utf_string_conversions.h" 15 #include "base/utf_string_conversions.h"
16 #include "content/common/child_thread.h" 16 #include "content/common/child_thread.h"
17 #include "content/renderer/media/capture_video_decoder.h" 17 #include "content/renderer/media/capture_video_decoder.h"
18 #include "content/renderer/media/media_stream_extra_data.h" 18 #include "content/renderer/media/media_stream_extra_data.h"
19 #include "content/renderer/media/media_stream_dependency_factory.h" 19 #include "content/renderer/media/media_stream_dependency_factory.h"
20 #include "content/renderer/media/media_stream_dispatcher.h" 20 #include "content/renderer/media/media_stream_dispatcher.h"
21 #include "content/renderer/media/peer_connection_handler_jsep.h" 21 #include "content/renderer/media/peer_connection_handler_jsep.h"
22 #include "content/renderer/media/video_capture_impl_manager.h" 22 #include "content/renderer/media/video_capture_impl_manager.h"
23 #include "content/renderer/media/video_capture_module_impl.h" 23 #include "content/renderer/media/video_capture_module_impl.h"
24 #include "content/renderer/media/webrtc_audio_device_impl.h" 24 #include "content/renderer/media/webrtc_audio_device_impl.h"
25 #include "content/renderer/p2p/ipc_network_manager.h" 25 #include "content/renderer/p2p/ipc_network_manager.h"
26 #include "content/renderer/p2p/ipc_socket_factory.h" 26 #include "content/renderer/p2p/ipc_socket_factory.h"
27 #include "content/renderer/render_view_impl.h"
27 #include "jingle/glue/thread_wrapper.h" 28 #include "jingle/glue/thread_wrapper.h"
28 #include "media/base/message_loop_factory.h" 29 #include "media/base/message_loop_factory.h"
29 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaStreamRegistr y.h" 31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMediaStreamRegistr y.h"
31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" 32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
32 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amComponent.h" 33 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amComponent.h"
33 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amDescriptor.h" 34 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amDescriptor.h"
34 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amSource.h" 35 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebMediaStre amSource.h"
35 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h" 36 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebVector.h"
36 37
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 p2p_socket_dispatcher_->AddDestructionObserver(this); 426 p2p_socket_dispatcher_->AddDestructionObserver(this);
426 } 427 }
427 428
428 if (!socket_factory_.get()) { 429 if (!socket_factory_.get()) {
429 socket_factory_.reset( 430 socket_factory_.reset(
430 new content::IpcPacketSocketFactory(p2p_socket_dispatcher_)); 431 new content::IpcPacketSocketFactory(p2p_socket_dispatcher_));
431 } 432 }
432 433
433 if (!dependency_factory_->PeerConnectionFactoryCreated()) { 434 if (!dependency_factory_->PeerConnectionFactoryCreated()) {
434 if (!dependency_factory_->CreatePeerConnectionFactory( 435 if (!dependency_factory_->CreatePeerConnectionFactory(
436 render_view()->GetRoutingID(),
435 worker_thread_, 437 worker_thread_,
436 signaling_thread_, 438 signaling_thread_,
437 p2p_socket_dispatcher_, 439 p2p_socket_dispatcher_,
438 network_manager_, 440 network_manager_,
439 socket_factory_.get())) { 441 socket_factory_.get())) {
440 LOG(ERROR) << "Could not create PeerConnection factory"; 442 LOG(ERROR) << "Could not create PeerConnection factory";
441 return false; 443 return false;
442 } 444 }
443 } 445 }
444 446
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 MediaStreamExtraData::MediaStreamExtraData( 555 MediaStreamExtraData::MediaStreamExtraData(
554 webrtc::MediaStreamInterface* remote_stream) 556 webrtc::MediaStreamInterface* remote_stream)
555 : remote_stream_(remote_stream) { 557 : remote_stream_(remote_stream) {
556 } 558 }
557 MediaStreamExtraData::MediaStreamExtraData( 559 MediaStreamExtraData::MediaStreamExtraData(
558 webrtc::LocalMediaStreamInterface* local_stream) 560 webrtc::LocalMediaStreamInterface* local_stream)
559 : local_stream_(local_stream) { 561 : local_stream_(local_stream) {
560 } 562 }
561 MediaStreamExtraData::~MediaStreamExtraData() { 563 MediaStreamExtraData::~MediaStreamExtraData() {
562 } 564 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698