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

Side by Side Diff: content/browser/media/android/media_player_renderer.cc

Issue 2243683002: Add OnDurationChange() to RenderClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@media_player_simplified
Patch Set: Fixed typo Created 4 years, 4 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
« no previous file with comments | « no previous file | content/renderer/media/android/media_player_renderer_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/android/media_player_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698