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

Side by Side Diff: components/test_runner/web_test_interfaces.cc

Issue 2501863003: Support for AudioContextOptions latencyHint. (Closed)
Patch Set: Fixes to WebAudioDeviceImpl unit test. Created 3 years, 10 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 "components/test_runner/web_test_interfaces.h" 5 #include "components/test_runner/web_test_interfaces.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "components/test_runner/mock_web_audio_device.h" 10 #include "components/test_runner/mock_web_audio_device.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 WebTestInterfaces::CreateWebRTCPeerConnectionHandler( 71 WebTestInterfaces::CreateWebRTCPeerConnectionHandler(
72 WebRTCPeerConnectionHandlerClient* client) { 72 WebRTCPeerConnectionHandlerClient* client) {
73 return new MockWebRTCPeerConnectionHandler(client, interfaces_.get()); 73 return new MockWebRTCPeerConnectionHandler(client, interfaces_.get());
74 } 74 }
75 75
76 WebMIDIAccessor* WebTestInterfaces::CreateMIDIAccessor( 76 WebMIDIAccessor* WebTestInterfaces::CreateMIDIAccessor(
77 WebMIDIAccessorClient* client) { 77 WebMIDIAccessorClient* client) {
78 return new MockWebMIDIAccessor(client, interfaces_.get()); 78 return new MockWebMIDIAccessor(client, interfaces_.get());
79 } 79 }
80 80
81 WebAudioDevice* WebTestInterfaces::CreateAudioDevice(double sample_rate) { 81 WebAudioDevice* WebTestInterfaces::CreateAudioDevice(double sample_rate,
82 return new MockWebAudioDevice(sample_rate); 82 int frames_per_buffer) {
83 return new MockWebAudioDevice(sample_rate, frames_per_buffer);
83 } 84 }
84 85
85 std::unique_ptr<WebFrameTestClient> WebTestInterfaces::CreateWebFrameTestClient( 86 std::unique_ptr<WebFrameTestClient> WebTestInterfaces::CreateWebFrameTestClient(
86 WebViewTestProxyBase* web_view_test_proxy_base, 87 WebViewTestProxyBase* web_view_test_proxy_base,
87 WebFrameTestProxyBase* web_frame_test_proxy_base) { 88 WebFrameTestProxyBase* web_frame_test_proxy_base) {
88 // TODO(lukasza): Do not pass the WebTestDelegate below - it's lifetime can 89 // TODO(lukasza): Do not pass the WebTestDelegate below - it's lifetime can
89 // differ from the lifetime of WebFrameTestClient - https://crbug.com/606594. 90 // differ from the lifetime of WebFrameTestClient - https://crbug.com/606594.
90 return base::MakeUnique<WebFrameTestClient>(interfaces_->GetDelegate(), 91 return base::MakeUnique<WebFrameTestClient>(interfaces_->GetDelegate(),
91 web_view_test_proxy_base, 92 web_view_test_proxy_base,
92 web_frame_test_proxy_base); 93 web_frame_test_proxy_base);
(...skipping 11 matching lines...) Expand all
104 } 105 }
105 106
106 std::vector<blink::WebView*> WebTestInterfaces::GetWindowList() { 107 std::vector<blink::WebView*> WebTestInterfaces::GetWindowList() {
107 std::vector<blink::WebView*> result; 108 std::vector<blink::WebView*> result;
108 for (WebViewTestProxyBase* proxy : interfaces_->GetWindowList()) 109 for (WebViewTestProxyBase* proxy : interfaces_->GetWindowList())
109 result.push_back(proxy->web_view()); 110 result.push_back(proxy->web_view());
110 return result; 111 return result;
111 } 112 }
112 113
113 } // namespace test_runner 114 } // namespace test_runner
OLDNEW
« no previous file with comments | « components/test_runner/web_test_interfaces.h ('k') | content/public/renderer/content_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698