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

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

Issue 1809093003: Moving SwitchOutputDevice out of OutputDevice interface, eliminating OutputDevice (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2411 matching lines...) Expand 10 before | Expand all | Expand 10 after
2422 #endif // defined(VIDEO_HOLE) 2422 #endif // defined(VIDEO_HOLE)
2423 2423
2424 blink::WebMediaStream web_stream( 2424 blink::WebMediaStream web_stream(
2425 blink::WebMediaStreamRegistry::lookupMediaStreamDescriptor(url)); 2425 blink::WebMediaStreamRegistry::lookupMediaStreamDescriptor(url));
2426 if (!web_stream.isNull()) 2426 if (!web_stream.isNull())
2427 return CreateWebMediaPlayerForMediaStream(client, sink_id, 2427 return CreateWebMediaPlayerForMediaStream(client, sink_id,
2428 frame_->getSecurityOrigin()); 2428 frame_->getSecurityOrigin());
2429 2429
2430 RenderThreadImpl* render_thread = RenderThreadImpl::current(); 2430 RenderThreadImpl* render_thread = RenderThreadImpl::current();
2431 2431
2432 scoped_refptr<media::RestartableAudioRendererSink> audio_renderer_sink = 2432 scoped_refptr<media::SwitchableAudioRendererSink> audio_renderer_sink =
2433 AudioDeviceFactory::NewRestartableAudioRendererSink( 2433 AudioDeviceFactory::NewSwitchableAudioRendererSink(
2434 AudioDeviceFactory::kSourceMediaElement, routing_id_, 0, 2434 AudioDeviceFactory::kSourceMediaElement, routing_id_, 0,
2435 sink_id.utf8(), frame_->getSecurityOrigin()); 2435 sink_id.utf8(), frame_->getSecurityOrigin());
2436 media::WebMediaPlayerParams::Context3DCB context_3d_cb = 2436 media::WebMediaPlayerParams::Context3DCB context_3d_cb =
2437 base::Bind(&GetSharedMainThreadContext3D); 2437 base::Bind(&GetSharedMainThreadContext3D);
2438 2438
2439 scoped_refptr<media::MediaLog> media_log(new RenderMediaLog()); 2439 scoped_refptr<media::MediaLog> media_log(new RenderMediaLog());
2440 #if defined(OS_ANDROID) 2440 #if defined(OS_ANDROID)
2441 if (!media_surface_manager_) 2441 if (!media_surface_manager_)
2442 media_surface_manager_ = new RendererSurfaceViewManager(this); 2442 media_surface_manager_ = new RendererSurfaceViewManager(this);
2443 #endif 2443 #endif
(...skipping 3555 matching lines...) Expand 10 before | Expand all | Expand 10 after
5999 RenderFrameImpl::GetWebMediaPlayerDelegate() { 5999 RenderFrameImpl::GetWebMediaPlayerDelegate() {
6000 if (!media_player_delegate_) 6000 if (!media_player_delegate_)
6001 media_player_delegate_ = new media::RendererWebMediaPlayerDelegate(this); 6001 media_player_delegate_ = new media::RendererWebMediaPlayerDelegate(this);
6002 return media_player_delegate_; 6002 return media_player_delegate_;
6003 } 6003 }
6004 6004
6005 void RenderFrameImpl::checkIfAudioSinkExistsAndIsAuthorized( 6005 void RenderFrameImpl::checkIfAudioSinkExistsAndIsAuthorized(
6006 const blink::WebString& sink_id, 6006 const blink::WebString& sink_id,
6007 const blink::WebSecurityOrigin& security_origin, 6007 const blink::WebSecurityOrigin& security_origin,
6008 blink::WebSetSinkIdCallbacks* web_callbacks) { 6008 blink::WebSetSinkIdCallbacks* web_callbacks) {
6009 media::SwitchOutputDeviceCB callback = 6009 media::OutputDeviceStatusCB callback =
6010 media::ConvertToSwitchOutputDeviceCB(web_callbacks); 6010 media::ConvertToOutputDeviceStatusCB(web_callbacks);
6011 callback.Run(AudioDeviceFactory::GetOutputDeviceStatus( 6011 callback.Run(AudioDeviceFactory::GetOutputDeviceInfo(
6012 routing_id_, 0, sink_id.utf8(), security_origin)); 6012 routing_id_, 0, sink_id.utf8(), security_origin)
6013 .device_status());
6013 } 6014 }
6014 6015
6015 blink::WebPlugin* RenderFrameImpl::GetWebPluginForFind() { 6016 blink::WebPlugin* RenderFrameImpl::GetWebPluginForFind() {
6016 if (!is_main_frame_) 6017 if (!is_main_frame_)
6017 return nullptr; 6018 return nullptr;
6018 6019
6019 if (frame_->document().isPluginDocument()) 6020 if (frame_->document().isPluginDocument())
6020 return frame_->document().to<WebPluginDocument>().plugin(); 6021 return frame_->document().to<WebPluginDocument>().plugin();
6021 6022
6022 #if defined(ENABLE_PLUGINS) 6023 #if defined(ENABLE_PLUGINS)
6023 if (plugin_find_handler_) 6024 if (plugin_find_handler_)
6024 return plugin_find_handler_->container()->plugin(); 6025 return plugin_find_handler_->container()->plugin();
6025 #endif 6026 #endif
6026 6027
6027 return nullptr; 6028 return nullptr;
6028 } 6029 }
6029 6030
6030 void RenderFrameImpl::SendFindReply(int request_id, 6031 void RenderFrameImpl::SendFindReply(int request_id,
6031 int match_count, 6032 int match_count,
6032 int ordinal, 6033 int ordinal,
6033 const WebRect& selection_rect, 6034 const WebRect& selection_rect,
6034 bool final_status_update) { 6035 bool final_status_update) {
6035 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count, 6036 Send(new FrameHostMsg_Find_Reply(routing_id_, request_id, match_count,
6036 selection_rect, ordinal, 6037 selection_rect, ordinal,
6037 final_status_update)); 6038 final_status_update));
6038 } 6039 }
6039 6040
6040 } // namespace content 6041 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/webrtc_audio_renderer_unittest.cc ('k') | media/audio/audio_output_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698