| 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 1380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1391 } | 1391 } |
| 1392 | 1392 |
| 1393 bool AwContents::CanShowBigInterstitial() { | 1393 bool AwContents::CanShowBigInterstitial() { |
| 1394 JNIEnv* env = AttachCurrentThread(); | 1394 JNIEnv* env = AttachCurrentThread(); |
| 1395 const ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); | 1395 const ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
| 1396 if (obj.is_null()) | 1396 if (obj.is_null()) |
| 1397 return false; | 1397 return false; |
| 1398 return Java_AwContents_canShowBigInterstitial(env, obj); | 1398 return Java_AwContents_canShowBigInterstitial(env, obj); |
| 1399 } | 1399 } |
| 1400 | 1400 |
| 1401 bool AwContents::CanShowInterstitial() { |
| 1402 JNIEnv* env = AttachCurrentThread(); |
| 1403 const ScopedJavaLocalRef<jobject> obj = java_ref_.get(env); |
| 1404 if (obj.is_null()) |
| 1405 return false; |
| 1406 return Java_AwContents_canShowInterstitial(env, obj); |
| 1407 } |
| 1408 |
| 1409 bool AwContents::ExtendsOutOfWindow() { |
| 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_extendsOutOfWindow(env, obj); |
| 1415 } |
| 1416 |
| 1401 void AwContents::CallProceedOnInterstitialForTesting( | 1417 void AwContents::CallProceedOnInterstitialForTesting( |
| 1402 JNIEnv* env, | 1418 JNIEnv* env, |
| 1403 const base::android::JavaParamRef<jobject>& obj) { | 1419 const base::android::JavaParamRef<jobject>& obj) { |
| 1404 DCHECK(web_contents_->GetInterstitialPage()); | 1420 DCHECK(web_contents_->GetInterstitialPage()); |
| 1405 web_contents_->GetInterstitialPage()->Proceed(); | 1421 web_contents_->GetInterstitialPage()->Proceed(); |
| 1406 } | 1422 } |
| 1407 | 1423 |
| 1408 void AwContents::CallDontProceedOnInterstitialForTesting( | 1424 void AwContents::CallDontProceedOnInterstitialForTesting( |
| 1409 JNIEnv* env, | 1425 JNIEnv* env, |
| 1410 const base::android::JavaParamRef<jobject>& obj) { | 1426 const base::android::JavaParamRef<jobject>& obj) { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 1431 | 1447 |
| 1432 return Java_AwContents_onRenderProcessGoneDetail(env, obj, child_process_id, | 1448 return Java_AwContents_onRenderProcessGoneDetail(env, obj, child_process_id, |
| 1433 crashed); | 1449 crashed); |
| 1434 } | 1450 } |
| 1435 | 1451 |
| 1436 void AwContents::RenderProcessReady(content::RenderProcessHost* host) { | 1452 void AwContents::RenderProcessReady(content::RenderProcessHost* host) { |
| 1437 UpdateRendererPriority(); | 1453 UpdateRendererPriority(); |
| 1438 } | 1454 } |
| 1439 | 1455 |
| 1440 } // namespace android_webview | 1456 } // namespace android_webview |
| OLD | NEW |