[geckoview] Use abstract classes for delegates instead of interfaces

NEW
Unassigned

Status

()

Firefox for Android
GeckoView
a year ago
8 months ago

People

(Reporter: snorp, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Or at the least, we should offer abstract classes that implement the current interfaces and have base functionality that makes sense. The benefit is that often you only want to implement some of the interface and not the whole thing, so this makes that convenient.
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #0)
> Or at the least, we should offer abstract classes that implement the current
> interfaces and have base functionality that makes sense. The benefit is that
> often you only want to implement some of the interface and not the whole
> thing, so this makes that convenient.

One counter-argument: you often end up with `CanonicalNameDelegate` and `CanonicalNameDelegate2` when you want to version or improve things.  I'm gently against this approach, because I think it contradicts the general strength of "prefer composition over inheritance".
Component: Embedding: APIs → GeckoView
Product: Core → Firefox for Android
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.