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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
131 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" | 131 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSettings.h" |
132 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h " | 132 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h " |
133 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaCallba cks.h" | 133 #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaCallba cks.h" |
134 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaClient.h" | 134 #include "third_party/WebKit/Source/WebKit/chromium/public/WebUserMediaClient.h" |
135 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 135 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
136 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" | 136 #include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h" |
137 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h " | 137 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebCString.h " |
138 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData. h" | 138 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebDragData. h" |
139 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC ontext3D.h" | 139 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebGraphicsC ontext3D.h" |
140 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" | 140 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebImage.h" |
141 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ction00Handler.h" | |
142 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ction00HandlerClient.h" | |
141 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandler.h" | 143 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandler.h" |
142 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandlerClient.h" | 144 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPeerConne ctionHandlerClient.h" |
143 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" | 145 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebPoint.h" |
144 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" | 146 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h" |
145 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" | 147 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSize.h" |
146 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSocketStr eamHandle.h" | 148 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebSocketStr eamHandle.h" |
147 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" | 149 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebString.h" |
148 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" | 150 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURL.h" |
149 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError. h" | 151 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLError. h" |
150 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h" | 152 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebURLReques t.h" |
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
657 WebKit::WebPeerConnectionHandlerClient* client) { | 659 WebKit::WebPeerConnectionHandlerClient* client) { |
658 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 660 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); |
659 if (!cmd_line->HasSwitch(switches::kEnableMediaStream)) | 661 if (!cmd_line->HasSwitch(switches::kEnableMediaStream)) |
660 return NULL; | 662 return NULL; |
661 EnsureMediaStreamImpl(); | 663 EnsureMediaStreamImpl(); |
662 if (!media_stream_impl_.get()) | 664 if (!media_stream_impl_.get()) |
663 return NULL; | 665 return NULL; |
664 return media_stream_impl_->CreatePeerConnectionHandler(client); | 666 return media_stream_impl_->CreatePeerConnectionHandler(client); |
665 } | 667 } |
666 | 668 |
669 WebKit::WebPeerConnection00Handler* | |
darin (slow to review)
2012/04/04 18:16:44
nit: normally, we add a using declaration at the t
Henrik Grunell
2012/04/10 20:20:25
Done.
| |
670 RenderViewImpl::CreatePeerConnectionHandlerJsep( | |
671 WebKit::WebPeerConnection00HandlerClient* client) { | |
672 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | |
673 if (!cmd_line->HasSwitch(switches::kEnableMediaStream)) | |
darin (slow to review)
2012/04/04 18:16:44
nit: how about moving this command line check into
Henrik Grunell
2012/04/10 20:20:25
Done.
| |
674 return NULL; | |
675 EnsureMediaStreamImpl(); | |
676 if (!media_stream_impl_.get()) | |
677 return NULL; | |
678 return media_stream_impl_->CreatePeerConnectionHandlerJsep(client); | |
679 } | |
680 | |
667 void RenderViewImpl::AddObserver(RenderViewObserver* observer) { | 681 void RenderViewImpl::AddObserver(RenderViewObserver* observer) { |
668 observers_.AddObserver(observer); | 682 observers_.AddObserver(observer); |
669 } | 683 } |
670 | 684 |
671 void RenderViewImpl::RemoveObserver(RenderViewObserver* observer) { | 685 void RenderViewImpl::RemoveObserver(RenderViewObserver* observer) { |
672 observer->RenderViewGone(); | 686 observer->RenderViewGone(); |
673 observers_.RemoveObserver(observer); | 687 observers_.RemoveObserver(observer); |
674 } | 688 } |
675 | 689 |
676 WebKit::WebView* RenderViewImpl::webview() const { | 690 WebKit::WebView* RenderViewImpl::webview() const { |
(...skipping 4517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5194 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5208 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5195 return !!RenderThreadImpl::current()->compositor_thread(); | 5209 return !!RenderThreadImpl::current()->compositor_thread(); |
5196 } | 5210 } |
5197 | 5211 |
5198 void RenderViewImpl::OnJavaBridgeInit() { | 5212 void RenderViewImpl::OnJavaBridgeInit() { |
5199 DCHECK(!java_bridge_dispatcher_.get()); | 5213 DCHECK(!java_bridge_dispatcher_.get()); |
5200 #if defined(ENABLE_JAVA_BRIDGE) | 5214 #if defined(ENABLE_JAVA_BRIDGE) |
5201 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5215 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
5202 #endif | 5216 #endif |
5203 } | 5217 } |
OLD | NEW |