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

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

Issue 2898593002: WebView: choose loud vs. quiet interstitial (Closed)
Patch Set: Rebase and fix patch conflict 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 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 } 1399 }
1400 1400
1401 bool AwContents::CanShowBigInterstitial() { 1401 bool AwContents::CanShowBigInterstitial() {
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_canShowBigInterstitial(env, obj);
1407 } 1407 }
1408 1408
1409 bool AwContents::CanShowInterstitial() {
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_canShowInterstitial(env, obj);
1415 }
1416
1417 bool AwContents::ExtendsOutOfWindow() {
1418 JNIEnv* env = AttachCurrentThread();
1419 const ScopedJavaLocalRef<jobject> obj = java_ref_.get(env);
1420 if (obj.is_null())
1421 return false;
1422 return Java_AwContents_extendsOutOfWindow(env, obj);
1423 }
1424
1409 void AwContents::CallProceedOnInterstitialForTesting( 1425 void AwContents::CallProceedOnInterstitialForTesting(
1410 JNIEnv* env, 1426 JNIEnv* env,
1411 const base::android::JavaParamRef<jobject>& obj) { 1427 const base::android::JavaParamRef<jobject>& obj) {
1412 DCHECK(web_contents_->GetInterstitialPage()); 1428 DCHECK(web_contents_->GetInterstitialPage());
1413 web_contents_->GetInterstitialPage()->Proceed(); 1429 web_contents_->GetInterstitialPage()->Proceed();
1414 } 1430 }
1415 1431
1416 void AwContents::CallDontProceedOnInterstitialForTesting( 1432 void AwContents::CallDontProceedOnInterstitialForTesting(
1417 JNIEnv* env, 1433 JNIEnv* env,
1418 const base::android::JavaParamRef<jobject>& obj) { 1434 const base::android::JavaParamRef<jobject>& obj) {
(...skipping 20 matching lines...) Expand all
1439 1455
1440 return Java_AwContents_onRenderProcessGoneDetail(env, obj, child_process_id, 1456 return Java_AwContents_onRenderProcessGoneDetail(env, obj, child_process_id,
1441 crashed); 1457 crashed);
1442 } 1458 }
1443 1459
1444 void AwContents::RenderProcessReady(content::RenderProcessHost* host) { 1460 void AwContents::RenderProcessReady(content::RenderProcessHost* host) {
1445 UpdateRendererPriority(); 1461 UpdateRendererPriority();
1446 } 1462 }
1447 1463
1448 } // namespace android_webview 1464 } // namespace android_webview
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698