| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |