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

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

Issue 2425703002: Remove |remote| and |readonly| members of MediaStreamTrack (Closed)
Patch Set: Fixed webkit_tests Created 3 years, 9 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 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // MediaStreamSource override. 136 // MediaStreamSource override.
137 void DoStopSource() final; 137 void DoStopSource() final;
138 138
139 // Removes |track| from the list of instances that get a copy of the source 139 // Removes |track| from the list of instances that get a copy of the source
140 // audio data. The "stop callback" that was provided to the track calls 140 // audio data. The "stop callback" that was provided to the track calls
141 // this. 141 // this.
142 void StopAudioDeliveryTo(MediaStreamAudioTrack* track); 142 void StopAudioDeliveryTo(MediaStreamAudioTrack* track);
143 143
144 // True if the source of audio is a local device. False if the source is 144 // True if the source of audio is a local device. False if the source is
145 // remote (e.g., streamed-in from a server). 145 // remote (e.g., streamed-in from a server).
146 // TODO(crbug.com/598704): should be remove is_local_source_ variable.
146 const bool is_local_source_; 147 const bool is_local_source_;
147 148
148 // Set to true once this source has been permanently stopped. 149 // Set to true once this source has been permanently stopped.
149 bool is_stopped_; 150 bool is_stopped_;
150 151
151 // Manages tracks connected to this source and the audio format and data flow. 152 // Manages tracks connected to this source and the audio format and data flow.
152 MediaStreamAudioDeliverer<MediaStreamAudioTrack> deliverer_; 153 MediaStreamAudioDeliverer<MediaStreamAudioTrack> deliverer_;
153 154
154 // The task runner for main thread. Also used to check that all methods that 155 // The task runner for main thread. Also used to check that all methods that
155 // could cause object graph or data flow changes are being called on the main 156 // could cause object graph or data flow changes are being called on the main
156 // thread. 157 // thread.
157 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; 158 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
158 159
159 // Provides weak pointers so that MediaStreamAudioTracks won't call 160 // Provides weak pointers so that MediaStreamAudioTracks won't call
160 // StopAudioDeliveryTo() if this instance dies first. 161 // StopAudioDeliveryTo() if this instance dies first.
161 base::WeakPtrFactory<MediaStreamAudioSource> weak_factory_; 162 base::WeakPtrFactory<MediaStreamAudioSource> weak_factory_;
162 163
163 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioSource); 164 DISALLOW_COPY_AND_ASSIGN(MediaStreamAudioSource);
164 }; 165 };
165 166
166 } // namespace content 167 } // namespace content
167 168
168 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_ 169 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_AUDIO_SOURCE_H_
OLDNEW
« no previous file with comments | « content/renderer/media/external_media_stream_audio_source.cc ('k') | content/renderer/media/media_stream_audio_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698