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

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

Issue 2352853002: Disallow redundant Bind calls. (Closed)
Patch Set: static_assert message tweak Created 4 years, 2 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
« no previous file with comments | « device/serial/data_sender.cc ('k') | media/base/bind_to_current_loop.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/context_utils.h" 8 #include "base/android/context_utils.h"
9 #include "base/android/jni_array.h" 9 #include "base/android/jni_array.h"
10 #include "base/android/jni_string.h" 10 #include "base/android/jni_string.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 if (j_audio_manager_.is_null()) 75 if (j_audio_manager_.is_null())
76 return; 76 return;
77 DVLOG(2) << "Destroying Java part of the audio manager"; 77 DVLOG(2) << "Destroying Java part of the audio manager";
78 Java_AudioManagerAndroid_close(base::android::AttachCurrentThread(), 78 Java_AudioManagerAndroid_close(base::android::AttachCurrentThread(),
79 j_audio_manager_); 79 j_audio_manager_);
80 j_audio_manager_.Reset(); 80 j_audio_manager_.Reset();
81 } 81 }
82 82
83 void AudioManagerAndroid::InitializeIfNeeded() { 83 void AudioManagerAndroid::InitializeIfNeeded() {
84 GetTaskRunner()->PostTask( 84 GetTaskRunner()->PostTask(
85 FROM_HERE, base::Bind(base::Bind(base::IgnoreResult( 85 FROM_HERE,
86 &AudioManagerAndroid::GetJavaAudioManager)), 86 base::Bind(base::IgnoreResult(&AudioManagerAndroid::GetJavaAudioManager),
87 base::Unretained(this))); 87 base::Unretained(this)));
88 } 88 }
89 89
90 bool AudioManagerAndroid::HasAudioOutputDevices() { 90 bool AudioManagerAndroid::HasAudioOutputDevices() {
91 return true; 91 return true;
92 } 92 }
93 93
94 bool AudioManagerAndroid::HasAudioInputDevices() { 94 bool AudioManagerAndroid::HasAudioInputDevices() {
95 return true; 95 return true;
96 } 96 }
97 97
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 output_volume_override_ = volume; 424 output_volume_override_ = volume;
425 425
426 DCHECK(GetTaskRunner()->BelongsToCurrentThread()); 426 DCHECK(GetTaskRunner()->BelongsToCurrentThread());
427 for (OutputStreams::iterator it = streams_.begin(); 427 for (OutputStreams::iterator it = streams_.begin();
428 it != streams_.end(); ++it) { 428 it != streams_.end(); ++it) {
429 (*it)->SetVolume(volume); 429 (*it)->SetVolume(volume);
430 } 430 }
431 } 431 }
432 432
433 } // namespace media 433 } // namespace media
OLDNEW
« no previous file with comments | « device/serial/data_sender.cc ('k') | media/base/bind_to_current_loop.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698