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

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

Issue 2883643002: Clean up ReaderMode OverlayPanel classes (Closed)
Patch Set: remove extra enum Created 3 years, 6 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
Index: chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerUIUtils.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerUIUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerUIUtils.java
index 1aa2994766cd3097c08683dab39d6b12ee62c1fd..57e37e6343789f28b783d4a126ab25c08938b58d 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerUIUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerUIUtils.java
@@ -11,7 +11,6 @@ import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.base.metrics.RecordUserAction;
import org.chromium.chrome.R;
-import org.chromium.chrome.browser.compositor.bottombar.OverlayPanel.StateChangeReason;
import org.chromium.content_public.browser.WebContents;
import org.chromium.ui.base.WindowAndroid;
@@ -21,14 +20,14 @@ import org.chromium.ui.base.WindowAndroid;
@JNINamespace("dom_distiller::android")
public final class DomDistillerUIUtils {
// Static handle to Reader Mode's manager.
- private static ReaderModeManagerDelegate sManagerDelegate;
+ private static ReaderModeManager sManagerManager;
wychen 2017/06/28 21:32:37 Do we still need this?
mdjones 2017/06/29 15:38:35 Guess not, kept it around for the settings util bu
/**
* Set the delegate to the ReaderModeManager.
- * @param delegate The delegate for the ReaderModeManager.
+ * @param manager The class managing Reader Mode.
*/
- public static void setReaderModeManagerDelegate(ReaderModeManagerDelegate delegate) {
- sManagerDelegate = delegate;
+ public static void setReaderModeManagerDelegate(ReaderModeManager manager) {
+ sManagerManager = manager;
}
/**
@@ -47,25 +46,14 @@ public final class DomDistillerUIUtils {
}
}
- /**
- * A static method for native code to close the current Reader Mode panel. This should be
- * some usage of a "close" button.
- * @param animate If the panel should animate closed.
- */
- @CalledByNative
- public static void closePanel(boolean animate) {
- if (sManagerDelegate == null) return;
- sManagerDelegate.closeReaderPanel(StateChangeReason.CLOSE_BUTTON, animate);
- }
-
/**
* Clear static references to objects.
- * @param delegate The delegate requesting the destoy. This prevents different managers in
+ * @param manager The manager requesting the destoy. This prevents different managers in
* document mode from accidentally clearing a reference it doesn't own.
*/
- public static void destroy(ReaderModeManagerDelegate delegate) {
- if (delegate != sManagerDelegate) return;
- sManagerDelegate = null;
+ public static void destroy(ReaderModeManager manager) {
+ if (manager != sManagerManager) return;
+ sManagerManager = null;
}
/**

Powered by Google App Engine
This is Rietveld 408576698