| OLD | NEW |
| 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 "media/mojo/services/demuxer_stream_provider_shim.h" | 5 #include "media/mojo/services/demuxer_stream_provider_shim.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 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 30 matching lines...) Expand all Loading... |
| 41 DemuxerStream* DemuxerStreamProviderShim::GetStream(DemuxerStream::Type type) { | 41 DemuxerStream* DemuxerStreamProviderShim::GetStream(DemuxerStream::Type type) { |
| 42 DCHECK(demuxer_ready_cb_.is_null()); | 42 DCHECK(demuxer_ready_cb_.is_null()); |
| 43 for (auto* stream : streams_) { | 43 for (auto* stream : streams_) { |
| 44 if (stream->type() == type) | 44 if (stream->type() == type) |
| 45 return stream; | 45 return stream; |
| 46 } | 46 } |
| 47 | 47 |
| 48 return nullptr; | 48 return nullptr; |
| 49 } | 49 } |
| 50 | 50 |
| 51 GURL* DemuxerStreamProviderShim::GetUrl() { |
| 52 return nullptr; |
| 53 } |
| 54 |
| 51 void DemuxerStreamProviderShim::OnStreamReady() { | 55 void DemuxerStreamProviderShim::OnStreamReady() { |
| 52 if (++streams_ready_ == streams_.size()) | 56 if (++streams_ready_ == streams_.size()) |
| 53 base::ResetAndReturn(&demuxer_ready_cb_).Run(); | 57 base::ResetAndReturn(&demuxer_ready_cb_).Run(); |
| 54 } | 58 } |
| 55 | 59 |
| 56 } // namespace media | 60 } // namespace media |
| OLD | NEW |