[geckoview] Use abstract classes for delegates instead of interfaces

NEW
Unassigned

Status

defect
P3
normal
3 years ago
6 months ago

People

(Reporter: snorp, Unassigned)

Tracking

Trunk
Dependency tree / graph

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
Priority: -- → P3

Updated

6 months ago
Product: Firefox for Android → GeckoView
You need to log in before you can comment on or make changes to this bug.