OLD | NEW |
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 "webkit/support/test_webkit_platform_support.h" | 5 #include "webkit/support/test_webkit_platform_support.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" |
9 #include "base/metrics/stats_counters.h" | 9 #include "base/metrics/stats_counters.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 | 437 |
438 double TestWebKitPlatformSupport::audioHardwareSampleRate() { | 438 double TestWebKitPlatformSupport::audioHardwareSampleRate() { |
439 return 44100.0; | 439 return 44100.0; |
440 } | 440 } |
441 | 441 |
442 size_t TestWebKitPlatformSupport::audioHardwareBufferSize() { | 442 size_t TestWebKitPlatformSupport::audioHardwareBufferSize() { |
443 return 128; | 443 return 128; |
444 } | 444 } |
445 | 445 |
446 WebKit::WebAudioDevice* TestWebKitPlatformSupport::createAudioDevice( | 446 WebKit::WebAudioDevice* TestWebKitPlatformSupport::createAudioDevice( |
| 447 size_t bufferSize, unsigned numberOfInputChannels, |
| 448 unsigned numberOfChannels, double sampleRate, |
| 449 WebKit::WebAudioDevice::RenderCallback*) { |
| 450 return new WebAudioDeviceMock(sampleRate); |
| 451 } |
| 452 |
| 453 // TODO(crogers): remove once WebKit switches to new API. |
| 454 WebKit::WebAudioDevice* TestWebKitPlatformSupport::createAudioDevice( |
447 size_t bufferSize, unsigned numberOfChannels, double sampleRate, | 455 size_t bufferSize, unsigned numberOfChannels, double sampleRate, |
448 WebKit::WebAudioDevice::RenderCallback*) { | 456 WebKit::WebAudioDevice::RenderCallback*) { |
449 return new WebAudioDeviceMock(sampleRate); | 457 return new WebAudioDeviceMock(sampleRate); |
450 } | 458 } |
451 | 459 |
452 void TestWebKitPlatformSupport::sampleGamepads(WebKit::WebGamepads& data) { | 460 void TestWebKitPlatformSupport::sampleGamepads(WebKit::WebGamepads& data) { |
453 data = gamepad_data_; | 461 data = gamepad_data_; |
454 } | 462 } |
455 | 463 |
456 void TestWebKitPlatformSupport::setGamepadData( | 464 void TestWebKitPlatformSupport::setGamepadData( |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 return 0; | 598 return 0; |
591 } | 599 } |
592 | 600 |
593 WebKit::WebGestureCurve* TestWebKitPlatformSupport::createFlingAnimationCurve( | 601 WebKit::WebGestureCurve* TestWebKitPlatformSupport::createFlingAnimationCurve( |
594 int device_source, | 602 int device_source, |
595 const WebKit::WebFloatPoint& velocity, | 603 const WebKit::WebFloatPoint& velocity, |
596 const WebKit::WebSize& cumulative_scroll) { | 604 const WebKit::WebSize& cumulative_scroll) { |
597 // Caller will retain and release. | 605 // Caller will retain and release. |
598 return new WebGestureCurveMock(velocity, cumulative_scroll); | 606 return new WebGestureCurveMock(velocity, cumulative_scroll); |
599 } | 607 } |
OLD | NEW |