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 web_contents_->GetRenderViewHost()) { | 1391 web_contents_->GetRenderViewHost()) { |
1392 compositor_id.process_id = web_contents_->GetRenderProcessHost()->GetID(); | 1392 compositor_id.process_id = web_contents_->GetRenderProcessHost()->GetID(); |
1393 compositor_id.routing_id = | 1393 compositor_id.routing_id = |
1394 web_contents_->GetRenderViewHost()->GetRoutingID(); | 1394 web_contents_->GetRenderViewHost()->GetRoutingID(); |
1395 } else { | 1395 } else { |
1396 LOG(WARNING) << "failed setting the compositor on detaching interstitital"; | 1396 LOG(WARNING) << "failed setting the compositor on detaching interstitital"; |
1397 } | 1397 } |
1398 browser_view_renderer_.SetActiveCompositorID(compositor_id); | 1398 browser_view_renderer_.SetActiveCompositorID(compositor_id); |
1399 } | 1399 } |
1400 | 1400 |
1401 bool AwContents::CanShowBigInterstitial() { | 1401 bool AwContents::CanShowInterstitial() { |
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_canShowInterstitial(env, obj); |
| 1407 } |
| 1408 |
| 1409 int AwContents::GetErrorUiType() { |
| 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_getErrorUiType(env, obj); |
1407 } | 1415 } |
1408 | 1416 |
1409 void AwContents::CallProceedOnInterstitialForTesting( | 1417 void AwContents::CallProceedOnInterstitialForTesting( |
1410 JNIEnv* env, | 1418 JNIEnv* env, |
1411 const base::android::JavaParamRef<jobject>& obj) { | 1419 const base::android::JavaParamRef<jobject>& obj) { |
1412 DCHECK(web_contents_->GetInterstitialPage()); | 1420 DCHECK(web_contents_->GetInterstitialPage()); |
1413 web_contents_->GetInterstitialPage()->Proceed(); | 1421 web_contents_->GetInterstitialPage()->Proceed(); |
1414 } | 1422 } |
1415 | 1423 |
1416 void AwContents::CallDontProceedOnInterstitialForTesting( | 1424 void AwContents::CallDontProceedOnInterstitialForTesting( |
(...skipping 22 matching lines...) Expand all Loading... |
1439 | 1447 |
1440 return Java_AwContents_onRenderProcessGoneDetail(env, obj, child_process_id, | 1448 return Java_AwContents_onRenderProcessGoneDetail(env, obj, child_process_id, |
1441 crashed); | 1449 crashed); |
1442 } | 1450 } |
1443 | 1451 |
1444 void AwContents::RenderProcessReady(content::RenderProcessHost* host) { | 1452 void AwContents::RenderProcessReady(content::RenderProcessHost* host) { |
1445 UpdateRendererPriority(); | 1453 UpdateRendererPriority(); |
1446 } | 1454 } |
1447 | 1455 |
1448 } // namespace android_webview | 1456 } // namespace android_webview |
OLD | NEW |