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

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

Issue 1915793002: Remove a |readonly| member of MediaStreamTrack (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove a |readonly| argument in unittest files Created 4 years, 7 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/remote_media_stream_impl.h" 5 #include "content/renderer/media/remote_media_stream_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 DCHECK(main_thread_->BelongsToCurrentThread()); 96 DCHECK(main_thread_->BelongsToCurrentThread());
97 } 97 }
98 98
99 void InitializeWebkitTrack(blink::WebMediaStreamSource::Type type) { 99 void InitializeWebkitTrack(blink::WebMediaStreamSource::Type type) {
100 DCHECK(main_thread_->BelongsToCurrentThread()); 100 DCHECK(main_thread_->BelongsToCurrentThread());
101 DCHECK(webkit_track_.isNull()); 101 DCHECK(webkit_track_.isNull());
102 102
103 blink::WebString webkit_track_id(base::UTF8ToUTF16(id_)); 103 blink::WebString webkit_track_id(base::UTF8ToUTF16(id_));
104 blink::WebMediaStreamSource webkit_source; 104 blink::WebMediaStreamSource webkit_source;
105 webkit_source.initialize(webkit_track_id, type, webkit_track_id, 105 webkit_source.initialize(webkit_track_id, type, webkit_track_id,
106 true /* remote */, true /* readonly */); 106 true /* remote */);
107 webkit_track_.initialize(webkit_track_id, webkit_source); 107 webkit_track_.initialize(webkit_track_id, webkit_source);
108 DCHECK(!webkit_track_.isNull()); 108 DCHECK(!webkit_track_.isNull());
109 } 109 }
110 110
111 const scoped_refptr<base::SingleThreadTaskRunner> main_thread_; 111 const scoped_refptr<base::SingleThreadTaskRunner> main_thread_;
112 // This callback will be run when Initialize() is called and then freed. 112 // This callback will be run when Initialize() is called and then freed.
113 // The callback is used by derived classes to bind objects that need to be 113 // The callback is used by derived classes to bind objects that need to be
114 // instantiated and initialized on the signaling thread but then moved to 114 // instantiated and initialized on the signaling thread but then moved to
115 // and used on the main thread when initializing the webkit object(s). 115 // and used on the main thread when initializing the webkit object(s).
116 base::Callback<void()> webkit_initialize_; 116 base::Callback<void()> webkit_initialize_;
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 // Unregister all the audio track observers that were not used. 424 // Unregister all the audio track observers that were not used.
425 // We need to do this before destruction since the observers can't unregister 425 // We need to do this before destruction since the observers can't unregister
426 // from within the dtor due to a race. 426 // from within the dtor due to a race.
427 for (auto& track : *audio_tracks.get()) { 427 for (auto& track : *audio_tracks.get()) {
428 if (track.get()) 428 if (track.get())
429 track->Unregister(); 429 track->Unregister();
430 } 430 }
431 } 431 }
432 432
433 } // namespace content 433 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698