Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(474)

Side by Side Diff: android_webview/browser/aw_contents.cc

Issue 2898593002: WebView: choose loud vs. quiet interstitial (Closed)
Patch Set: Rename test Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698