Redefine DoorHanger's API




Firefox for Android
5 years ago
5 years ago


(Reporter: lucasr, Unassigned)


Firefox Tracking Flags

(Not tracked)




5 years ago
This is spin-off from bug 943915. Some comments from wesj:

>          mChoicesLayout.addView(button, sButtonParams);
>      }
> +    public void setOptions(final JSONObject options) {

I never like when these JSON methods are exposed. It seems to just tempt people to use them. "I'm in java and want to add a doorhanger, I'll just create a JSONObject and pass it in".

Maybe is better to read these properties and feed them to the DoorHanger.

@@ +322,5 @@
>       *
>       * @param isShowing Whether or not this doorhanger is currently visible to the user.
>       *                 (e.g. the DoorHanger view might be VISIBLE, but its parent could be hidden)
>       */
> +    public boolean shouldRemove(boolean isShowing) {

Hmm.. This seems weird to expose to me. This method shouldn't be in here I think. It should probably be in DoorHangerPopup. Decreasing the persistence in it also seems... wrong. At best that should probably be decremented when a show() method was called.


5 years ago
No longer depends on: 943915
You need to log in before you can comment on or make changes to this bug.