summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/android/java/src/org/chromium/chrome/browser/Tab.java5
-rw-r--r--chrome/browser/android/tab_android.cc10
2 files changed, 15 insertions, 0 deletions
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
index a8151da..a000dbd 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/Tab.java
@@ -652,6 +652,8 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
for (TabObserver observer : mObservers) {
observer.onDidAttachInterstitialPage(Tab.this);
}
+
+ updateFullscreenEnabledState();
}
@Override
@@ -661,6 +663,8 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
for (TabObserver observer : mObservers) {
observer.onDidDetachInterstitialPage(Tab.this);
}
+
+ updateFullscreenEnabledState();
}
@Override
@@ -2425,6 +2429,7 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
!AccessibilityUtil.isAccessibilityEnabled(getApplicationContext());
enableHidingTopControls &= !mIsImeShowing;
enableHidingTopControls &= !mIsShowingErrorPage;
+ enableHidingTopControls &= !getWebContents().isShowingInterstitialPage();
return enableHidingTopControls;
}
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
index 120ad48..1553094 100644
--- a/chrome/browser/android/tab_android.cc
+++ b/chrome/browser/android/tab_android.cc
@@ -59,10 +59,12 @@
#include "components/url_fixer/url_fixer.h"
#include "content/public/browser/android/content_view_core.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/interstitial_page.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/render_view_host.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/top_controls_state.h"
@@ -737,6 +739,14 @@ void TabAndroid::UpdateTopControlsState(JNIEnv* env,
WebContents* sender = web_contents();
sender->Send(new ChromeViewMsg_UpdateTopControlsState(
sender->GetRoutingID(), constraints_state, current_state, animate));
+
+ if (sender->ShowingInterstitialPage()) {
+ content::RenderViewHost* interstitial_view_host =
+ sender->GetInterstitialPage()->GetMainFrame()->GetRenderViewHost();
+ interstitial_view_host->Send(new ChromeViewMsg_UpdateTopControlsState(
+ interstitial_view_host->GetRoutingID(), constraints_state,
+ current_state, animate));
+ }
}
void TabAndroid::SearchByImageInNewTabAsync(JNIEnv* env, jobject obj) {