Closed
Bug 1432233
Opened 6 years ago
Closed 6 years ago
Get rid of GeckoBundle in public API
Categories
(GeckoView :: General, enhancement)
GeckoView
General
Tracking
(firefox60 fixed)
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: snorp, Assigned: droeh)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
40.73 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
Unless there is somewhere we absolutely must use it. String-based API bad.
Assignee | ||
Comment 1•6 years ago
|
||
Here's a first take at it. We probably need a better name for the class I called "Choice", but I'm drawing a blank on what would make for a good name there.
Assignee: nobody → droeh
Assignee | ||
Comment 2•6 years ago
|
||
Comment on attachment 8951025 [details] [diff] [review] Kill public GeckoBundles Forgot to flag for review.
Attachment #8951025 -
Flags: review?(snorp)
Reporter | ||
Comment 3•6 years ago
|
||
Comment on attachment 8951025 [details] [diff] [review] Kill public GeckoBundles Review of attachment 8951025 [details] [diff] [review]: ----------------------------------------------------------------- Pretty good, but I want to eliminate "string-based enums" as well. ::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSession.java @@ +1968,5 @@ > + */ > + public String name; > + > + /** > + * A string giving the media source type. Whitespace @@ +1974,5 @@ > + * "camera", "screen", "application", "window", "browser", and "other". > + * Possible values for an audio source are: > + * "microphone", "audioCapture", and "other". > + */ > + public String source; I think this should be an integer and we should have constants for the possible values. @@ +1979,5 @@ > + > + /** > + * A string giving the type of media, must be either "video" or "audio". > + */ > + public String type; Same here
Attachment #8951025 -
Flags: review?(snorp) → review-
Assignee | ||
Comment 4•6 years ago
|
||
Noted. This updates MediaSource to use ints for source and type (and fixes the extra whitespace).
Attachment #8951025 -
Attachment is obsolete: true
Attachment #8951069 -
Flags: review?(snorp)
Reporter | ||
Comment 5•6 years ago
|
||
Comment on attachment 8951069 [details] [diff] [review] Kill public GeckoBundles Review of attachment 8951069 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSession.java @@ +1607,5 @@ > */ > void promptForAuth(GeckoSession session, String title, String msg, > + AuthenticationOptions options, AuthCallback callback); > + > + class Choice { Wow, this part of the prompt API is completely ridiculously. Can you file a followup to kill it? I want to move whatever is using this to special-purpose prompt APIs (similar to promptForAuth). @@ +2032,5 @@ > + */ > + public int type; > + > + private static int getSourceFromString(String src) { > + if ("camera".equals(src)) { Can you leave a comment indicating where these strings come from? Presumably we'll have to keep them in sync.
Attachment #8951069 -
Flags: review?(snorp) → review+
Pushed by droeh@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/8cc483ee3ffb Eliminate GeckoBundles from public APIs in GeckoSession. r=snorp
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8cc483ee3ffb
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Comment 8•6 years ago
|
||
Comment on attachment 8951069 [details] [diff] [review] Kill public GeckoBundles Review of attachment 8951069 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSession.java @@ +1627,5 @@ > + /** > + * A boolean indicating if the item is disabled. Item should not be > + * selectable if this is true. > + */ > + public boolean disabled; These fields should all be final. Doesn't really make sense for the consumer to change them.
Assignee | ||
Comment 9•6 years ago
|
||
(In reply to Jim Chen [:jchen] [:darchons] from comment #8) > Comment on attachment 8951069 [details] [diff] [review] > Kill public GeckoBundles > > Review of attachment 8951069 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: > mobile/android/geckoview/src/main/java/org/mozilla/gecko/GeckoSession.java > @@ +1627,5 @@ > > + /** > > + * A boolean indicating if the item is disabled. Item should not be > > + * selectable if this is true. > > + */ > > + public boolean disabled; > > These fields should all be final. Doesn't really make sense for the consumer > to change them. We do actually rely on changing some of these (label and selected) in BasicGeckoViewPrompt.java; is it safe to assume the rest should be final?
Comment 10•6 years ago
|
||
I think so. Even for "label" and "selected", they should be final, and BasicGeckoViewPrompt should store the active states elsewhere.
Assignee | ||
Comment 11•6 years ago
|
||
Alright, I'll follow up on that in bug 1438994.
Updated•5 years ago
|
Product: Firefox for Android → GeckoView
Updated•5 years ago
|
Target Milestone: Firefox 60 → mozilla60
Comment hidden (collapsed) |
You need to log in
before you can comment on or make changes to this bug.
Description
•