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

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

Issue 2692903002: Don't show media controls when there is a persistent video. (Closed)
Patch Set: rebase 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 685 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 } 696 }
697 697
698 void WebContentsAndroid::DismissTextHandles( 698 void WebContentsAndroid::DismissTextHandles(
699 JNIEnv* env, 699 JNIEnv* env,
700 const base::android::JavaParamRef<jobject>& obj) { 700 const base::android::JavaParamRef<jobject>& obj) {
701 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid(); 701 RenderWidgetHostViewAndroid* view = GetRenderWidgetHostViewAndroid();
702 if (view) 702 if (view)
703 view->DismissTextHandles(); 703 view->DismissTextHandles();
704 } 704 }
705 705
706 void WebContentsAndroid::SetHasPersistentVideo(
707 JNIEnv* env,
708 const base::android::JavaParamRef<jobject>& obj,
709 jboolean value) {
710 web_contents_->SetHasPersistentVideo(value);
711 }
712
706 void WebContentsAndroid::OnFinishGetContentBitmap( 713 void WebContentsAndroid::OnFinishGetContentBitmap(
707 const JavaRef<jobject>& obj, 714 const JavaRef<jobject>& obj,
708 const JavaRef<jobject>& callback, 715 const JavaRef<jobject>& callback,
709 const SkBitmap& bitmap, 716 const SkBitmap& bitmap,
710 ReadbackResponse response) { 717 ReadbackResponse response) {
711 JNIEnv* env = base::android::AttachCurrentThread(); 718 JNIEnv* env = base::android::AttachCurrentThread();
712 ScopedJavaLocalRef<jobject> java_bitmap; 719 ScopedJavaLocalRef<jobject> java_bitmap;
713 if (response == READBACK_SUCCESS) 720 if (response == READBACK_SUCCESS)
714 java_bitmap = gfx::ConvertToJavaBitmap(&bitmap); 721 java_bitmap = gfx::ConvertToJavaBitmap(&bitmap);
715 Java_WebContentsImpl_onGetContentBitmapFinished(env, obj, callback, 722 Java_WebContentsImpl_onGetContentBitmapFinished(env, obj, callback,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 env, obj, callback, id, http_status_code, jurl, jbitmaps, jsizes); 754 env, obj, callback, id, http_status_code, jurl, jbitmaps, jsizes);
748 } 755 }
749 756
750 void WebContentsAndroid::SetMediaSession( 757 void WebContentsAndroid::SetMediaSession(
751 const ScopedJavaLocalRef<jobject>& j_media_session) { 758 const ScopedJavaLocalRef<jobject>& j_media_session) {
752 JNIEnv* env = base::android::AttachCurrentThread(); 759 JNIEnv* env = base::android::AttachCurrentThread();
753 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session); 760 Java_WebContentsImpl_setMediaSession(env, obj_, j_media_session);
754 } 761 }
755 762
756 } // namespace content 763 } // 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