Gaia/System/mozContentEvent: Difference between revisions

From MozillaWiki
< Gaia‎ | System
Jump to navigation Jump to search
(Created page with " == Events with type == {| width="100%" border="1" |+ All mozContentEvent sent by System app ! event type ! send by ! description |- ! accessibility-screenreader || accessibi...")
 
Line 72: Line 72:
== Events without type ==
== Events without type ==


It is not required to supply a type field in mozContentEvent. There are two file 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.
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.


{| width="100%" border="1"
{| width="100%" border="1"

Revision as of 04:06, 12 February 2014

Events with type

All mozContentEvent sent by System app
event type send by description
accessibility-screenreader accessibility.js enable/disable screen reader
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
nfc-hardware-state-change nfc_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.