OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/browser/media/android/media_player_renderer.h" | 5 #include "content/browser/media/android/media_player_renderer.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "content/browser/media/android/media_resource_getter_impl.h" | 9 #include "content/browser/media/android/media_resource_getter_impl.h" |
10 #include "content/public/browser/browser_context.h" | 10 #include "content/public/browser/browser_context.h" |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 void MediaPlayerRenderer::OnMediaMetadataChanged(int player_id, | 146 void MediaPlayerRenderer::OnMediaMetadataChanged(int player_id, |
147 base::TimeDelta duration, | 147 base::TimeDelta duration, |
148 int width, | 148 int width, |
149 int height, | 149 int height, |
150 bool success) { | 150 bool success) { |
151 if (video_size_ != gfx::Size(width, height)) | 151 if (video_size_ != gfx::Size(width, height)) |
152 OnVideoSizeChanged(kUnusedAndIrrelevantPlayerId, width, height); | 152 OnVideoSizeChanged(kUnusedAndIrrelevantPlayerId, width, height); |
153 | 153 |
154 if (duration_ != duration) { | 154 if (duration_ != duration) { |
155 duration_ = duration; | 155 duration_ = duration; |
156 // TODO(tguilbert): Add OnDurationChange to the RendererClient interface. | 156 renderer_client_->OnDurationChange(duration); |
157 // See crbug.com/635991. | |
158 } | 157 } |
159 } | 158 } |
160 | 159 |
161 void MediaPlayerRenderer::OnPlaybackComplete(int player_id) { | 160 void MediaPlayerRenderer::OnPlaybackComplete(int player_id) { |
162 renderer_client_->OnEnded(); | 161 renderer_client_->OnEnded(); |
163 } | 162 } |
164 | 163 |
165 void MediaPlayerRenderer::OnMediaInterrupted(int player_id) {} | 164 void MediaPlayerRenderer::OnMediaInterrupted(int player_id) {} |
166 | 165 |
167 void MediaPlayerRenderer::OnBufferingUpdate(int player_id, int percentage) { | 166 void MediaPlayerRenderer::OnBufferingUpdate(int player_id, int percentage) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 | 219 |
221 void MediaPlayerRenderer::OnDecoderResourcesReleased(int player_id) { | 220 void MediaPlayerRenderer::OnDecoderResourcesReleased(int player_id) { |
222 // Since we are not using a pool of MediaPlayerAndroid instances, this | 221 // Since we are not using a pool of MediaPlayerAndroid instances, this |
223 // function is not relevant. | 222 // function is not relevant. |
224 | 223 |
225 // TODO(tguilbert): Throttle requests, via exponential backoff. | 224 // TODO(tguilbert): Throttle requests, via exponential backoff. |
226 // See crbug.com/636615. | 225 // See crbug.com/636615. |
227 } | 226 } |
228 | 227 |
229 } // namespace content | 228 } // namespace content |
OLD | NEW |