Chromium Code Reviews
DescriptionAdd new pattern for creating downstream objects
This change introduces a new pattern for instantiating objects of
classes that have have differing upstream/downstream implementations.
If a class's constructor requires no parameters (as is most frequently
the case in this scenario), it can be created with:
ChromeApplication.createObject(MyType.class);
and registered with no additional change upstream. Only a single line
registration of the implementation needs to be provided downstream.
Without this change, one must register a new method both upstream and
downstream as well as cast an application context to a
ChromeApplication before calling that newly registered return
type-specifc method.
BUG=685383
Patch Set 1 #Patch Set 2 : Restore createObject method #Patch Set 3 : ? extends #Messages
Total messages: 4 (2 generated)
|