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