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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 if (!frame_name.empty()) | 592 if (!frame_name.empty()) |
593 webview()->mainFrame()->setName(frame_name); | 593 webview()->mainFrame()->setName(frame_name); |
594 webview()->settings()->setMinimumTimerInterval( | 594 webview()->settings()->setMinimumTimerInterval( |
595 is_hidden() ? webkit_glue::kBackgroundTabTimerInterval : | 595 is_hidden() ? webkit_glue::kBackgroundTabTimerInterval : |
596 webkit_glue::kForegroundTabTimerInterval); | 596 webkit_glue::kForegroundTabTimerInterval); |
597 | 597 |
598 OnSetRendererPrefs(renderer_prefs); | 598 OnSetRendererPrefs(renderer_prefs); |
599 | 599 |
600 host_window_ = parent_hwnd; | 600 host_window_ = parent_hwnd; |
601 | 601 |
602 #if defined(ENABLE_P2P_APIS) | 602 #if defined(ENABLE_WEBRTC) |
603 if (!p2p_socket_dispatcher_) | 603 if (!p2p_socket_dispatcher_) |
604 p2p_socket_dispatcher_ = new content::P2PSocketDispatcher(this); | 604 p2p_socket_dispatcher_ = new content::P2PSocketDispatcher(this); |
605 #endif | |
606 | |
607 #if defined(ENABLE_WEBRTC) | |
608 if (!media_stream_dispatcher_) | 605 if (!media_stream_dispatcher_) |
609 media_stream_dispatcher_ = new MediaStreamDispatcher(this); | 606 media_stream_dispatcher_ = new MediaStreamDispatcher(this); |
610 #endif | 607 #endif |
611 | 608 |
612 new MHTMLGenerator(this); | 609 new MHTMLGenerator(this); |
613 #if defined(OS_MACOSX) | 610 #if defined(OS_MACOSX) |
614 new TextInputClientObserver(this); | 611 new TextInputClientObserver(this); |
615 #endif // defined(OS_MACOSX) | 612 #endif // defined(OS_MACOSX) |
616 | 613 |
617 // The next group of objects all implement RenderViewObserver, so are deleted | 614 // The next group of objects all implement RenderViewObserver, so are deleted |
(...skipping 2811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3429 | 3426 |
3430 preferred_size_ = size; | 3427 preferred_size_ = size; |
3431 Send(new ViewHostMsg_DidContentsPreferredSizeChange(routing_id_, | 3428 Send(new ViewHostMsg_DidContentsPreferredSizeChange(routing_id_, |
3432 preferred_size_)); | 3429 preferred_size_)); |
3433 } | 3430 } |
3434 | 3431 |
3435 void RenderViewImpl::EnsureMediaStreamImpl() { | 3432 void RenderViewImpl::EnsureMediaStreamImpl() { |
3436 if (!RenderThreadImpl::current()) // Will be NULL during unit tests. | 3433 if (!RenderThreadImpl::current()) // Will be NULL during unit tests. |
3437 return; | 3434 return; |
3438 | 3435 |
3439 #if defined(ENABLE_P2P_APIS) | 3436 #if defined(ENABLE_WEBRTC) |
3440 if (!p2p_socket_dispatcher_) | 3437 if (!p2p_socket_dispatcher_) |
3441 p2p_socket_dispatcher_ = new content::P2PSocketDispatcher(this); | 3438 p2p_socket_dispatcher_ = new content::P2PSocketDispatcher(this); |
3442 #endif | |
3443 | 3439 |
3444 #if defined(ENABLE_WEBRTC) | |
3445 if (!media_stream_dispatcher_) | 3440 if (!media_stream_dispatcher_) |
3446 media_stream_dispatcher_ = new MediaStreamDispatcher(this); | 3441 media_stream_dispatcher_ = new MediaStreamDispatcher(this); |
3447 | 3442 |
3448 if (!media_stream_impl_) { | 3443 if (!media_stream_impl_) { |
3449 MediaStreamDependencyFactory* factory = new MediaStreamDependencyFactory( | 3444 MediaStreamDependencyFactory* factory = new MediaStreamDependencyFactory( |
3450 RenderThreadImpl::current()->video_capture_impl_manager()); | 3445 RenderThreadImpl::current()->video_capture_impl_manager()); |
3451 media_stream_impl_ = new MediaStreamImpl( | 3446 media_stream_impl_ = new MediaStreamImpl( |
3452 this, | 3447 this, |
3453 media_stream_dispatcher_, | 3448 media_stream_dispatcher_, |
3454 p2p_socket_dispatcher_, | 3449 p2p_socket_dispatcher_, |
(...skipping 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5535 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5530 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5536 return !!RenderThreadImpl::current()->compositor_thread(); | 5531 return !!RenderThreadImpl::current()->compositor_thread(); |
5537 } | 5532 } |
5538 | 5533 |
5539 void RenderViewImpl::OnJavaBridgeInit() { | 5534 void RenderViewImpl::OnJavaBridgeInit() { |
5540 DCHECK(!java_bridge_dispatcher_); | 5535 DCHECK(!java_bridge_dispatcher_); |
5541 #if defined(ENABLE_JAVA_BRIDGE) | 5536 #if defined(ENABLE_JAVA_BRIDGE) |
5542 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5537 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
5543 #endif | 5538 #endif |
5544 } | 5539 } |
OLD | NEW |