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

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

Issue 2501863003: Support for AudioContextOptions latencyHint. (Closed)
Patch Set: Updates based on reviewer comments. Created 4 years 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } 187 }
188 188
189 WebMIDIAccessor* 189 WebMIDIAccessor*
190 LayoutTestContentRendererClient::OverrideCreateMIDIAccessor( 190 LayoutTestContentRendererClient::OverrideCreateMIDIAccessor(
191 WebMIDIAccessorClient* client) { 191 WebMIDIAccessorClient* client) {
192 test_runner::WebTestInterfaces* interfaces = 192 test_runner::WebTestInterfaces* interfaces =
193 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces(); 193 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces();
194 return interfaces->CreateMIDIAccessor(client); 194 return interfaces->CreateMIDIAccessor(client);
195 } 195 }
196 196
197 WebAudioDevice* 197 WebAudioDevice* LayoutTestContentRendererClient::OverrideCreateAudioDevice() {
198 LayoutTestContentRendererClient::OverrideCreateAudioDevice(
199 double sample_rate) {
200 test_runner::WebTestInterfaces* interfaces = 198 test_runner::WebTestInterfaces* interfaces =
201 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces(); 199 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces();
202 return interfaces->CreateAudioDevice(sample_rate); 200 return interfaces->CreateAudioDevice(44100, 128);
203 } 201 }
204 202
205 WebClipboard* LayoutTestContentRendererClient::OverrideWebClipboard() { 203 WebClipboard* LayoutTestContentRendererClient::OverrideWebClipboard() {
206 if (!clipboard_) 204 if (!clipboard_)
207 clipboard_.reset(new MockWebClipboardImpl); 205 clipboard_.reset(new MockWebClipboardImpl);
208 return clipboard_.get(); 206 return clipboard_.get();
209 } 207 }
210 208
211 WebThemeEngine* LayoutTestContentRendererClient::OverrideThemeEngine() { 209 WebThemeEngine* LayoutTestContentRendererClient::OverrideThemeEngine() {
212 return LayoutTestRenderThreadObserver::GetInstance() 210 return LayoutTestRenderThreadObserver::GetInstance()
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 switches::kStableReleaseMode)) { 278 switches::kStableReleaseMode)) {
281 blink::WebRuntimeFeatures::enableTestOnlyFeatures(true); 279 blink::WebRuntimeFeatures::enableTestOnlyFeatures(true);
282 } 280 }
283 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 281 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
284 switches::kEnableFontAntialiasing)) { 282 switches::kEnableFontAntialiasing)) {
285 blink::setFontAntialiasingEnabledForTest(true); 283 blink::setFontAntialiasingEnabledForTest(true);
286 } 284 }
287 } 285 }
288 286
289 } // namespace content 287 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698