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

Unified Diff: components/web_contents_delegate_android/web_contents_delegate_android.cc

Issue 2353063005: Refactor ContentViewClient (1/6) (Closed)
Patch Set: cast to activity Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: components/web_contents_delegate_android/web_contents_delegate_android.cc
diff --git a/components/web_contents_delegate_android/web_contents_delegate_android.cc b/components/web_contents_delegate_android/web_contents_delegate_android.cc
index 7d6c23a631d2039eff8a82c5f89a561326f22623..8e309d5a00bfdbb90aeaef0ac711ccbccd09019f 100644
--- a/components/web_contents_delegate_android/web_contents_delegate_android.cc
+++ b/components/web_contents_delegate_android/web_contents_delegate_android.cc
@@ -327,6 +327,25 @@ void WebContentsDelegateAndroid::ShowRepostFormWarningDialog(
Java_WebContentsDelegateAndroid_showRepostFormWarningDialog(env, obj);
}
+ScopedJavaLocalRef<jobject>
+WebContentsDelegateAndroid::GetContentVideoViewEmbedder() {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
+ if (obj.is_null())
+ return ScopedJavaLocalRef<jobject>();
+
+ return Java_WebContentsDelegateAndroid_getContentVideoViewEmbedder(env, obj);
+}
+
+bool WebContentsDelegateAndroid::ShouldBlockMediaRequest(const GURL& url) {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
+ if (obj.is_null())
+ return false;
+ ScopedJavaLocalRef<jstring> j_url = ConvertUTF8ToJavaString(env, url.spec());
+ return Java_WebContentsDelegateAndroid_shouldBlockMediaRequest(env, obj, j_url);
+}
+
void WebContentsDelegateAndroid::EnterFullscreenModeForTab(
WebContents* web_contents,
const GURL& origin) {
« no previous file with comments | « components/web_contents_delegate_android/web_contents_delegate_android.h ('k') | content/browser/android/content_video_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698