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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 9309078: Adding a skeleton MediaStreamCenter. (Closed)
Patch Set: Fixed review comments Created 8 years, 10 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
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/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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 using WebKit::WebGraphicsContext3D; 208 using WebKit::WebGraphicsContext3D;
209 using WebKit::WebHistoryItem; 209 using WebKit::WebHistoryItem;
210 using WebKit::WebIconURL; 210 using WebKit::WebIconURL;
211 using WebKit::WebImage; 211 using WebKit::WebImage;
212 using WebKit::WebInputElement; 212 using WebKit::WebInputElement;
213 using WebKit::WebIntentRequest; 213 using WebKit::WebIntentRequest;
214 using WebKit::WebIntentServiceInfo; 214 using WebKit::WebIntentServiceInfo;
215 using WebKit::WebMediaPlayer; 215 using WebKit::WebMediaPlayer;
216 using WebKit::WebMediaPlayerAction; 216 using WebKit::WebMediaPlayerAction;
217 using WebKit::WebMediaPlayerClient; 217 using WebKit::WebMediaPlayerClient;
218 using WebKit::WebMediaStreamCenter;
219 using WebKit::WebMediaStreamCenterClient;
218 using WebKit::WebNavigationPolicy; 220 using WebKit::WebNavigationPolicy;
219 using WebKit::WebNavigationType; 221 using WebKit::WebNavigationType;
220 using WebKit::WebNode; 222 using WebKit::WebNode;
221 using WebKit::WebPageSerializer; 223 using WebKit::WebPageSerializer;
222 using WebKit::WebPageSerializerClient; 224 using WebKit::WebPageSerializerClient;
225 using WebKit::WebPeerConnectionHandler;
226 using WebKit::WebPeerConnectionHandlerClient;
223 using WebKit::WebPlugin; 227 using WebKit::WebPlugin;
224 using WebKit::WebPluginAction; 228 using WebKit::WebPluginAction;
225 using WebKit::WebPluginContainer; 229 using WebKit::WebPluginContainer;
226 using WebKit::WebPluginDocument; 230 using WebKit::WebPluginDocument;
227 using WebKit::WebPluginParams; 231 using WebKit::WebPluginParams;
228 using WebKit::WebPoint; 232 using WebKit::WebPoint;
229 using WebKit::WebPopupMenuInfo; 233 using WebKit::WebPopupMenuInfo;
230 using WebKit::WebRange; 234 using WebKit::WebRange;
231 using WebKit::WebRect; 235 using WebKit::WebRect;
232 using WebKit::WebReferrerPolicy; 236 using WebKit::WebReferrerPolicy;
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 renderer_prefs, 615 renderer_prefs,
612 webkit_prefs, 616 webkit_prefs,
613 counter, 617 counter,
614 routing_id, 618 routing_id,
615 surface_id, 619 surface_id,
616 session_storage_namespace_id, 620 session_storage_namespace_id,
617 frame_name, 621 frame_name,
618 next_page_id); // adds reference 622 next_page_id); // adds reference
619 } 623 }
620 624
621 WebKit::WebPeerConnectionHandler* RenderViewImpl::CreatePeerConnectionHandler( 625 WebPeerConnectionHandler* RenderViewImpl::CreatePeerConnectionHandler(
622 WebKit::WebPeerConnectionHandlerClient* client) { 626 WebPeerConnectionHandlerClient* client) {
623 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 627 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
624 if (!cmd_line->HasSwitch(switches::kEnableMediaStream)) 628 if (!cmd_line->HasSwitch(switches::kEnableMediaStream))
625 return NULL; 629 return NULL;
626 EnsureMediaStreamImpl(); 630 EnsureMediaStreamImpl();
627 if (!media_stream_impl_.get()) 631 if (!media_stream_impl_.get())
628 return NULL; 632 return NULL;
629 return media_stream_impl_->CreatePeerConnectionHandler(client); 633 return media_stream_impl_->CreatePeerConnectionHandler(client);
630 } 634 }
631 635
636 WebMediaStreamCenter* RenderViewImpl::CreateMediaStreamCenter(
637 WebMediaStreamCenterClient* client) {
638 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
639 if (!cmd_line->HasSwitch(switches::kEnableMediaStream))
640 return NULL;
641 EnsureMediaStreamImpl();
642 return media_stream_impl_->CreateMediaStreamCenter(client);
643 }
644
632 void RenderViewImpl::AddObserver(RenderViewObserver* observer) { 645 void RenderViewImpl::AddObserver(RenderViewObserver* observer) {
633 observers_.AddObserver(observer); 646 observers_.AddObserver(observer);
634 } 647 }
635 648
636 void RenderViewImpl::RemoveObserver(RenderViewObserver* observer) { 649 void RenderViewImpl::RemoveObserver(RenderViewObserver* observer) {
637 observer->RenderViewGone(); 650 observer->RenderViewGone();
638 observers_.RemoveObserver(observer); 651 observers_.RemoveObserver(observer);
639 } 652 }
640 653
641 WebKit::WebView* RenderViewImpl::webview() const { 654 WebKit::WebView* RenderViewImpl::webview() const {
(...skipping 4399 matching lines...) Expand 10 before | Expand all | Expand 10 after
5041 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5054 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5042 return !!RenderThreadImpl::current()->compositor_thread(); 5055 return !!RenderThreadImpl::current()->compositor_thread();
5043 } 5056 }
5044 5057
5045 void RenderViewImpl::OnJavaBridgeInit() { 5058 void RenderViewImpl::OnJavaBridgeInit() {
5046 DCHECK(!java_bridge_dispatcher_.get()); 5059 DCHECK(!java_bridge_dispatcher_.get());
5047 #if defined(ENABLE_JAVA_BRIDGE) 5060 #if defined(ENABLE_JAVA_BRIDGE)
5048 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); 5061 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this));
5049 #endif 5062 #endif
5050 } 5063 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698