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

Side by Side Diff: webkit/glue/webkitplatformsupport_impl.cc

Issue 13084005: Add WebAudio impulse responses Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add WebAudio impulse responses Created 7 years, 8 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 (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/glue/webkitplatformsupport_impl.h" 5 #include "webkit/glue/webkitplatformsupport_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "webkit/glue/websocketstreamhandle_impl.h" 49 #include "webkit/glue/websocketstreamhandle_impl.h"
50 #include "webkit/glue/webthread_impl.h" 50 #include "webkit/glue/webthread_impl.h"
51 #include "webkit/glue/weburlloader_impl.h" 51 #include "webkit/glue/weburlloader_impl.h"
52 #include "webkit/glue/worker_task_runner.h" 52 #include "webkit/glue/worker_task_runner.h"
53 #include "webkit/media/audio_decoder.h" 53 #include "webkit/media/audio_decoder.h"
54 #include "webkit/plugins/npapi/plugin_instance.h" 54 #include "webkit/plugins/npapi/plugin_instance.h"
55 #include "webkit/plugins/webplugininfo.h" 55 #include "webkit/plugins/webplugininfo.h"
56 #include "webkit/user_agent/user_agent.h" 56 #include "webkit/user_agent/user_agent.h"
57 57
58 #if defined(OS_ANDROID) 58 #if defined(OS_ANDROID)
59 #include "third_party/WebKit/Source/Platform/chromium/public/WebAudioBus.h"
59 #include "webkit/glue/fling_animator_impl_android.h" 60 #include "webkit/glue/fling_animator_impl_android.h"
61 #include "webkit/media/android/webaudio_assets_impl_android.h"
60 #endif 62 #endif
61 63
62 using WebKit::WebAudioBus; 64 using WebKit::WebAudioBus;
63 using WebKit::WebCookie; 65 using WebKit::WebCookie;
64 using WebKit::WebData; 66 using WebKit::WebData;
65 using WebKit::WebLocalizedString; 67 using WebKit::WebLocalizedString;
66 using WebKit::WebPluginListBuilder; 68 using WebKit::WebPluginListBuilder;
67 using WebKit::WebString; 69 using WebKit::WebString;
68 using WebKit::WebSocketStreamHandle; 70 using WebKit::WebSocketStreamHandle;
69 using WebKit::WebThemeEngine; 71 using WebKit::WebThemeEngine;
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after
674 676
675 bool WebKitPlatformSupportImpl::loadAudioResource( 677 bool WebKitPlatformSupportImpl::loadAudioResource(
676 WebKit::WebAudioBus* destination_bus, const char* audio_file_data, 678 WebKit::WebAudioBus* destination_bus, const char* audio_file_data,
677 size_t data_size, double sample_rate) { 679 size_t data_size, double sample_rate) {
678 return webkit_media::DecodeAudioFileData(destination_bus, 680 return webkit_media::DecodeAudioFileData(destination_bus,
679 audio_file_data, 681 audio_file_data,
680 data_size, 682 data_size,
681 sample_rate); 683 sample_rate);
682 } 684 }
683 685
686 #if defined(OS_ANDROID)
687 const char* WebKitPlatformSupportImpl::loadAudioAsset(
688 const char* audio_file_data) {
689 return webkit_media::webAudioAssetFileName(audio_file_data);
690 }
691 #endif
692
684 WebString WebKitPlatformSupportImpl::queryLocalizedString( 693 WebString WebKitPlatformSupportImpl::queryLocalizedString(
685 WebLocalizedString::Name name) { 694 WebLocalizedString::Name name) {
686 int message_id = ToMessageID(name); 695 int message_id = ToMessageID(name);
687 if (message_id < 0) 696 if (message_id < 0)
688 return WebString(); 697 return WebString();
689 return GetLocalizedString(message_id); 698 return GetLocalizedString(message_id);
690 } 699 }
691 700
692 WebString WebKitPlatformSupportImpl::queryLocalizedString( 701 WebString WebKitPlatformSupportImpl::queryLocalizedString(
693 WebLocalizedString::Name name, int numeric_value) { 702 WebLocalizedString::Name name, int numeric_value) {
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 return NULL; 965 return NULL;
957 scoped_ptr<WebDiscardableMemoryImpl> discardable( 966 scoped_ptr<WebDiscardableMemoryImpl> discardable(
958 new WebDiscardableMemoryImpl()); 967 new WebDiscardableMemoryImpl());
959 if (discardable->InitializeAndLock(bytes)) 968 if (discardable->InitializeAndLock(bytes))
960 return discardable.release(); 969 return discardable.release();
961 return NULL; 970 return NULL;
962 } 971 }
963 972
964 973
965 } // namespace webkit_glue 974 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/glue/webkitplatformsupport_impl.h ('k') | webkit/media/android/webaudio_assets_impl_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698