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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java

Issue 1810613002: Check for valid infobar container in Reader Mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java b/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java
index e766bcf7ad65c489c9b65098b019bb0fac8d1728..1cf61ad2cda32070f1e9b05faf3ec49c0272dd38 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/ReaderModeManager.java
@@ -324,16 +324,16 @@ public class ReaderModeManager extends TabModelSelectorTabObserver
@Override
public void onClosed(StateChangeReason reason) {
- if (mContainerHasInfoBars && mTabModelSelector != null) {
+ if (mReaderModePanel == null || mTabModelSelector == null) return;
+
+ if (mContainerHasInfoBars) {
Tab curTab = mTabModelSelector.getCurrentTab();
if (curTab != null) {
InfoBarContainer container = curTab.getInfoBarContainer();
- container.setIsObscuredByOtherView(false);
+ if (container != null) container.setIsObscuredByOtherView(false);
}
}
- if (mReaderModePanel == null) return;
-
// Only dismiss the panel if the close was a result of user interaction.
if (reason != StateChangeReason.FLING && reason != StateChangeReason.SWIPE
&& reason != StateChangeReason.CLOSE_BUTTON) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698