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

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

Issue 1497483003: Update delegate held by UI utils (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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: 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 7382f7615ec27d316183f4fc8f7eb8be754fc597..8a5e118df14f6c106fc4836f393ed6cda88ae836 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
@@ -93,7 +93,6 @@ public class ReaderModeManager extends TabModelSelectorTabObserver
? ApiCompatibilityUtils.getColor(
activity.getResources(), R.color.reader_mode_header_bg)
: 0;
- DomDistillerUIUtils.setReaderModeManagerDelegate(this);
}
/**
@@ -129,6 +128,9 @@ public class ReaderModeManager extends TabModelSelectorTabObserver
return;
}
+ // Set this manager as the active one for the UI utils.
+ DomDistillerUIUtils.setReaderModeManagerDelegate(this);
+
// Remove the infobar observer from the previous tab and attach it to the current one.
if (previousTab != null && previousTab.getInfoBarContainer() != null) {
previousTab.getInfoBarContainer().removeObserver(this);

Powered by Google App Engine
This is Rietveld 408576698