Closed Bug 1432487 Opened 6 years ago Closed 6 years ago

Change all listeners/delegates to be FooDelegate

Categories

(GeckoView :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox60 fixed)

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: snorp, Assigned: droeh)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We used to use Listener for things that just observed events and Delegate for things that had predicates or other two-way methods. We should just use Delegate for all of these types since it seems inevitable that they will have that type of use some day.
Is there an example of us needing to change a listener to a delegate? I think the Listener/Delegate naming follows general Android conventions.
(In reply to Jim Chen [:jchen] [:darchons] from comment #1)
> Is there an example of us needing to change a listener to a delegate? I
> think the Listener/Delegate naming follows general Android conventions.

NavigationListener has onLoadUri() which is not just a listener.
Renames *Listener to *Delegate.
Assignee: nobody → droeh
Attachment #8954499 - Flags: review?(snorp)
Attachment #8954499 - Flags: review?(nchen)
Comment on attachment 8954499 [details] [diff] [review]
Rename GeckoView Listeners to Delegates

Review of attachment 8954499 [details] [diff] [review]:
-----------------------------------------------------------------

Might as well rename the methods here as well. Also please fix tests as well.
Attachment #8954499 - Flags: review?(nchen) → review+
Attachment #8954499 - Flags: review?(snorp) → review+
(In reply to Jim Chen [:jchen] [:darchons] from comment #4)
> Comment on attachment 8954499 [details] [diff] [review]
> Rename GeckoView Listeners to Delegates
> 
> Review of attachment 8954499 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Might as well rename the methods here as well. Also please fix tests as well.

Which method names? I renamed all of the *Listener* methods (and variables) I could find; the only stuff intentionally left using "Listener" in the name is BundleEventListener related.
I meant what we talked about, renaming delegate methods to "onFoo" and "onFooRequest".
Pushed by droeh@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2b86e947b043
Rename all *Listeners to *Delegates and corresponding minor changes. r=snorp,jchen
Pushed by droeh@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c9ed97a0de02
Rename all *Listeners to *Delegates and corresponding minor changes. r=snorp,jchen
https://hg.mozilla.org/mozilla-central/rev/c9ed97a0de02
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Flags: needinfo?(droeh)
Product: Firefox for Android → GeckoView
Target Milestone: Firefox 60 → mozilla60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: