Gaia/System/mozContentEvent

From MozillaWiki
< Gaia‎ | System
Jump to: navigation, search

Events with type

All mozContentEvent sent by System app
event type send by description
activity-choice activities.js an activity option is chosen
webapps-install-granted app_install_manager.js
webapps-install-denied app_install_manager.js
system-message-listener-ready bootstrap.js to tell gecko we are ready for receiving system message, like radio
delete-crash crash_reporter.js
submit-crash crash_reporter.js
inputmethod-update-layouts keyboard_manager.js
desktop-notification-click notifications.js
desktop-notification-show notifications.js
desktop-notification-close notifications.js
permission-deny permission_manager.js
permission-allow permission_manager.js
remote-debugger-prompt remote_debugger.js use value=true or false to tell gecko user accepts or not
take-screenshot screenshot.js
cancel trusted_ui.js
update-available-result updatable.js
update-download-cancel updatable.js
force-update-check update_manager.js

Events without type

It is not required to supply a type field for sending a mozContentEvent. There are two files sending mozContentEvent with id as its field to tell gecko what's going on: identity.js and payment.js. All of them returns values to specific mozChromeEvents.

file response event description
identity.js id-dialog-open dispatch event when a dialog is opened or already opened.
A trusted UI will be opened if e.detail.showUI set to true. Otherwise, System app creates an iframe for communication with persona. The url is from e.detail.uri.
identity.js id-dialog-done dispatch event when a "id-dialog-done" mozChromeEvent received.
The trusted UI will be closed if it is opened with id-dialog-open.
payment.js open-payment-confirmation-dialog dispatch when user chooses confirm or cancel
payment.js open-payment-flow-dialog dispatch event when payment flow dialog is opened.
The frame is wrapped inside of trusted UI. The url is from e.detail.uri.
payment.js close-payment-flow-dialog dispatch event when payment flow dialog is closed.