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

Side by Side Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 1721273002: MediaStream audio object graph untangling and clean-ups. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 4 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
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.cc ('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/shell/renderer/layout_test/blink_test_runner.h" 5 #include "content/shell/renderer/layout_test/blink_test_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <clocale> 9 #include <clocale>
10 #include <cmath> 10 #include <cmath>
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 return blink::WebPoint(point_in_dip.x * scale, 763 return blink::WebPoint(point_in_dip.x * scale,
764 point_in_dip.y * scale); 764 point_in_dip.y * scale);
765 } 765 }
766 766
767 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack( 767 bool BlinkTestRunner::AddMediaStreamVideoSourceAndTrack(
768 blink::WebMediaStream* stream) { 768 blink::WebMediaStream* stream) {
769 DCHECK(stream); 769 DCHECK(stream);
770 #if defined(ENABLE_WEBRTC) 770 #if defined(ENABLE_WEBRTC)
771 return AddVideoTrackToMediaStream( 771 return AddVideoTrackToMediaStream(
772 make_scoped_ptr(new MockVideoCapturerSource()), 772 make_scoped_ptr(new MockVideoCapturerSource()),
773 false /* is_remote */, false /* is_readonly */, stream); 773 false, // is_remote
774 false, // is_readonly
775 stream);
774 #else 776 #else
775 return false; 777 return false;
776 #endif 778 #endif
777 } 779 }
778 780
779 bool BlinkTestRunner::AddMediaStreamAudioSourceAndTrack( 781 bool BlinkTestRunner::AddMediaStreamAudioSourceAndTrack(
780 blink::WebMediaStream* stream) { 782 blink::WebMediaStream* stream) {
781 DCHECK(stream); 783 DCHECK(stream);
782 #if defined(ENABLE_WEBRTC) 784 #if defined(ENABLE_WEBRTC)
783 return AddAudioTrackToMediaStream( 785 return AddAudioTrackToMediaStream(
784 make_scoped_refptr(new MockAudioCapturerSource()), 786 make_scoped_refptr(new MockAudioCapturerSource()),
785 false /* is_remote */, false /* is_readonly */, stream); 787 48000, // sample rate
788 media::CHANNEL_LAYOUT_STEREO,
789 480, // sample frames per buffer
790 false, // is_remote
791 false, // is_readonly
792 stream);
786 #else 793 #else
787 return false; 794 return false;
788 #endif 795 #endif
789 } 796 }
790 797
791 // RenderViewObserver -------------------------------------------------------- 798 // RenderViewObserver --------------------------------------------------------
792 799
793 void BlinkTestRunner::DidClearWindowObject(WebLocalFrame* frame) { 800 void BlinkTestRunner::DidClearWindowObject(WebLocalFrame* frame) {
794 WebTestingSupport::injectInternalsObject(frame); 801 WebTestingSupport::injectInternalsObject(frame);
795 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces()->BindTo( 802 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces()->BindTo(
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 get_bluetooth_events_callbacks_.pop_front(); 1040 get_bluetooth_events_callbacks_.pop_front();
1034 callback.Run(events); 1041 callback.Run(events);
1035 } 1042 }
1036 1043
1037 void BlinkTestRunner::ReportLeakDetectionResult( 1044 void BlinkTestRunner::ReportLeakDetectionResult(
1038 const LeakDetectionResult& report) { 1045 const LeakDetectionResult& report) {
1039 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 1046 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
1040 } 1047 }
1041 1048
1042 } // namespace content 1049 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/renderer_blink_platform_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698