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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/web_contents_delegate_android/web_contents_delegate_android .h" 5 #include "components/web_contents_delegate_android/web_contents_delegate_android .h"
6 6
7 #include <android/keycodes.h> 7 #include <android/keycodes.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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 if (rwhv) { 409 if (rwhv) {
410 validation_message_bubble_->SetPositionRelativeToAnchor( 410 validation_message_bubble_->SetPositionRelativeToAnchor(
411 rwhv->GetRenderWidgetHost(), anchor_in_root_view); 411 rwhv->GetRenderWidgetHost(), anchor_in_root_view);
412 } 412 }
413 } 413 }
414 414
415 void WebContentsDelegateAndroid::RequestAppBannerFromDevTools( 415 void WebContentsDelegateAndroid::RequestAppBannerFromDevTools(
416 content::WebContents* web_contents) { 416 content::WebContents* web_contents) {
417 } 417 }
418 418
419 bool WebContentsDelegateAndroid::ShouldSuppressDialogs(
420 content::WebContents* web_contents) {
421 JNIEnv* env = AttachCurrentThread();
422 ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
423 if (obj.is_null())
424 return false;
425 ScopedJavaLocalRef<jobject> jsource_contents;
426 if (web_contents)
427 jsource_contents = web_contents->GetJavaWebContents();
428 return Java_WebContentsDelegateAndroid_shouldSuppressDialogs(
429 env, obj.obj(), jsource_contents.obj());
430 }
431
419 } // namespace web_contents_delegate_android 432 } // namespace web_contents_delegate_android
OLDNEW
« 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