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

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

Issue 2501863003: Support for AudioContextOptions latencyHint. (Closed)
Patch Set: Created 4 years, 1 month 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 (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/layout_test_content_renderer_client .h" 5 #include "content/shell/renderer/layout_test/layout_test_content_renderer_client .h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/debugger.h" 9 #include "base/debug/debugger.h"
10 #include "components/test_runner/mock_credential_manager_client.h" 10 #include "components/test_runner/mock_credential_manager_client.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 186 }
187 187
188 WebMIDIAccessor* 188 WebMIDIAccessor*
189 LayoutTestContentRendererClient::OverrideCreateMIDIAccessor( 189 LayoutTestContentRendererClient::OverrideCreateMIDIAccessor(
190 WebMIDIAccessorClient* client) { 190 WebMIDIAccessorClient* client) {
191 test_runner::WebTestInterfaces* interfaces = 191 test_runner::WebTestInterfaces* interfaces =
192 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces(); 192 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces();
193 return interfaces->CreateMIDIAccessor(client); 193 return interfaces->CreateMIDIAccessor(client);
194 } 194 }
195 195
196 WebAudioDevice* 196 WebAudioDevice* LayoutTestContentRendererClient::OverrideCreateAudioDevice(
197 LayoutTestContentRendererClient::OverrideCreateAudioDevice( 197 double sample_rate,
198 double sample_rate) { 198 int frames_per_buffer) {
199 test_runner::WebTestInterfaces* interfaces = 199 test_runner::WebTestInterfaces* interfaces =
200 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces(); 200 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces();
201 return interfaces->CreateAudioDevice(sample_rate); 201 return interfaces->CreateAudioDevice(sample_rate, frames_per_buffer);
202 } 202 }
203 203
204 WebClipboard* LayoutTestContentRendererClient::OverrideWebClipboard() { 204 WebClipboard* LayoutTestContentRendererClient::OverrideWebClipboard() {
205 if (!clipboard_) 205 if (!clipboard_)
206 clipboard_.reset(new MockWebClipboardImpl); 206 clipboard_.reset(new MockWebClipboardImpl);
207 return clipboard_.get(); 207 return clipboard_.get();
208 } 208 }
209 209
210 WebThemeEngine* LayoutTestContentRendererClient::OverrideThemeEngine() { 210 WebThemeEngine* LayoutTestContentRendererClient::OverrideThemeEngine() {
211 return LayoutTestRenderThreadObserver::GetInstance() 211 return LayoutTestRenderThreadObserver::GetInstance()
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 switches::kStableReleaseMode)) { 279 switches::kStableReleaseMode)) {
280 blink::WebRuntimeFeatures::enableTestOnlyFeatures(true); 280 blink::WebRuntimeFeatures::enableTestOnlyFeatures(true);
281 } 281 }
282 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 282 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
283 switches::kEnableFontAntialiasing)) { 283 switches::kEnableFontAntialiasing)) {
284 blink::setFontAntialiasingEnabledForTest(true); 284 blink::setFontAntialiasingEnabledForTest(true);
285 } 285 }
286 } 286 }
287 287
288 } // namespace content 288 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698