diff options
author | Ted Choc <tedchoc@google.com> | 2015-04-09 14:23:26 -0700 |
---|---|---|
committer | Ted Choc <tedchoc@google.com> | 2015-04-09 21:24:38 +0000 |
commit | 63e0caff2134494828eef4a72c1f1d5697ea57fa (patch) | |
tree | ceed0a4ae566de9ce5aa200881d8c5ed26052dec | |
parent | 1f7c3cb1e45153081066c22312aee7157f21bc62 (diff) | |
download | chromium_src-63e0caff2134494828eef4a72c1f1d5697ea57fa.zip chromium_src-63e0caff2134494828eef4a72c1f1d5697ea57fa.tar.gz chromium_src-63e0caff2134494828eef4a72c1f1d5697ea57fa.tar.bz2 |
Propagate fullscreen state to interstitial's when shown.
Without this interstitials will be able to be scroll off the top controls,
which is definitely not the correct behavior.
BUG=474795
Review URL: https://codereview.chromium.org/1070293002
Cr-Commit-Position: refs/branch-heads/2357@{#34}
Cr-Branched-From: 59d4494849b405682265ed5d3f5164573b9a939b-refs/heads/master@{#323860}
-rw-r--r-- | chrome/android/java/src/org/chromium/chrome/browser/Tab.java | 5 | ||||
-rw-r--r-- | chrome/browser/android/tab_android.cc | 10 |
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) { |