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 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 3310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3321 | 3321 |
3322 if (size == preferred_size_) | 3322 if (size == preferred_size_) |
3323 return; | 3323 return; |
3324 | 3324 |
3325 preferred_size_ = size; | 3325 preferred_size_ = size; |
3326 Send(new ViewHostMsg_DidContentsPreferredSizeChange(routing_id_, | 3326 Send(new ViewHostMsg_DidContentsPreferredSizeChange(routing_id_, |
3327 preferred_size_)); | 3327 preferred_size_)); |
3328 } | 3328 } |
3329 | 3329 |
3330 void RenderViewImpl::EnsureMediaStreamImpl() { | 3330 void RenderViewImpl::EnsureMediaStreamImpl() { |
3331 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | |
3332 if (!cmd_line->HasSwitch(switches::kEnableMediaStream)) | |
3333 return; | |
3334 | |
3335 #if defined(ENABLE_P2P_APIS) | 3331 #if defined(ENABLE_P2P_APIS) |
3336 if (!p2p_socket_dispatcher_) | 3332 if (!p2p_socket_dispatcher_) |
3337 p2p_socket_dispatcher_ = new content::P2PSocketDispatcher(this); | 3333 p2p_socket_dispatcher_ = new content::P2PSocketDispatcher(this); |
3338 #endif | 3334 #endif |
3339 | 3335 |
3340 #if defined(ENABLE_WEBRTC) | 3336 #if defined(ENABLE_WEBRTC) |
3341 if (!media_stream_dispatcher_) | 3337 if (!media_stream_dispatcher_) |
3342 media_stream_dispatcher_ = new MediaStreamDispatcher(this); | 3338 media_stream_dispatcher_ = new MediaStreamDispatcher(this); |
3343 | 3339 |
3344 if (!media_stream_impl_) { | 3340 if (!media_stream_impl_) { |
(...skipping 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5311 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5307 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5312 return !!RenderThreadImpl::current()->compositor_thread(); | 5308 return !!RenderThreadImpl::current()->compositor_thread(); |
5313 } | 5309 } |
5314 | 5310 |
5315 void RenderViewImpl::OnJavaBridgeInit() { | 5311 void RenderViewImpl::OnJavaBridgeInit() { |
5316 DCHECK(!java_bridge_dispatcher_.get()); | 5312 DCHECK(!java_bridge_dispatcher_.get()); |
5317 #if defined(ENABLE_JAVA_BRIDGE) | 5313 #if defined(ENABLE_JAVA_BRIDGE) |
5318 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5314 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
5319 #endif | 5315 #endif |
5320 } | 5316 } |
OLD | NEW |