In a following patch, all DevTools moz.build files will use DevToolsModules to
install JS modules at a path that corresponds directly to their source tree
location. Here we rewrite all require and import calls to match the new
location that these files are installed to.
Currently we "quit" by closing the last window, but this bug makes us
not quit Gecko automatically when the last window closes. Therefore we
should force Gecko to quit. This patch also makes our quit code
consistent with the addon restart code at [1], i.e. using
nsIAppShell::Quit to quit and sending the "quit-application-requested"
notification. The previous notification,
"browser-lastwindow-close-requested", appears to only be used on
desktop.
[1] mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js?rev=f61c3cc0eb8b#6287
Bug 991167 added BundleEventListener that allow dispatching an event
directly to the UI thread or to the background thread. This patch adds
tests to testEventDispatcher, to test that the events are dispatched on
the correct threads and that the Bundle messages are correct. Because
these events are asynchronous, the test waits for each event to be
processed before continuing.
This was not broken on tablet.
The new ShapedButtonFrameLayout class is a duplicate of ShapedButton's LWT
code. I tried an approach that extracted this code out to an external class, to
prevent code duplication and reduce the code size but due to the access rights
on the super classes, it was really messy and, imo, not worth it.
This just directs to about:accounts?action=manage, which determines
the relevant URL and displays the web content.
Nota bene: about:accounts hasn't landed yet.
The desired behaviour:
* If we have no account now, and had no account or the same account in
the past -- no message, allow.
* If we have no account now, but had a different account in the past -- prompt.
* If we have an account, and this is the same account -- no message, allow.
* If we have an account, and this is not the same account -- toast and
never allow.
This ticket does the following things:
* register early. If the first page that Gecko loads is
about:accounts, the channel needs to be in place. If we delay this,
we can and do miss content server messages.
* listen to the following messages:
CAN_LINK_ACCOUNT: 'fxaccounts:can_link_account'
CHANGE_PASSWORD: 'fxaccounts:change_password'
DELETE_ACCOUNT: 'fxaccounts:delete_account'
LOADED: 'fxaccounts:loaded'
LOGIN: 'fxaccounts:login'
The list of messages is from
2a78a14daf/app/scripts/models/auth_brokers/fx-desktop-v2.js (L24)
via
2a78a14daf/app/scripts/models/auth_brokers/fx-fennec-v1.js
This patch implements only LOADED, LOGIN, and CHANGE_PASSWORD. The
messages have the following behaviour:
A LOADED message is ferried to the individual XUL <browser> element it
originated from. In general, WebChannel is a global listener: it does
not matter where a message originates. We want to have fine-grained
control over when an embedding <iframe> is displayed (as opposed to
loaded, in the Gecko sense of loaded). The fxa-content-server
participates in this exchange via the LOADED message; we complete the
loop by specially handling LOADED.
A LOGIN or CHANGE_PASSWORD message either creates a new Android
Account in the Engaged state, or moves an existing Android Account to
the Engaged state. An Android sync is not yet requested -- we'll
arrange that from the Java side.
This patch allows you to set MOZ_APP_ANDROID_VERSION_CODE in a branding's configure.sh to specify the exact android:versionCode to use in the final (main) APK. It does *not* modify the android:versionCode used in any other APKs.