OLD | NEW |
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 "chrome/browser/chromeos/audio/audio_handler.h" | 5 #include "chrome/browser/chromeos/audio/audio_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/memory/singleton.h" | 13 #include "base/memory/singleton.h" |
14 #include "chrome/browser/browser_process.h" | 14 #include "chrome/browser/browser_process.h" |
15 #if defined(USE_CRAS) | 15 #if defined(USE_CRAS) |
16 #include "chrome/browser/chromeos/audio/audio_mixer_cras.h" | 16 #include "chrome/browser/chromeos/audio/audio_mixer_cras.h" |
17 #else | 17 #else |
18 #include "chrome/browser/chromeos/audio/audio_mixer_alsa.h" | 18 #include "chrome/browser/chromeos/audio/audio_mixer_alsa.h" |
19 #endif | 19 #endif |
20 #include "base/prefs/pref_registry_simple.h" | 20 #include "base/prefs/pref_registry_simple.h" |
21 #include "base/prefs/pref_service.h" | 21 #include "base/prefs/pref_service.h" |
22 #include "chrome/common/chrome_notification_types.h" | 22 #include "chrome/browser/chrome_notification_types.h" |
23 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
24 #include "chromeos/audio/audio_pref_handler.h" | 24 #include "chromeos/audio/audio_pref_handler.h" |
25 | 25 |
26 using std::max; | 26 using std::max; |
27 using std::min; | 27 using std::min; |
28 | 28 |
29 namespace chromeos { | 29 namespace chromeos { |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 mixer_->SetCaptureMuteLocked(false); | 188 mixer_->SetCaptureMuteLocked(false); |
189 if (audio_pref_handler_->GetAudioCaptureAllowedValue()) { | 189 if (audio_pref_handler_->GetAudioCaptureAllowedValue()) { |
190 mixer_->SetCaptureMuted(false); | 190 mixer_->SetCaptureMuted(false); |
191 } else { | 191 } else { |
192 mixer_->SetCaptureMuted(true); | 192 mixer_->SetCaptureMuted(true); |
193 mixer_->SetCaptureMuteLocked(true); | 193 mixer_->SetCaptureMuteLocked(true); |
194 } | 194 } |
195 } | 195 } |
196 | 196 |
197 } // namespace chromeos | 197 } // namespace chromeos |
OLD | NEW |