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 "chrome/browser/prefs/pref_registry_simple.h" | 20 #include "base/prefs/pref_registry_simple.h" |
21 #include "chrome/browser/prefs/pref_service.h" | 21 #include "base/prefs/pref_service.h" |
22 #include "chrome/common/chrome_notification_types.h" | 22 #include "chrome/common/chrome_notification_types.h" |
23 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
24 | 24 |
25 using std::max; | 25 using std::max; |
26 using std::min; | 26 using std::min; |
27 | 27 |
28 namespace chromeos { | 28 namespace chromeos { |
29 | 29 |
30 namespace { | 30 namespace { |
31 | 31 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 mixer_->SetCaptureMuteLocked(false); | 189 mixer_->SetCaptureMuteLocked(false); |
190 if (local_state_->GetBoolean(prefs::kAudioCaptureAllowed)) { | 190 if (local_state_->GetBoolean(prefs::kAudioCaptureAllowed)) { |
191 mixer_->SetCaptureMuted(false); | 191 mixer_->SetCaptureMuted(false); |
192 } else { | 192 } else { |
193 mixer_->SetCaptureMuted(true); | 193 mixer_->SetCaptureMuted(true); |
194 mixer_->SetCaptureMuteLocked(true); | 194 mixer_->SetCaptureMuteLocked(true); |
195 } | 195 } |
196 } | 196 } |
197 | 197 |
198 } // namespace chromeos | 198 } // namespace chromeos |
OLD | NEW |