| 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
|
| // -------------------------------------------------------------------------------------------
|
|
|