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

Side by Side Diff: content/browser/media/capture/web_contents_audio_muter.cc

Issue 1897953003: Unmute Tab Audio For Desktop Share (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
OLDNEW
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 "base/macros.h" 9 #include "base/macros.h"
10 #include "content/browser/media/capture/audio_mirroring_manager.h" 10 #include "content/browser/media/capture/audio_mirroring_manager.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 matches.insert(*i); 105 matches.insert(*i);
106 } 106 }
107 results_callback.Run(matches); 107 results_callback.Run(matches);
108 } 108 }
109 109
110 media::AudioOutputStream* AddInput( 110 media::AudioOutputStream* AddInput(
111 const media::AudioParameters& params) override { 111 const media::AudioParameters& params) override {
112 return new AudioDiscarder(params); 112 return new AudioDiscarder(params);
113 } 113 }
114 114
115 media::AudioPushSink* AddPushInput(
116 const media::AudioParameters& params) override {
117 NOTREACHED();
118 return nullptr;
119 }
120
121 bool IsDuplication() override { return false; }
122
115 WebContents* const web_contents_; 123 WebContents* const web_contents_;
116 124
117 DISALLOW_COPY_AND_ASSIGN(MuteDestination); 125 DISALLOW_COPY_AND_ASSIGN(MuteDestination);
118 }; 126 };
119 127
120 WebContentsAudioMuter::WebContentsAudioMuter(WebContents* web_contents) 128 WebContentsAudioMuter::WebContentsAudioMuter(WebContents* web_contents)
121 : destination_(new MuteDestination(web_contents)), is_muting_(false) { 129 : destination_(new MuteDestination(web_contents)), is_muting_(false) {
122 DCHECK_CURRENTLY_ON(BrowserThread::UI); 130 DCHECK_CURRENTLY_ON(BrowserThread::UI);
123 } 131 }
124 132
(...skipping 20 matching lines...) Expand all
145 return; 153 return;
146 is_muting_ = false; 154 is_muting_ = false;
147 BrowserThread::PostTask( 155 BrowserThread::PostTask(
148 BrowserThread::IO, FROM_HERE, 156 BrowserThread::IO, FROM_HERE,
149 base::Bind(&AudioMirroringManager::StopMirroring, 157 base::Bind(&AudioMirroringManager::StopMirroring,
150 base::Unretained(AudioMirroringManager::GetInstance()), 158 base::Unretained(AudioMirroringManager::GetInstance()),
151 base::RetainedRef(destination_))); 159 base::RetainedRef(destination_)));
152 } 160 }
153 161
154 } // namespace content 162 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698