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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 2635693002: [WebView] initial webview-side implementation of safebrowsing (Closed)
Patch Set: rename lock, add crbug comment Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: android_webview/java/src/org/chromium/android_webview/AwContents.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContents.java b/android_webview/java/src/org/chromium/android_webview/AwContents.java
index abebba74d0243ed09f218e36d21cdf6229ec8205..3c789da95b4b031ec0f82e0a5e042fb2bc06d3d4 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwContents.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwContents.java
@@ -2853,6 +2853,22 @@ public class AwContents implements SmartClipProvider, PostMessageSender.PostMess
}
}
+ @CalledByNative
+ private boolean canShowInterstitial() {
+ int loc[] = new int[2];
+ mContainerView.getLocationOnScreen(loc);
+ // TODO(sgurun) implement a better strategy here.
+ if (mContainerView.getWidth() < 500 || mContainerView.getHeight() < 500) {
+ return false;
+ }
+ if (mContainerView.getVisibility() != View.VISIBLE) {
+ return false;
+ }
+ // TODO(timvolodine) other potential improvements mentioned:
+ // consider content, not attached webviews, giant webviews, ..
+ return true;
+ }
+
// -------------------------------------------------------------------------------------------
// Helper methods
// -------------------------------------------------------------------------------------------

Powered by Google App Engine
This is Rietveld 408576698