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

Side by Side Diff: chromecast/media/audio/cast_audio_output_stream_unittest.cc

Issue 1855633002: Revert of [chromecast] Pass media task runner to MediaPipelineBackendManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Created 4 years, 8 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chromecast/media/audio/cast_audio_output_stream.h" 5 #include "chromecast/media/audio/cast_audio_output_stream.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 178 }
179 void OnError(::media::AudioOutputStream* stream) override { error_ = true; } 179 void OnError(::media::AudioOutputStream* stream) override { error_ = true; }
180 180
181 private: 181 private:
182 bool error_; 182 bool error_;
183 }; 183 };
184 184
185 class FakeAudioManager : public CastAudioManager { 185 class FakeAudioManager : public CastAudioManager {
186 public: 186 public:
187 FakeAudioManager() 187 FakeAudioManager()
188 : CastAudioManager(nullptr, nullptr), media_pipeline_backend_(nullptr) {} 188 : CastAudioManager(nullptr), media_pipeline_backend_(nullptr) {}
189 ~FakeAudioManager() override {} 189 ~FakeAudioManager() override {}
190 190
191 // CastAudioManager overrides. 191 // CastAudioManager overrides.
192 scoped_ptr<MediaPipelineBackend> CreateMediaPipelineBackend( 192 scoped_ptr<MediaPipelineBackend> CreateMediaPipelineBackend(
193 const MediaPipelineDeviceParams& params) override { 193 const MediaPipelineDeviceParams& params) override {
194 DCHECK(media::MediaMessageLoop::GetTaskRunner()->BelongsToCurrentThread()); 194 DCHECK(media::MediaMessageLoop::GetTaskRunner()->BelongsToCurrentThread());
195 DCHECK(!media_pipeline_backend_); 195 DCHECK(!media_pipeline_backend_);
196 196
197 scoped_ptr<FakeMediaPipelineBackend> backend( 197 scoped_ptr<FakeMediaPipelineBackend> backend(
198 new FakeMediaPipelineBackend()); 198 new FakeMediaPipelineBackend());
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 TEST_F(CastAudioOutputStreamTest, CloseWithoutStart) { 647 TEST_F(CastAudioOutputStreamTest, CloseWithoutStart) {
648 ::media::AudioOutputStream* stream = CreateStream(); 648 ::media::AudioOutputStream* stream = CreateStream();
649 ASSERT_TRUE(stream); 649 ASSERT_TRUE(stream);
650 ASSERT_TRUE(OpenStream(stream)); 650 ASSERT_TRUE(OpenStream(stream));
651 CloseStream(stream); 651 CloseStream(stream);
652 } 652 }
653 653
654 } // namespace 654 } // namespace
655 } // namespace media 655 } // namespace media
656 } // namespace chromecast 656 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/media/audio/cast_audio_manager_factory.cc ('k') | chromecast/media/cma/backend/media_pipeline_backend_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698