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

Side by Side Diff: content/renderer/media/media_stream_video_track.cc

Issue 509873002: Refactor MediaStreamTrack video onmute event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nits. Created 6 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/media/media_stream_video_track.h" 5 #include "content/renderer/media/media_stream_video_track.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h" 10 #include "third_party/libjingle/source/talk/app/webrtc/mediastreaminterface.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 256
257 void MediaStreamVideoTrack::OnReadyStateChanged( 257 void MediaStreamVideoTrack::OnReadyStateChanged(
258 blink::WebMediaStreamSource::ReadyState state) { 258 blink::WebMediaStreamSource::ReadyState state) {
259 DCHECK(thread_checker_.CalledOnValidThread()); 259 DCHECK(thread_checker_.CalledOnValidThread());
260 for (std::vector<MediaStreamVideoSink*>::const_iterator it = sinks_.begin(); 260 for (std::vector<MediaStreamVideoSink*>::const_iterator it = sinks_.begin();
261 it != sinks_.end(); ++it) { 261 it != sinks_.end(); ++it) {
262 (*it)->OnReadyStateChanged(state); 262 (*it)->OnReadyStateChanged(state);
263 } 263 }
264 } 264 }
265 265
266 void MediaStreamVideoTrack::SetMutedState(bool muted_state) {
267 DCHECK(thread_checker_.CalledOnValidThread());
268 muted_state_ = muted_state;
269 }
270
271 bool MediaStreamVideoTrack::GetMutedState(void) const {
272 DCHECK(thread_checker_.CalledOnValidThread());
273 return muted_state_;
274 }
275
276 } // namespace content 266 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_track.h ('k') | content/renderer/media/mock_media_stream_video_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698