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

Side by Side Diff: content/browser/web_contents/web_contents_android.cc

Issue 2693203002: Provide a WebContents API to discover the playback of a fullscreen video. (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/web_contents/web_contents_android.h" 5 #include "content/browser/web_contents/web_contents_android.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 view->DismissTextHandles(); 719 view->DismissTextHandles();
720 } 720 }
721 721
722 void WebContentsAndroid::SetHasPersistentVideo( 722 void WebContentsAndroid::SetHasPersistentVideo(
723 JNIEnv* env, 723 JNIEnv* env,
724 const base::android::JavaParamRef<jobject>& obj, 724 const base::android::JavaParamRef<jobject>& obj,
725 jboolean value) { 725 jboolean value) {
726 web_contents_->SetHasPersistentVideo(value); 726 web_contents_->SetHasPersistentVideo(value);
727 } 727 }
728 728
729 bool WebContentsAndroid::HasActiveFullscreenDominantVideo(
730 JNIEnv* env,
731 const base::android::JavaParamRef<jobject>& obj) {
732 return web_contents_->HasActiveFullscreenDominantVideo();
733 }
734
729 void WebContentsAndroid::OnFinishGetContentBitmap( 735 void WebContentsAndroid::OnFinishGetContentBitmap(
730 const JavaRef<jobject>& obj, 736 const JavaRef<jobject>& obj,
731 const JavaRef<jobject>& callback, 737 const JavaRef<jobject>& callback,
732 const SkBitmap& bitmap, 738 const SkBitmap& bitmap,
733 ReadbackResponse response) { 739 ReadbackResponse response) {
734 JNIEnv* env = base::android::AttachCurrentThread(); 740 JNIEnv* env = base::android::AttachCurrentThread();
735 ScopedJavaLocalRef<jobject> java_bitmap; 741 ScopedJavaLocalRef<jobject> java_bitmap;
736 if (response == READBACK_SUCCESS) 742 if (response == READBACK_SUCCESS)
737 java_bitmap = gfx::ConvertToJavaBitmap(&bitmap); 743 java_bitmap = gfx::ConvertToJavaBitmap(&bitmap);
738 Java_WebContentsImpl_onGetContentBitmapFinished(env, obj, callback, 744 Java_WebContentsImpl_onGetContentBitmapFinished(env, obj, callback,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
770 env, obj, callback, id, http_status_code, jurl, jbitmaps, jsizes); 776 env, obj, callback, id, http_status_code, jurl, jbitmaps, jsizes);
771 } 777 }
772 778
773 void WebContentsAndroid::SetMediaSession( 779 void WebContentsAndroid::SetMediaSession(
774 const ScopedJavaLocalRef<jobject>& j_media_session) { 780 const ScopedJavaLocalRef<jobject>& j_media_session) {
775 JNIEnv* env = base::android::AttachCurrentThread(); 781 JNIEnv* env = base::android::AttachCurrentThread();
776 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session); 782 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session);
777 } 783 }
778 784
779 } // namespace content 785 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698