Fennec/NativeUI/Architecture Overview: Difference between revisions
Jump to navigation
Jump to search
MarkFinkle (talk | contribs) |
MarkFinkle (talk | contribs) (Moved to /Fennec/NativeUI) |
||
Line 12: | Line 12: | ||
** A JSON based message system is used to [[Fennec/NativeUI/Messages|send messages]] from XUL to Java. nsIAndroidBridge is the XPCOM object that makes this happen, but the messages are just forwarded to GeckoAppShell and routed out to Java from there. | ** A JSON based message system is used to [[Fennec/NativeUI/Messages|send messages]] from XUL to Java. nsIAndroidBridge is the XPCOM object that makes this happen, but the messages are just forwarded to GeckoAppShell and routed out to Java from there. | ||
** An event based message system is used to [[Fennec/NativeUI/Messages|send messages]] from Java to XUL. From Java, you create a GeckoEvent with a subject and data strings. This is sent to XUL as an nsIObserver notification. | ** An event based message system is used to [[Fennec/NativeUI/Messages|send messages]] from Java to XUL. From Java, you create a GeckoEvent with a subject and data strings. This is sent to XUL as an nsIObserver notification. | ||
==Interaction with Other Teams== | ==Interaction with Other Teams== | ||
* Add-ons: The add-on system will be impacted by the native UI change. We need to put together some information about how it's impacted and what we might be able to do to add back some level of support. | * Add-ons: The add-on system will be impacted by the native UI change. We need to put together some information about how it's impacted and what we might be able to do to add back some level of support. | ||
* L10N: Localization of the native UI can work very similar to how we localize Java UI parts now. Even that could be made easier though. The bigger issue is the affect of native UI on the dynamic way we can change localizations of the XUL UI without being locked or affected by the OS locale. I mean, Firefox Mobile (XUL) can be launched in a locale that isn't even shipped with the OS itself. This ability might be affected. | * L10N: Localization of the native UI can work very similar to how we localize Java UI parts now. Even that could be made easier though. The bigger issue is the affect of native UI on the dynamic way we can change localizations of the XUL UI without being locked or affected by the OS locale. I mean, Firefox Mobile (XUL) can be launched in a locale that isn't even shipped with the OS itself. This ability might be affected. |
Revision as of 13:18, 14 October 2011
It's always nice to have a bird's eye view of how something is working to help make it easier to understand. With that in mind here is quick summary of the current Java Fennec system. Please correct and add details where needed:
Overview
- Application UI is comprised mainly of Android Java and layout XML files found in embedding/android
- GeckoApp.java and gecko_app.xml comprise the main UI.
- AwesomeBar.java and awesomebar_search.xml are the main UI for the awesomebar screen. aweseombar_row.xml is the layout for a row in the list.
- SQLite is currently used to store the history. DatabaseHelper.java seems to be used to make the DB.
- XUL/JS and still used primarily as a communication shim from the Gecko platform to the Java UI.
- browser.js and browser.xul create a single <browser> "UI" for only displaying the web contents.
- Some helpers in browser.js are used to communicate network activity and mouse gestures to Java. More helpers will be needed for adding support for different Gecko features. Easily poached from the current code.
- A JSON based message system is used to send messages from XUL to Java. nsIAndroidBridge is the XPCOM object that makes this happen, but the messages are just forwarded to GeckoAppShell and routed out to Java from there.
- An event based message system is used to send messages from Java to XUL. From Java, you create a GeckoEvent with a subject and data strings. This is sent to XUL as an nsIObserver notification.
Interaction with Other Teams
- Add-ons: The add-on system will be impacted by the native UI change. We need to put together some information about how it's impacted and what we might be able to do to add back some level of support.
- L10N: Localization of the native UI can work very similar to how we localize Java UI parts now. Even that could be made easier though. The bigger issue is the affect of native UI on the dynamic way we can change localizations of the XUL UI without being locked or affected by the OS locale. I mean, Firefox Mobile (XUL) can be launched in a locale that isn't even shipped with the OS itself. This ability might be affected.