Bug 1288256 - Post: add comments explaining HomePager specific methods in HomeScreen r?sebastian draft
authorAndrzej Hunt <ahunt@mozilla.com>
Thu, 21 Jul 2016 08:03:37 -0700
changeset 390724 d114931be59c74c98357f98a1e5ce6647c7f7e1a
parent 390723 9781099b5820b472dd2e184f8f2b41ddd97753e6
child 526051 d84c078b751eea46cc2d7a232908b2b24806db3f
push id23728
push userahunt@mozilla.com
push dateThu, 21 Jul 2016 15:54:40 +0000
reviewerssebastian
bugs1288256
milestone50.0a1
Bug 1288256 - Post: add comments explaining HomePager specific methods in HomeScreen r?sebastian MozReview-Commit-ID: 5hgTMzff6zq
mobile/android/base/java/org/mozilla/gecko/home/HomeScreen.java
--- 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();
 }