gaia:system app

版权声明:本文为博主打劫来的文章!!!未经允许可以随便转载。 May you do good and not evil. May you share freely, never taking more than you give. https://blog.csdn.net/hunter___/article/details/83418577

 

B2G/gaia/apps/system$ grep -rn imgur.com
js/layout_manager.js:21:   * ![resize layout flow](http://i.imgur.com/bUMm4VM.png)
js/homescreen_window.js:9:   * ![Boot to Homescreen flow chart](http://i.imgur.com/vLA8YEN.png)
js/attention_window.js:11:   * <a href="http://i.imgur.com/4O1Frs3.png" target="_blank">
js/attention_window.js:12:   * <img src="http://i.imgur.com/4O1Frs3.png"></img>
js/app_window_factory.js:21:   * ![app and activity launch flow](http://i.imgur.com/ZyMcgft.png)
js/app_window.js:51:   * ![appWindow Life cycle state machine](http://i.imgur.com/ELuEopw.png)
js/app_window.js:1773:  * ![AppWindow resize flow chart](http://i.imgur.com/bUMm4VM.png)
js/app_transition_controller.js:21:   * ![AppTransition Flow chart](http://i.imgur.com/k0hO2AN.png)
js/app_transition_controller.js:24:   * ![AppTransition State machine](http://i.imgur.com/0arU9rl.png)
Binary file js/.app_window_manager.js.swp matches
js/activity_window.js:12:   * ![ActivityWindow flow](http://i.imgur.com/4O1Frs3.png)
js/orientation_manager.js:20:   * ![Change orientation flow](http://i.imgur.com/KCUgFH6.png)
js/app_window_manager.js:445:     * ![bootstrap](http://i.imgur.com/8qsOh1W.png)
js/app_window_manager.js:883:     * ![AppWindowManager kill process](http://i.imgur.com/VrlkUXM.png)

 

log顺序:

system app:

app.js  整个system app的入口,负责将所有application core需要的东西准备好。core.js启动核心bootstrap模块.

core.js  用于实例化及启动核心模块的bootstrap 模块。api的处理都在这里。

* This is the bootstrap module of the system app.  * It is responsible to instantiate and start the other core modules * and sub systems per API.

launcher.js 负责读取所有启动相关的配置,并请求其他launcher通过这些配置在正确的时间launch。就是ftu, hsc wallpaper等的启动

applications.js

app_chrome.js

app_window_factory.js 负责APP的启动launch,监听“webapps-launch,,,”等属性

http://i.imgur.com/ZyMcgft.png

app_window.js 用于app窗口的管理,如改变大小方向,设置背景,切换窗口(是否处于活跃active状态)等等。

http://i.imgur.com/ELuEopw.png

[appWindow Life cycle state machine](http://i.imgur.com/ELuEopw.png)

[AppWindow resize flow chart](http://i.imgur.com/bUMm4VM.png) 

app_window_manager.js 控制app窗口的关闭和打开,传递改变大小屏幕方向等布局请求给appwindow 实例(也就是一个个APP窗口?)即app窗口管理。

匹配相应APP

http://i.imgur.com/8qsOh1W.png

app_window_manager.js:445:     * ![bootstrap](http://i.imgur.com/8qsOh1W.png)

http://i.imgur.com/VrlkUXM.png

app_window_manager.js:883:     * ![AppWindowManager kill process](http://i.imgur.com/VrlkUXM.png)

activity_window.js

http://i.imgur.com/4O1Frs3.png

homescreen_window.js 通过给定的manifesrURL创建homescreen 实例,谁给的呢?

http://i.imgur.com/vLA8YEN.png

所以,所有app都通过new HomeScreenWindow(url)打开的,包括hsc app.

HomescreenWindow creates a instance of homescreen by give manifestURL.
   *

homescreen_window_manager.js  管理hsc的显示与隐藏。

homescreen_launcher.js 负责启动hsc 窗口并且保证其单例模式

attention_window.js

http://i.imgur.com/4O1Frs3.png

layout_manager.js 控制布局格式

http://i.imgur.com/bUMm4VM.png

app_transition_controller.js

app_transition_controller.js:21:   * ![AppTransition Flow chart](http://i.imgur.com/k0hO2AN.png)


js/app_transition_controller.js:24:   * ![AppTransition State machine](http://i.imgur.com/0arU9rl.png)

orientation_manager.js:20:   * ![Change orientation flow](http://i.imgur.com/KCUgFH6.png)

猜你喜欢

转载自blog.csdn.net/hunter___/article/details/83418577
app
今日推荐