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

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

Issue 2898593002: WebView: choose loud vs. quiet interstitial (Closed)
Patch Set: Update WebView test for behavior change 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 } 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698