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

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

Issue 9699069: Adding JSEP PeerConnection glue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" 128 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h"
129 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h " 129 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h "
130 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaCallba cks.h" 130 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaCallba cks.h"
131 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaClient.h" 131 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaClient.h"
132 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 132 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
133 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" 133 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h"
134 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h " 134 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h "
135 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData. h" 135 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData. h"
136 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC ontext3D.h" 136 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC ontext3D.h"
137 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" 137 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h"
138 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebJSEPPeerC onnectionHandler.h"
139 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebJSEPPeerC onnectionHandlerClient.h"
138 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandler.h" 140 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandler.h"
139 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandlerClient.h" 141 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandlerClient.h"
140 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" 142 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h"
141 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" 143 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
142 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" 144 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h"
143 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" 145 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h"
144 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" 146 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h"
145 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError. h" 147 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError. h"
146 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h" 148 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h"
147 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon se.h" 149 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLRespon se.h"
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 WebKit::WebPeerConnectionHandlerClient* client) { 646 WebKit::WebPeerConnectionHandlerClient* client) {
645 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 647 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
646 if (!cmd_line->HasSwitch(switches::kEnableMediaStream)) 648 if (!cmd_line->HasSwitch(switches::kEnableMediaStream))
647 return NULL; 649 return NULL;
648 EnsureMediaStreamImpl(); 650 EnsureMediaStreamImpl();
649 if (!media_stream_impl_.get()) 651 if (!media_stream_impl_.get())
650 return NULL; 652 return NULL;
651 return media_stream_impl_->CreatePeerConnectionHandler(client); 653 return media_stream_impl_->CreatePeerConnectionHandler(client);
652 } 654 }
653 655
656 WebKit::WebJSEPPeerConnectionHandler*
657 RenderViewImpl::CreatePeerConnectionHandlerJsep(
658 WebKit::WebJSEPPeerConnectionHandlerClient* client) {
659 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
660 if (!cmd_line->HasSwitch(switches::kEnableMediaStream))
661 return NULL;
662 EnsureMediaStreamImpl();
663 if (!media_stream_impl_.get())
664 return NULL;
665 return media_stream_impl_->CreatePeerConnectionHandlerJsep(client);
666 }
667
654 void RenderViewImpl::AddObserver(RenderViewObserver* observer) { 668 void RenderViewImpl::AddObserver(RenderViewObserver* observer) {
655 observers_.AddObserver(observer); 669 observers_.AddObserver(observer);
656 } 670 }
657 671
658 void RenderViewImpl::RemoveObserver(RenderViewObserver* observer) { 672 void RenderViewImpl::RemoveObserver(RenderViewObserver* observer) {
659 observer->RenderViewGone(); 673 observer->RenderViewGone();
660 observers_.RemoveObserver(observer); 674 observers_.RemoveObserver(observer);
661 } 675 }
662 676
663 WebKit::WebView* RenderViewImpl::webview() const { 677 WebKit::WebView* RenderViewImpl::webview() const {
(...skipping 4513 matching lines...) Expand 10 before | Expand all | Expand 10 after
5177 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5191 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5178 return !!RenderThreadImpl::current()->compositor_thread(); 5192 return !!RenderThreadImpl::current()->compositor_thread();
5179 } 5193 }
5180 5194
5181 void RenderViewImpl::OnJavaBridgeInit() { 5195 void RenderViewImpl::OnJavaBridgeInit() {
5182 DCHECK(!java_bridge_dispatcher_.get()); 5196 DCHECK(!java_bridge_dispatcher_.get());
5183 #if defined(ENABLE_JAVA_BRIDGE) 5197 #if defined(ENABLE_JAVA_BRIDGE)
5184 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); 5198 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this));
5185 #endif 5199 #endif
5186 } 5200 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698