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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
579 | 579 |
580 WebKit::WebPeerConnectionHandler* RenderViewImpl::CreatePeerConnectionHandler( | 580 WebKit::WebPeerConnectionHandler* RenderViewImpl::CreatePeerConnectionHandler( |
581 WebKit::WebPeerConnectionHandlerClient* client) { | 581 WebKit::WebPeerConnectionHandlerClient* client) { |
582 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 582 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
583 if (!cmd_line->HasSwitch(switches::kEnableMediaStream)) | 583 if (!cmd_line->HasSwitch(switches::kEnableMediaStream)) |
584 return NULL; | 584 return NULL; |
585 EnsureMediaStreamImpl(); | 585 EnsureMediaStreamImpl(); |
586 return media_stream_impl_->CreatePeerConnectionHandler(client); | 586 return media_stream_impl_->CreatePeerConnectionHandler(client); |
587 } | 587 } |
588 | 588 |
| 589 WebKit::WebMediaStreamCenter* RenderViewImpl::CreateMediaStreamCenter( |
| 590 WebKit::WebMediaStreamCenterClient* client) { |
| 591 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
| 592 if (!cmd_line->HasSwitch(switches::kEnableMediaStream)) |
| 593 return NULL; |
| 594 EnsureMediaStreamImpl(); |
| 595 return media_stream_impl_->CreateMediaStreamCenter(client); |
| 596 } |
| 597 |
589 void RenderViewImpl::AddObserver(RenderViewObserver* observer) { | 598 void RenderViewImpl::AddObserver(RenderViewObserver* observer) { |
590 observers_.AddObserver(observer); | 599 observers_.AddObserver(observer); |
591 } | 600 } |
592 | 601 |
593 void RenderViewImpl::RemoveObserver(RenderViewObserver* observer) { | 602 void RenderViewImpl::RemoveObserver(RenderViewObserver* observer) { |
594 observer->RenderViewGone(); | 603 observer->RenderViewGone(); |
595 observers_.RemoveObserver(observer); | 604 observers_.RemoveObserver(observer); |
596 } | 605 } |
597 | 606 |
598 WebKit::WebView* RenderViewImpl::webview() const { | 607 WebKit::WebView* RenderViewImpl::webview() const { |
(...skipping 4349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4948 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 4957 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
4949 return !!RenderThreadImpl::current()->compositor_thread(); | 4958 return !!RenderThreadImpl::current()->compositor_thread(); |
4950 } | 4959 } |
4951 | 4960 |
4952 void RenderViewImpl::OnJavaBridgeInit() { | 4961 void RenderViewImpl::OnJavaBridgeInit() { |
4953 DCHECK(!java_bridge_dispatcher_.get()); | 4962 DCHECK(!java_bridge_dispatcher_.get()); |
4954 #if defined(ENABLE_JAVA_BRIDGE) | 4963 #if defined(ENABLE_JAVA_BRIDGE) |
4955 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 4964 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
4956 #endif | 4965 #endif |
4957 } | 4966 } |
OLD | NEW |