| 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 "content/renderer/renderer_webkitplatformsupport_impl.h" | 5 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_path.h" | 8 #include "base/file_path.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 layout = CHANNEL_LAYOUT_7_1; | 603 layout = CHANNEL_LAYOUT_7_1; |
| 604 break; | 604 break; |
| 605 default: | 605 default: |
| 606 layout = CHANNEL_LAYOUT_STEREO; | 606 layout = CHANNEL_LAYOUT_STEREO; |
| 607 } | 607 } |
| 608 | 608 |
| 609 media::AudioParameters params( | 609 media::AudioParameters params( |
| 610 media::AudioParameters::AUDIO_PCM_LOW_LATENCY, layout, | 610 media::AudioParameters::AUDIO_PCM_LOW_LATENCY, layout, |
| 611 static_cast<int>(sampleRate), 16, bufferSize); | 611 static_cast<int>(sampleRate), 16, bufferSize); |
| 612 | 612 |
| 613 return new RendererWebAudioDeviceImpl(params, callback); | 613 // TODO(miu): This method should be moved to RenderViewImpl. First, a WebKit |
| 614 // change must land: https://bugs.webkit.org/show_bug.cgi?id=92718 |
| 615 // This issue is being tracked in http://crbug.com/156535. For now, a stub: |
| 616 static const int kUnknownRenderViewId = -1; |
| 617 return new RendererWebAudioDeviceImpl(kUnknownRenderViewId, params, callback); |
| 614 } | 618 } |
| 615 | 619 |
| 616 //------------------------------------------------------------------------------ | 620 //------------------------------------------------------------------------------ |
| 617 | 621 |
| 618 WebKit::WebString | 622 WebKit::WebString |
| 619 RendererWebKitPlatformSupportImpl::signedPublicKeyAndChallengeString( | 623 RendererWebKitPlatformSupportImpl::signedPublicKeyAndChallengeString( |
| 620 unsigned key_size_index, | 624 unsigned key_size_index, |
| 621 const WebKit::WebString& challenge, | 625 const WebKit::WebString& challenge, |
| 622 const WebKit::WebURL& url) { | 626 const WebKit::WebURL& url) { |
| 623 std::string signed_public_key; | 627 std::string signed_public_key; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 const char16* characters, | 757 const char16* characters, |
| 754 size_t length, | 758 size_t length, |
| 755 size_t before_index, | 759 size_t before_index, |
| 756 const WebKit::WebString& locale) { | 760 const WebKit::WebString& locale) { |
| 757 // Crash if WebKit calls this function when canHyphenate returns false. | 761 // Crash if WebKit calls this function when canHyphenate returns false. |
| 758 DCHECK(locale.isEmpty() || locale.equals("en-US")); | 762 DCHECK(locale.isEmpty() || locale.equals("en-US")); |
| 759 DCHECK(hyphenator_.get()); | 763 DCHECK(hyphenator_.get()); |
| 760 return hyphenator_->ComputeLastHyphenLocation(string16(characters, length), | 764 return hyphenator_->ComputeLastHyphenLocation(string16(characters, length), |
| 761 before_index); | 765 before_index); |
| 762 } | 766 } |
| OLD | NEW |