| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "android_webview/browser/aw_contents.h" | 5 #include "android_webview/browser/aw_contents.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "android_webview/browser/aw_autofill_client.h" | 10 #include "android_webview/browser/aw_autofill_client.h" |
| (...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1399 } | 1399 } |
| 1400 | 1400 |
| 1401 bool AwContents::CanShowBigInterstitial() { | 1401 bool AwContents::CanShowBigInterstitial() { |
| 1402 JNIEnv* env = AttachCurrentThread(); | 1402 JNIEnv* env = AttachCurrentThread(); |
| 1403 const ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 1403 const ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
| 1404 if (obj.is_null()) | 1404 if (obj.is_null()) |
| 1405 return false; | 1405 return false; |
| 1406 return Java_AwContents_canShowBigInterstitial(env, obj); | 1406 return Java_AwContents_canShowBigInterstitial(env, obj); |
| 1407 } | 1407 } |
| 1408 | 1408 |
| 1409 bool AwContents::CanShowInterstitial() { |
| 1410 JNIEnv* env = AttachCurrentThread(); |
| 1411 const ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
| 1412 if (obj.is_null()) |
| 1413 return false; |
| 1414 return Java_AwContents_canShowInterstitial(env, obj); |
| 1415 } |
| 1416 |
| 1417 bool AwContents::ExtendsOutOfWindow() { |
| 1418 JNIEnv* env = AttachCurrentThread(); |
| 1419 const ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
| 1420 if (obj.is_null()) |
| 1421 return false; |
| 1422 return Java_AwContents_extendsOutOfWindow(env, obj); |
| 1423 } |
| 1424 |
| 1409 void AwContents::CallProceedOnInterstitialForTesting( | 1425 void AwContents::CallProceedOnInterstitialForTesting( |
| 1410 JNIEnv* env, | 1426 JNIEnv* env, |
| 1411 const base::android::JavaParamRef<jobject>& obj) { | 1427 const base::android::JavaParamRef<jobject>& obj) { |
| 1412 DCHECK(web_contents_->GetInterstitialPage()); | 1428 DCHECK(web_contents_->GetInterstitialPage()); |
| 1413 web_contents_->GetInterstitialPage()->Proceed(); | 1429 web_contents_->GetInterstitialPage()->Proceed(); |
| 1414 } | 1430 } |
| 1415 | 1431 |
| 1416 void AwContents::CallDontProceedOnInterstitialForTesting( | 1432 void AwContents::CallDontProceedOnInterstitialForTesting( |
| 1417 JNIEnv* env, | 1433 JNIEnv* env, |
| 1418 const base::android::JavaParamRef<jobject>& obj) { | 1434 const base::android::JavaParamRef<jobject>& obj) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1439 | 1455 |
| 1440 return Java_AwContents_onRenderProcessGoneDetail(env, obj, child_process_id, | 1456 return Java_AwContents_onRenderProcessGoneDetail(env, obj, child_process_id, |
| 1441 crashed); | 1457 crashed); |
| 1442 } | 1458 } |
| 1443 | 1459 |
| 1444 void AwContents::RenderProcessReady(content::RenderProcessHost* host) { | 1460 void AwContents::RenderProcessReady(content::RenderProcessHost* host) { |
| 1445 UpdateRendererPriority(); | 1461 UpdateRendererPriority(); |
| 1446 } | 1462 } |
| 1447 | 1463 |
| 1448 } // namespace android_webview | 1464 } // namespace android_webview |
| OLD | NEW |