Following are the plan about why and how to split current Gaia:System:Window Manager.
Sources/Links
Current main functions in Window Manager
- App Window Management
- Wrapper Window Management
- Inline Activity Management
- Homescreen Management
- MozBrowser Element Generation
- Orientation Management
- Visibility Management
- Resize Management
- App Screenshots Management [deprecated]
- System Message Handler
- Open app transition
- Close app transition
- FTU Management [deprecated! Become standalone FTU Launcher already!]
So which could be pulled out to reduce the heavy weight?
Inline Activity Management –> App Window
Inline Activity Management should belong to the activity caller.
If app A opens a page(open.html) of app B as an inline activity, the life cycle of activity callee is based on app A instead of app B.
Thus, if app A is killed or closed, the activity opened by app A should be killed.
But if app B(index.html) is killed, activity B(open.html) shouldn’t be affected.
Resize Management
Resize is another duty of the app window instance itself.
If we’re moving the activity into the app window, we could
- Recursively call current activity callee’s resize function until the last callee is found.
- Resize all activity callee on top of current app window.
in the app window’s resize function.
Visibility Management
App window would have 2 kind of “child-like” window instance:
* var child = window.open
* Activity