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

Side by Side Diff: content/common/webkitplatformsupport_impl.cc

Issue 12457043: Android implementation of WebAudio audio file decoder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "content/common/child_thread.h" 6 #include "content/common/child_thread.h"
7 #include "content/common/socket_stream_dispatcher.h" 7 #include "content/common/socket_stream_dispatcher.h"
8 #include "content/common/webkitplatformsupport_impl.h" 8 #include "content/common/webkitplatformsupport_impl.h"
9 #include "content/public/common/content_client.h" 9 #include "content/public/common/content_client.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
11 11
12 #if defined(OS_ANDROID)
13 #include "base/file_descriptor_posix.h"
14 #include "base/shared_memory.h"
15 #include "content/common/view_messages.h"
16
17 namespace {
18 void RunWebAudioMediaCodec(
19 base::SharedMemoryHandle encoded_data_handle,
20 base::FileDescriptor pcm_output) {
21 content::ChildThread::current()->Send(
22 new ViewHostMsg_RunWebAudioMediaCodec(encoded_data_handle,
23 pcm_output));
24 }
25
26 } // anonymous namespace
27 #endif
28
12 namespace content { 29 namespace content {
13 30
14 WebKitPlatformSupportImpl::WebKitPlatformSupportImpl() { 31 WebKitPlatformSupportImpl::WebKitPlatformSupportImpl() {
15 } 32 }
16 33
17 WebKitPlatformSupportImpl::~WebKitPlatformSupportImpl() { 34 WebKitPlatformSupportImpl::~WebKitPlatformSupportImpl() {
18 } 35 }
19 36
20 string16 WebKitPlatformSupportImpl::GetLocalizedString(int message_id) { 37 string16 WebKitPlatformSupportImpl::GetLocalizedString(int message_id) {
21 return GetContentClient()->GetLocalizedString(message_id); 38 return GetContentClient()->GetLocalizedString(message_id);
(...skipping 20 matching lines...) Expand all
42 59
43 webkit_glue::WebSocketStreamHandleBridge* 60 webkit_glue::WebSocketStreamHandleBridge*
44 WebKitPlatformSupportImpl::CreateWebSocketBridge( 61 WebKitPlatformSupportImpl::CreateWebSocketBridge(
45 WebKit::WebSocketStreamHandle* handle, 62 WebKit::WebSocketStreamHandle* handle,
46 webkit_glue::WebSocketStreamHandleDelegate* delegate) { 63 webkit_glue::WebSocketStreamHandleDelegate* delegate) {
47 SocketStreamDispatcher* dispatcher = 64 SocketStreamDispatcher* dispatcher =
48 ChildThread::current()->socket_stream_dispatcher(); 65 ChildThread::current()->socket_stream_dispatcher();
49 return dispatcher->CreateBridge(handle, delegate); 66 return dispatcher->CreateBridge(handle, delegate);
50 } 67 }
51 68
69 #if defined(OS_ANDROID)
70 webkit_media::WebAudioMediaCodecRunner
71 WebKitPlatformSupportImpl::GetWebAudioMediaCodecRunner() {
72 return base::Bind(&RunWebAudioMediaCodec);
73 }
74 #endif
75
52 } // namespace content 76 } // namespace content
OLDNEW
« no previous file with comments | « content/common/webkitplatformsupport_impl.h ('k') | media/audio/android/audio_manager_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698