OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/browser/media/capture/web_contents_audio_muter.h" | 5 #include "content/browser/media/capture/web_contents_audio_muter.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "content/browser/media/capture/audio_mirroring_manager.h" | 9 #include "content/browser/media/capture/audio_mirroring_manager.h" |
10 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
(...skipping 29 matching lines...) Expand all Loading... |
40 virtual void Stop() OVERRIDE { consumer_.Stop(); } | 40 virtual void Stop() OVERRIDE { consumer_.Stop(); } |
41 virtual void SetVolume(double volume) OVERRIDE {} | 41 virtual void SetVolume(double volume) OVERRIDE {} |
42 virtual void GetVolume(double* volume) OVERRIDE { *volume = 0; } | 42 virtual void GetVolume(double* volume) OVERRIDE { *volume = 0; } |
43 virtual void Close() OVERRIDE { delete this; } | 43 virtual void Close() OVERRIDE { delete this; } |
44 | 44 |
45 private: | 45 private: |
46 virtual ~AudioDiscarder() {} | 46 virtual ~AudioDiscarder() {} |
47 | 47 |
48 static void FetchAudioData(AudioSourceCallback* callback, | 48 static void FetchAudioData(AudioSourceCallback* callback, |
49 media::AudioBus* audio_bus) { | 49 media::AudioBus* audio_bus) { |
50 callback->OnMoreData(audio_bus, media::AudioBuffersState()); | 50 callback->OnMoreData(audio_bus, 0); |
51 } | 51 } |
52 | 52 |
53 // Calls FetchAudioData() at regular intervals and discards the data. | 53 // Calls FetchAudioData() at regular intervals and discards the data. |
54 media::FakeAudioConsumer consumer_; | 54 media::FakeAudioConsumer consumer_; |
55 | 55 |
56 DISALLOW_COPY_AND_ASSIGN(AudioDiscarder); | 56 DISALLOW_COPY_AND_ASSIGN(AudioDiscarder); |
57 }; | 57 }; |
58 | 58 |
59 } // namespace | 59 } // namespace |
60 | 60 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 is_muting_ = false; | 144 is_muting_ = false; |
145 BrowserThread::PostTask( | 145 BrowserThread::PostTask( |
146 BrowserThread::IO, | 146 BrowserThread::IO, |
147 FROM_HERE, | 147 FROM_HERE, |
148 base::Bind(&AudioMirroringManager::StopMirroring, | 148 base::Bind(&AudioMirroringManager::StopMirroring, |
149 base::Unretained(AudioMirroringManager::GetInstance()), | 149 base::Unretained(AudioMirroringManager::GetInstance()), |
150 destination_)); | 150 destination_)); |
151 } | 151 } |
152 | 152 |
153 } // namespace content | 153 } // namespace content |
OLD | NEW |