Bug 1288256 - Post: add comments explaining HomePager specific methods in HomeScreen r?sebastian
MozReview-Commit-ID: 5hgTMzff6zq
--- a/mobile/android/base/java/org/mozilla/gecko/home/HomeScreen.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/HomeScreen.java
@@ -33,20 +33,25 @@ public interface HomeScreen {
// The following two methods are actually methods of View. Since there is no View interface
// we're forced to do this instead of "extending" View. Any class implementing HomeScreen
// will have to implement these and pass them through to the underlying View.
boolean isVisible();
boolean requestFocus();
void onToolbarFocusChange(boolean hasFocus);
+ // The following three methods are HomePager specific. The persistence framework might need
+ // refactoring/generalising at some point, but it isn't entirely clear what other panels
+ // might need so we can leave these as is for now.
void showPanel(String panelId, Bundle restoreData);
-
void setOnPanelChangeListener(OnPanelChangeListener listener);
-
void setPanelStateChangeListener(HomeFragment.PanelStateChangeListener listener);
+ /**
+ * Set a banner that may be displayed at the bottom of the HomeScreen. This can be used
+ * e.g. to show snippets.
+ */
void setBanner(HomeBanner banner);
void load(LoaderManager lm, FragmentManager fm, String panelId, Bundle restoreData, PropertyAnimator animator);
void unload();
}