This is a Fennec version of about:accounts, cribbed largely from
Desktop's implementation. This implementation serves two purposes:
One, it allows all fxa-content-server pref handling to remain in
Gecko. Java-side consumers redirect to about:accounts?action=... and
have pref munging and parameter addition (like context=fx_fennec_v1,
etc) handled by about:accounts itself.
Two, it handles network connectivity display and error handling. When
a request is started, we display an animated spinner. We transition
smoothly from the spinner to the iframe display if we can, and if not
we hide any network error and offer to retry. This is more important
in Fennec than it is on Desktop. This approach agrees with Firefox
for iOS.
Some additional notes:
The spinner to iframe transition uses the WebChannel listener to send
LOADED messages to the appropriate XUL <browser> element. It's worth
remembering that Fennec's Gecko is single process, so the <browser> in
question is in the same process. None-the-less, we are close to e10s
safe.
There are four actions: signup/signin/force_reauth, and manage. The
first three try to produce a LOGIN message. The last uses the
fxa-content-server to manage the Account settings. *This is not how
this is arranged on Desktop: Desktop redirects to a new tab, not
wrapped in about:accounts.*
* Synchronize nsIParentalControlsService.idl and Restriction.java
* Do not hide 'tools' menu but menu items of disabled features
* Hiding 'Report site issue' should not be configurable
* Restricted profiles: DISALLOW_INSTALL_APPS is a system restriction and should not be configurable
* RestrictedProfileConfiguration: Use AboutPages
Deriving the correct panel UUID from the active Home Panel configuration
is challenging. This is easy and will only exist for one release. (The
Remote Tabs tray icon will disappear after this release; see Bug
1063753.) This solves the problem in essentially all the situations we
expect to see.