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

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

Issue 13247006: Enable media stream layout test with content_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 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 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2658 matching lines...) Expand 10 before | Expand all | Expand 10 after
2669 } 2669 }
2670 } 2670 }
2671 2671
2672 WebMediaPlayer* RenderViewImpl::createMediaPlayer( 2672 WebMediaPlayer* RenderViewImpl::createMediaPlayer(
2673 WebFrame* frame, const WebKit::WebURL& url, WebMediaPlayerClient* client) { 2673 WebFrame* frame, const WebKit::WebURL& url, WebMediaPlayerClient* client) {
2674 FOR_EACH_OBSERVER( 2674 FOR_EACH_OBSERVER(
2675 RenderViewObserver, observers_, WillCreateMediaPlayer(frame, client)); 2675 RenderViewObserver, observers_, WillCreateMediaPlayer(frame, client));
2676 2676
2677 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); 2677 const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
2678 #if defined(ENABLE_WEBRTC) 2678 #if defined(ENABLE_WEBRTC)
2679 if (MediaStreamImpl::CheckMediaStream(url)) { 2679 webkit_media::MediaStreamClient* media_stream_client =
2680 GetContentClient()->renderer()->OverrideMediaStreamClient();
2681 // For layout test with content_shell.
jam 2013/04/01 15:51:45 nit: don't mention what an embedder might use this
2682 if (media_stream_client) {
2683 if (media_stream_client->IsMediaStream(url)) {
2684 return new webkit_media::WebMediaPlayerMS(frame, client, AsWeakPtr(),
2685 media_stream_client, new RenderMediaLog());
2686 }
2687 } else if (MediaStreamImpl::CheckMediaStream(url)) {
2680 EnsureMediaStreamImpl(); 2688 EnsureMediaStreamImpl();
2681 return new webkit_media::WebMediaPlayerMS( 2689 return new webkit_media::WebMediaPlayerMS(
2682 frame, client, AsWeakPtr(), media_stream_impl_, new RenderMediaLog()); 2690 frame, client, AsWeakPtr(), media_stream_impl_, new RenderMediaLog());
2683 } 2691 }
2684 #endif 2692 #endif
2685 2693
2686 #if defined(OS_ANDROID) 2694 #if defined(OS_ANDROID)
2687 GpuChannelHost* gpu_channel_host = 2695 GpuChannelHost* gpu_channel_host =
2688 RenderThreadImpl::current()->EstablishGpuChannelSync( 2696 RenderThreadImpl::current()->EstablishGpuChannelSync(
2689 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE); 2697 CAUSE_FOR_GPU_LAUNCH_VIDEODECODEACCELERATOR_INITIALIZE);
(...skipping 3616 matching lines...) Expand 10 before | Expand all | Expand 10 after
6306 WebKit::WebPageVisibilityStateVisible; 6314 WebKit::WebPageVisibilityStateVisible;
6307 WebKit::WebPageVisibilityState override_state = current_state; 6315 WebKit::WebPageVisibilityState override_state = current_state;
6308 if (GetContentClient()->renderer()-> 6316 if (GetContentClient()->renderer()->
6309 ShouldOverridePageVisibilityState(this, 6317 ShouldOverridePageVisibilityState(this,
6310 &override_state)) 6318 &override_state))
6311 return override_state; 6319 return override_state;
6312 return current_state; 6320 return current_state;
6313 } 6321 }
6314 6322
6315 WebKit::WebUserMediaClient* RenderViewImpl::userMediaClient() { 6323 WebKit::WebUserMediaClient* RenderViewImpl::userMediaClient() {
6324 WebKit::WebUserMediaClient* user_media_client =
6325 GetContentClient()->renderer()->OverrideUserMediaClient();
6326 if (user_media_client)
6327 return user_media_client;
6328
6316 EnsureMediaStreamImpl(); 6329 EnsureMediaStreamImpl();
6317 return media_stream_impl_; 6330 return media_stream_impl_;
6318 } 6331 }
6319 6332
6320 void RenderViewImpl::draggableRegionsChanged() { 6333 void RenderViewImpl::draggableRegionsChanged() {
6321 FOR_EACH_OBSERVER( 6334 FOR_EACH_OBSERVER(
6322 RenderViewObserver, 6335 RenderViewObserver,
6323 observers_, 6336 observers_,
6324 DraggableRegionsChanged(webview()->mainFrame())); 6337 DraggableRegionsChanged(webview()->mainFrame()));
6325 } 6338 }
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
6608 WebURL url = icon_urls[i].iconURL(); 6621 WebURL url = icon_urls[i].iconURL();
6609 if (!url.isEmpty()) 6622 if (!url.isEmpty())
6610 urls.push_back(FaviconURL(url, 6623 urls.push_back(FaviconURL(url,
6611 ToFaviconType(icon_urls[i].iconType()))); 6624 ToFaviconType(icon_urls[i].iconType())));
6612 } 6625 }
6613 SendUpdateFaviconURL(urls); 6626 SendUpdateFaviconURL(urls);
6614 } 6627 }
6615 6628
6616 6629
6617 } // namespace content 6630 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698