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

Side by Side Diff: content/renderer/media/media_stream_track.h

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
« no previous file with comments | « no previous file | content/renderer/media/media_stream_track.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_TRACK_EXTRA_DATA_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_TRACK_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_TRACK_EXTRA_DATA_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_TRACK_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/threading/thread_checker.h" 11 #include "base/threading/thread_checker.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" 13 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
14 14
15 namespace webrtc { 15 namespace webrtc {
16 class AudioTrackInterface; 16 class AudioTrackInterface;
(...skipping 12 matching lines...) Expand all
29 const scoped_refptr<webrtc::MediaStreamTrackInterface>& track, 29 const scoped_refptr<webrtc::MediaStreamTrackInterface>& track,
30 bool is_local_track); 30 bool is_local_track);
31 virtual ~MediaStreamTrack(); 31 virtual ~MediaStreamTrack();
32 32
33 static MediaStreamTrack* GetTrack( 33 static MediaStreamTrack* GetTrack(
34 const blink::WebMediaStreamTrack& track); 34 const blink::WebMediaStreamTrack& track);
35 35
36 // If a subclass overrides this method it has to call the base class. 36 // If a subclass overrides this method it has to call the base class.
37 virtual void SetEnabled(bool enabled); 37 virtual void SetEnabled(bool enabled);
38 38
39 virtual void SetMutedState(bool muted_state);
40 virtual bool GetMutedState(void) const;
41
42 // TODO(xians): Make this pure virtual when Stop[Track] has been 39 // TODO(xians): Make this pure virtual when Stop[Track] has been
43 // implemented for remote audio tracks. 40 // implemented for remote audio tracks.
44 virtual void Stop(); 41 virtual void Stop();
45 42
46 virtual webrtc::AudioTrackInterface* GetAudioAdapter(); 43 virtual webrtc::AudioTrackInterface* GetAudioAdapter();
47 44
48 bool is_local_track () const { return is_local_track_; } 45 bool is_local_track () const { return is_local_track_; }
49 46
50 protected: 47 protected:
51 scoped_refptr<webrtc::MediaStreamTrackInterface> track_; 48 scoped_refptr<webrtc::MediaStreamTrackInterface> track_;
52 49
53 // Set to true if the owner MediaStreamSource is not delivering frames.
54 bool muted_state_;
55
56 private: 50 private:
57 const bool is_local_track_; 51 const bool is_local_track_;
58 52
59 base::ThreadChecker thread_checker_; 53 base::ThreadChecker thread_checker_;
60 54
61 DISALLOW_COPY_AND_ASSIGN(MediaStreamTrack); 55 DISALLOW_COPY_AND_ASSIGN(MediaStreamTrack);
62 }; 56 };
63 57
64 } // namespace content 58 } // namespace content
65 59
66 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_TRACK_EXTRA_DATA_H_ 60 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_TRACK_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/media_stream_track.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698