- AppWindow
- HomescreenWindow
- ActivityWindow
- LockscreenWindow
- SecureWindow
- PopupWindow
- SearchWindow
- (AttentionWindow)
- (TrustedWindow)
- (KeyboardWindow)
- Bottom<->Top
- Top window is rendered inside the bottom window.
- All events propagation in inner window should be stopped.
- Previous<->Next
- Factory is creating new instances.
- Manager is managing instnaces by the events generated by the instances.
- Q: Who should keep the list of living instances?
If an appWindow instance is created to service another appWindow we call it child window.
window.open
new MozActivity
BaseWindow is responsible to manage its child windows.
The window which is rendered under #windows. All of them is instance of AppWindow and managed by AppWindowManager.
Currently there's only one child window for one dimension on mobile devices. But if we are heading for multiple windows, we will have a list of child windows.
- Each app window has a state machine for managing transition state changes.
- Transition state change will trigger many things.
- orientation control
- size control
- visibility control
- Load state
- '_' prefixed event is inner event.
- No '_' is outer event.
- AppWindow will trigger inner event before any outer events.
- An event is triggered on dom element the controller owns.
- Event is also prefixed by the type of the window.
- Suspended app is an app being killed by gecko, usually by LMK.
- We are keeping at most 10 suspended apps for now for performance issues.
- If there's more than 10 suspended apps, SuspendingAppManager will kill the oldest suspended app.
- AppWindow will resume itself by re-creating the mozbrowser iframe with the latest URL when it's opened from task managero or homescreen (mozApps launch).