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

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: apply review comments Created 3 years, 9 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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 view->DismissTextHandles(); 703 view->DismissTextHandles();
704 } 704 }
705 705
706 void WebContentsAndroid::SetHasPersistentVideo( 706 void WebContentsAndroid::SetHasPersistentVideo(
707 JNIEnv* env, 707 JNIEnv* env,
708 const base::android::JavaParamRef<jobject>& obj, 708 const base::android::JavaParamRef<jobject>& obj,
709 jboolean value) { 709 jboolean value) {
710 web_contents_->SetHasPersistentVideo(value); 710 web_contents_->SetHasPersistentVideo(value);
711 } 711 }
712 712
713 bool WebContentsAndroid::HasActiveEffectivelyFullscreenVideo(
714 JNIEnv* env,
715 const base::android::JavaParamRef<jobject>& obj) {
716 return web_contents_->HasActiveEffectivelyFullscreenVideo();
717 }
718
713 void WebContentsAndroid::OnFinishGetContentBitmap( 719 void WebContentsAndroid::OnFinishGetContentBitmap(
714 const JavaRef<jobject>& obj, 720 const JavaRef<jobject>& obj,
715 const JavaRef<jobject>& callback, 721 const JavaRef<jobject>& callback,
716 const SkBitmap& bitmap, 722 const SkBitmap& bitmap,
717 ReadbackResponse response) { 723 ReadbackResponse response) {
718 JNIEnv* env = base::android::AttachCurrentThread(); 724 JNIEnv* env = base::android::AttachCurrentThread();
719 ScopedJavaLocalRef<jobject> java_bitmap; 725 ScopedJavaLocalRef<jobject> java_bitmap;
720 if (response == READBACK_SUCCESS) 726 if (response == READBACK_SUCCESS)
721 java_bitmap = gfx::ConvertToJavaBitmap(&bitmap); 727 java_bitmap = gfx::ConvertToJavaBitmap(&bitmap);
722 Java_WebContentsImpl_onGetContentBitmapFinished(env, obj, callback, 728 Java_WebContentsImpl_onGetContentBitmapFinished(env, obj, callback,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 env, obj, callback, id, http_status_code, jurl, jbitmaps, jsizes); 760 env, obj, callback, id, http_status_code, jurl, jbitmaps, jsizes);
755 } 761 }
756 762
757 void WebContentsAndroid::SetMediaSession( 763 void WebContentsAndroid::SetMediaSession(
758 const ScopedJavaLocalRef<jobject>& j_media_session) { 764 const ScopedJavaLocalRef<jobject>& j_media_session) {
759 JNIEnv* env = base::android::AttachCurrentThread(); 765 JNIEnv* env = base::android::AttachCurrentThread();
760 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session); 766 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session);
761 } 767 }
762 768
763 } // namespace content 769 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_android.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698