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

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 #endif
17
12 namespace content { 18 namespace content {
13 19
14 WebKitPlatformSupportImpl::WebKitPlatformSupportImpl() { 20 WebKitPlatformSupportImpl::WebKitPlatformSupportImpl() {
15 } 21 }
16 22
17 WebKitPlatformSupportImpl::~WebKitPlatformSupportImpl() { 23 WebKitPlatformSupportImpl::~WebKitPlatformSupportImpl() {
18 } 24 }
19 25
20 string16 WebKitPlatformSupportImpl::GetLocalizedString(int message_id) { 26 string16 WebKitPlatformSupportImpl::GetLocalizedString(int message_id) {
21 return GetContentClient()->GetLocalizedString(message_id); 27 return GetContentClient()->GetLocalizedString(message_id);
(...skipping 20 matching lines...) Expand all
42 48
43 webkit_glue::WebSocketStreamHandleBridge* 49 webkit_glue::WebSocketStreamHandleBridge*
44 WebKitPlatformSupportImpl::CreateWebSocketBridge( 50 WebKitPlatformSupportImpl::CreateWebSocketBridge(
45 WebKit::WebSocketStreamHandle* handle, 51 WebKit::WebSocketStreamHandle* handle,
46 webkit_glue::WebSocketStreamHandleDelegate* delegate) { 52 webkit_glue::WebSocketStreamHandleDelegate* delegate) {
47 SocketStreamDispatcher* dispatcher = 53 SocketStreamDispatcher* dispatcher =
48 ChildThread::current()->socket_stream_dispatcher(); 54 ChildThread::current()->socket_stream_dispatcher();
49 return dispatcher->CreateBridge(handle, delegate); 55 return dispatcher->CreateBridge(handle, delegate);
50 } 56 }
51 57
58 #if defined(OS_ANDROID)
59 webkit_media::WebAudioMediaCodecRunner
60 WebKitPlatformSupportImpl::GetWebAudioMediaCodecRunner() {
61 return base::Bind(&WebKitPlatformSupportImpl::RunWebAudioMediaCodec);
bulach 2013/03/28 13:39:25 nit: unindent
62 }
63
64 /*static*/
65 void WebKitPlatformSupportImpl::RunWebAudioMediaCodec(
66 base::SharedMemoryHandle encoded_data_handle,
67 base::FileDescriptor pcm_output) {
68 content::ChildThread::current()->Send(
69 new ViewHostMsg_WebAudioMediaCodec(encoded_data_handle,
70 pcm_output));
71 }
72 #endif
52 } // namespace content 73 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698