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

Side by Side Diff: media/base/android/media_player_bridge.cc

Issue 10979047: Upstream fullscreen video implementation for android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merging latest changes 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
« no previous file with comments | « media/base/android/media_player_bridge.h ('k') | webkit/media/android/media_metadata_android.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 (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 "media/base/android/media_player_bridge.h" 5 #include "media/base/android/media_player_bridge.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 if (j_media_player_.is_null()) { 165 if (j_media_player_.is_null()) {
166 pending_play_ = false; 166 pending_play_ = false;
167 } else { 167 } else {
168 if (prepared_ && IsPlaying()) 168 if (prepared_ && IsPlaying())
169 PauseInternal(); 169 PauseInternal();
170 else 170 else
171 pending_play_ = false; 171 pending_play_ = false;
172 } 172 }
173 } 173 }
174 174
175
176 bool MediaPlayerBridge::IsPlaying() { 175 bool MediaPlayerBridge::IsPlaying() {
177 if (!prepared_) 176 if (!prepared_)
178 return pending_play_; 177 return pending_play_;
179 178
180 JNIEnv* env = AttachCurrentThread(); 179 JNIEnv* env = AttachCurrentThread();
181 CHECK(env); 180 CHECK(env);
182 jboolean result = JNI_MediaPlayer::Java_MediaPlayer_isPlaying( 181 jboolean result = JNI_MediaPlayer::Java_MediaPlayer_isPlaying(
183 env, j_media_player_.obj()); 182 env, j_media_player_.obj());
184 return result; 183 return result;
185 } 184 }
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 374
376 bool MediaPlayerBridge::RegisterMediaPlayerBridge(JNIEnv* env) { 375 bool MediaPlayerBridge::RegisterMediaPlayerBridge(JNIEnv* env) {
377 bool ret = RegisterNativesImpl(env); 376 bool ret = RegisterNativesImpl(env);
378 DCHECK(g_MediaPlayerBridge_clazz); 377 DCHECK(g_MediaPlayerBridge_clazz);
379 if (ret) 378 if (ret)
380 ret = JNI_MediaPlayer::RegisterNativesImpl(env); 379 ret = JNI_MediaPlayer::RegisterNativesImpl(env);
381 return ret; 380 return ret;
382 } 381 }
383 382
384 } // namespace media 383 } // namespace media
OLDNEW
« no previous file with comments | « media/base/android/media_player_bridge.h ('k') | webkit/media/android/media_metadata_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698