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

Unified Diff: components/web_contents_delegate_android/web_contents_delegate_android.cc

Issue 2233213002: [Android] Suppress javascript dialogs from background tabs in custom tab Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « components/web_contents_delegate_android/web_contents_delegate_android.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0f5d7db379b889ad56f86b33ef8a23a5b569364a..165dddc91455904df9b1c2018b859039d800018a 100644
--- a/components/web_contents_delegate_android/web_contents_delegate_android.cc
+++ b/components/web_contents_delegate_android/web_contents_delegate_android.cc
@@ -416,4 +416,17 @@ void WebContentsDelegateAndroid::RequestAppBannerFromDevTools(
content::WebContents* web_contents) {
}
+bool WebContentsDelegateAndroid::ShouldSuppressDialogs(
+ content::WebContents* web_contents) {
+ JNIEnv* env = AttachCurrentThread();
+ ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
+ if (obj.is_null())
+ return false;
+ ScopedJavaLocalRef<jobject> jsource_contents;
+ if (web_contents)
+ jsource_contents = web_contents->GetJavaWebContents();
+ return Java_WebContentsDelegateAndroid_shouldSuppressDialogs(
+ env, obj.obj(), jsource_contents.obj());
+}
+
} // namespace web_contents_delegate_android
« no previous file with comments | « components/web_contents_delegate_android/web_contents_delegate_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698