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, and only a small
implementation (that does not require creating additional methods)
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
Review-Url: https://codereview.chromium.org/2655463008
Cr-Commit-Position: refs/heads/master@{#446394}
Committed: https://chromium.googlesource.com/chromium/src/+/5b52d760b18cc7b955ee0bf35cdfe7239f9ba0c7
Patch Set 1 #Patch Set 2 : Update BUG ID #
Total comments: 2
Patch Set 3 : Include class name in runtime exception #
Total comments: 4
Patch Set 4 : Add javadoc #Patch Set 5 : Rebase #Messages
Total messages: 13 (6 generated)
|