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

Side by Side Diff: content/shell/test_runner/mock_web_user_media_client.cc

Issue 2710213005: Revert of Remove |remote| and |readonly| members of MediaStreamTrack (Closed)
Patch Set: Created 3 years, 10 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/shell/test_runner/mock_web_user_media_client.h" 5 #include "content/shell/test_runner/mock_web_user_media_client.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 WebMediaStream stream; 57 WebMediaStream stream;
58 stream.initialize(WebVector<WebMediaStreamTrack>(), 58 stream.initialize(WebVector<WebMediaStreamTrack>(),
59 WebVector<WebMediaStreamTrack>()); 59 WebVector<WebMediaStreamTrack>());
60 stream.setExtraData(new MockExtraData()); 60 stream.setExtraData(new MockExtraData());
61 61
62 if (request.audio() && 62 if (request.audio() &&
63 !delegate_->AddMediaStreamAudioSourceAndTrack(&stream)) { 63 !delegate_->AddMediaStreamAudioSourceAndTrack(&stream)) {
64 WebMediaStreamSource source; 64 WebMediaStreamSource source;
65 source.initialize("MockAudioDevice#1", WebMediaStreamSource::TypeAudio, 65 source.initialize("MockAudioDevice#1", WebMediaStreamSource::TypeAudio,
66 "Mock audio device"); 66 "Mock audio device", false /* remote */);
67 WebMediaStreamTrack web_track; 67 WebMediaStreamTrack web_track;
68 web_track.initialize(source); 68 web_track.initialize(source);
69 stream.addTrack(web_track); 69 stream.addTrack(web_track);
70 } 70 }
71 71
72 if (request.video() && 72 if (request.video() &&
73 !delegate_->AddMediaStreamVideoSourceAndTrack(&stream)) { 73 !delegate_->AddMediaStreamVideoSourceAndTrack(&stream)) {
74 WebMediaStreamSource source; 74 WebMediaStreamSource source;
75 source.initialize("MockVideoDevice#1", WebMediaStreamSource::TypeVideo, 75 source.initialize("MockVideoDevice#1", WebMediaStreamSource::TypeVideo,
76 "Mock video device"); 76 "Mock video device", false /* remote */);
77 WebMediaStreamTrack web_track; 77 WebMediaStreamTrack web_track;
78 web_track.initialize(source); 78 web_track.initialize(source);
79 stream.addTrack(web_track); 79 stream.addTrack(web_track);
80 } 80 }
81 81
82 delegate_->PostTask(base::Bind(&WebUserMediaRequest::requestSucceeded, 82 delegate_->PostTask(base::Bind(&WebUserMediaRequest::requestSucceeded,
83 base::Owned(new WebUserMediaRequest(request)), 83 base::Owned(new WebUserMediaRequest(request)),
84 stream)); 84 stream));
85 } 85 }
86 86
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 if (!media_device_change_observer_.isNull()) 132 if (!media_device_change_observer_.isNull())
133 media_device_change_observer_.didChangeMediaDevices(); 133 media_device_change_observer_.didChangeMediaDevices();
134 } 134 }
135 135
136 void MockWebUserMediaClient::setMediaDeviceChangeObserver( 136 void MockWebUserMediaClient::setMediaDeviceChangeObserver(
137 const blink::WebMediaDeviceChangeObserver& observer) { 137 const blink::WebMediaDeviceChangeObserver& observer) {
138 media_device_change_observer_ = observer; 138 media_device_change_observer_ = observer;
139 } 139 }
140 140
141 } // namespace test_runner 141 } // namespace test_runner
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698