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

Side by Side Diff: media/audio/android/audio_manager_android.cc

Issue 66183002: Replace MessageLoopProxy with SingleThreadTaskRunner for the rest of media/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win and audio tests Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « media/audio/alsa/alsa_output_unittest.cc ('k') | media/audio/audio_input_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "media/audio/android/audio_manager_android.h" 5 #include "media/audio/android/audio_manager_android.h"
6 6
7 #include "base/android/build_info.h" 7 #include "base/android/build_info.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/android/jni_string.h" 9 #include "base/android/jni_string.h"
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 j_audio_manager_.obj()); 287 j_audio_manager_.obj());
288 } 288 }
289 289
290 void AudioManagerAndroid::Close() { 290 void AudioManagerAndroid::Close() {
291 Java_AudioManagerAndroid_close( 291 Java_AudioManagerAndroid_close(
292 base::android::AttachCurrentThread(), 292 base::android::AttachCurrentThread(),
293 j_audio_manager_.obj()); 293 j_audio_manager_.obj());
294 } 294 }
295 295
296 void AudioManagerAndroid::SetMute(JNIEnv* env, jobject obj, jboolean muted) { 296 void AudioManagerAndroid::SetMute(JNIEnv* env, jobject obj, jboolean muted) {
297 GetMessageLoop()->PostTask( 297 GetTaskRunner()->PostTask(
298 FROM_HERE, 298 FROM_HERE,
299 base::Bind( 299 base::Bind(
300 &AudioManagerAndroid::DoSetMuteOnAudioThread, 300 &AudioManagerAndroid::DoSetMuteOnAudioThread,
301 base::Unretained(this), 301 base::Unretained(this),
302 muted)); 302 muted));
303 } 303 }
304 304
305 void AudioManagerAndroid::DoSetMuteOnAudioThread(bool muted) { 305 void AudioManagerAndroid::DoSetMuteOnAudioThread(bool muted) {
306 base::AutoLock lock(streams_lock_); 306 base::AutoLock lock(streams_lock_);
307 for (OutputStreams::iterator it = streams_.begin(); 307 for (OutputStreams::iterator it = streams_.begin();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 j_audio_manager_.obj()); 342 j_audio_manager_.obj());
343 } 343 }
344 344
345 int AudioManagerAndroid::GetAudioLowLatencyOutputFrameSize() { 345 int AudioManagerAndroid::GetAudioLowLatencyOutputFrameSize() {
346 return Java_AudioManagerAndroid_getAudioLowLatencyOutputFrameSize( 346 return Java_AudioManagerAndroid_getAudioLowLatencyOutputFrameSize(
347 base::android::AttachCurrentThread(), 347 base::android::AttachCurrentThread(),
348 j_audio_manager_.obj()); 348 j_audio_manager_.obj());
349 } 349 }
350 350
351 } // namespace media 351 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/alsa/alsa_output_unittest.cc ('k') | media/audio/audio_input_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698