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

Side by Side Diff: content/browser/android/content_video_view.cc

Issue 11087082: Adding progresss bar when loading fullscreen video (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: resolve some previous merge conflicts Created 8 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/android/content_video_view.h" 5 #include "content/browser/android/content_video_view.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "content/browser/android/media_player_manager_android.h" 10 #include "content/browser/android/media_player_manager_android.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 } 132 }
133 133
134 void ContentVideoView::SetSurface(JNIEnv* env, jobject obj, 134 void ContentVideoView::SetSurface(JNIEnv* env, jobject obj,
135 jobject surface) { 135 jobject surface) {
136 manager_->SetVideoSurface(surface); 136 manager_->SetVideoSurface(surface);
137 ReleaseSurface(surface); 137 ReleaseSurface(surface);
138 } 138 }
139 139
140 void ContentVideoView::UpdateMediaMetadata(JNIEnv* env, jobject obj) { 140 void ContentVideoView::UpdateMediaMetadata(JNIEnv* env, jobject obj) {
141 media::MediaPlayerBridge* player = manager_->GetFullscreenPlayer(); 141 media::MediaPlayerBridge* player = manager_->GetFullscreenPlayer();
142 if (player) 142 if (player && player->prepared())
143 Java_ContentVideoView_updateMediaMetadata( 143 Java_ContentVideoView_updateMediaMetadata(
144 env, obj, player->GetVideoWidth(), player->GetVideoHeight(), 144 env, obj, player->GetVideoWidth(), player->GetVideoHeight(),
145 player->GetDuration().InMilliseconds(), player->can_pause(), 145 player->GetDuration().InMilliseconds(), player->can_pause(),
146 player->can_seek_forward(), player->can_seek_backward()); 146 player->can_seek_forward(), player->can_seek_backward());
147 } 147 }
148 148
149 } // namespace content 149 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698