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

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

Issue 2287263003: Fix build failure with "enable_webrtc = false". (Closed)
Patch Set: rebase Created 4 years, 3 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
« no previous file with comments | « content/renderer/BUILD.gn ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/renderer_blink_platform_impl.h" 5 #include "content/renderer/renderer_blink_platform_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after
960 web_media_player, content::RenderThread::Get()->GetIOTaskRunner()), 960 web_media_player, content::RenderThread::Get()->GetIOTaskRunner()),
961 false, // is_remote 961 false, // is_remote
962 false, // is_readonly 962 false, // is_readonly
963 web_media_stream); 963 web_media_stream);
964 #endif 964 #endif
965 } 965 }
966 966
967 void RendererBlinkPlatformImpl::createHTMLAudioElementCapturer( 967 void RendererBlinkPlatformImpl::createHTMLAudioElementCapturer(
968 WebMediaStream* web_media_stream, 968 WebMediaStream* web_media_stream,
969 WebMediaPlayer* web_media_player) { 969 WebMediaPlayer* web_media_player) {
970 #if defined(ENABLE_WEBRTC)
970 DCHECK(web_media_stream); 971 DCHECK(web_media_stream);
971 DCHECK(web_media_player); 972 DCHECK(web_media_player);
972 973
973 blink::WebMediaStreamSource web_media_stream_source; 974 blink::WebMediaStreamSource web_media_stream_source;
974 blink::WebMediaStreamTrack web_media_stream_track; 975 blink::WebMediaStreamTrack web_media_stream_track;
975 const WebString track_id = WebString::fromUTF8(base::GenerateGUID()); 976 const WebString track_id = WebString::fromUTF8(base::GenerateGUID());
976 977
977 web_media_stream_source.initialize(track_id, 978 web_media_stream_source.initialize(track_id,
978 blink::WebMediaStreamSource::TypeAudio, 979 blink::WebMediaStreamSource::TypeAudio,
979 track_id, 980 track_id,
980 false /* is_remote */); 981 false /* is_remote */);
981 web_media_stream_track.initialize(web_media_stream_source); 982 web_media_stream_track.initialize(web_media_stream_source);
982 983
983 MediaStreamAudioSource* const media_stream_source = 984 MediaStreamAudioSource* const media_stream_source =
984 HtmlAudioElementCapturerSource::CreateFromWebMediaPlayerImpl( 985 HtmlAudioElementCapturerSource::CreateFromWebMediaPlayerImpl(
985 web_media_player); 986 web_media_player);
986 987
987 // Takes ownership of |media_stream_source|. 988 // Takes ownership of |media_stream_source|.
988 web_media_stream_source.setExtraData(media_stream_source); 989 web_media_stream_source.setExtraData(media_stream_source);
989 990
990 media_stream_source->ConnectToTrack(web_media_stream_track); 991 media_stream_source->ConnectToTrack(web_media_stream_track);
991 web_media_stream->addTrack(web_media_stream_track); 992 web_media_stream->addTrack(web_media_stream_track);
993 #endif
992 } 994 }
993 995
994 //------------------------------------------------------------------------------ 996 //------------------------------------------------------------------------------
995 997
996 WebImageCaptureFrameGrabber* 998 WebImageCaptureFrameGrabber*
997 RendererBlinkPlatformImpl::createImageCaptureFrameGrabber() { 999 RendererBlinkPlatformImpl::createImageCaptureFrameGrabber() {
998 #if defined(ENABLE_WEBRTC) 1000 #if defined(ENABLE_WEBRTC)
999 return new ImageCaptureFrameGrabber(); 1001 return new ImageCaptureFrameGrabber();
1000 #else 1002 #else
1001 return nullptr; 1003 return nullptr;
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
1339 return &trial_token_validator_; 1341 return &trial_token_validator_;
1340 } 1342 }
1341 1343
1342 void RendererBlinkPlatformImpl::workerContextCreated( 1344 void RendererBlinkPlatformImpl::workerContextCreated(
1343 const v8::Local<v8::Context>& worker) { 1345 const v8::Local<v8::Context>& worker) {
1344 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( 1346 GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
1345 worker); 1347 worker);
1346 } 1348 }
1347 1349
1348 } // namespace content 1350 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698