| OLD | NEW |
| 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/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 4042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4053 if (it->second == remote_frame_id) | 4053 if (it->second == remote_frame_id) |
| 4054 return FindFrameByID(webview()->mainFrame(), it->first); | 4054 return FindFrameByID(webview()->mainFrame(), it->first); |
| 4055 } | 4055 } |
| 4056 return NULL; | 4056 return NULL; |
| 4057 } | 4057 } |
| 4058 | 4058 |
| 4059 void RenderViewImpl::EnsureMediaStreamImpl() { | 4059 void RenderViewImpl::EnsureMediaStreamImpl() { |
| 4060 if (!RenderThreadImpl::current()) // Will be NULL during unit tests. | 4060 if (!RenderThreadImpl::current()) // Will be NULL during unit tests. |
| 4061 return; | 4061 return; |
| 4062 | 4062 |
| 4063 #if defined(OS_ANDROID) |
| 4064 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableWebRTC)) |
| 4065 return; |
| 4066 #endif |
| 4067 |
| 4063 #if defined(ENABLE_WEBRTC) | 4068 #if defined(ENABLE_WEBRTC) |
| 4064 if (!media_stream_dispatcher_) | 4069 if (!media_stream_dispatcher_) |
| 4065 media_stream_dispatcher_ = new MediaStreamDispatcher(this); | 4070 media_stream_dispatcher_ = new MediaStreamDispatcher(this); |
| 4066 | 4071 |
| 4067 if (!media_stream_impl_) { | 4072 if (!media_stream_impl_) { |
| 4068 media_stream_impl_ = new MediaStreamImpl( | 4073 media_stream_impl_ = new MediaStreamImpl( |
| 4069 this, | 4074 this, |
| 4070 media_stream_dispatcher_, | 4075 media_stream_dispatcher_, |
| 4071 RenderThreadImpl::current()->video_capture_impl_manager(), | 4076 RenderThreadImpl::current()->video_capture_impl_manager(), |
| 4072 RenderThreadImpl::current()->GetMediaStreamDependencyFactory()); | 4077 RenderThreadImpl::current()->GetMediaStreamDependencyFactory()); |
| (...skipping 2512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6585 } | 6590 } |
| 6586 #endif | 6591 #endif |
| 6587 | 6592 |
| 6588 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( | 6593 void RenderViewImpl::OnReleaseDisambiguationPopupDIB( |
| 6589 TransportDIB::Handle dib_handle) { | 6594 TransportDIB::Handle dib_handle) { |
| 6590 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); | 6595 TransportDIB* dib = TransportDIB::CreateWithHandle(dib_handle); |
| 6591 RenderProcess::current()->ReleaseTransportDIB(dib); | 6596 RenderProcess::current()->ReleaseTransportDIB(dib); |
| 6592 } | 6597 } |
| 6593 | 6598 |
| 6594 } // namespace content | 6599 } // namespace content |
| OLD | NEW |