与Firefox OS 相关的 Gecko 文件
b2g/
b2g 文件夹会包含了一些主要的Firefox OS 相关的功能。.
b2g/chrome/content
包含了在system app 之上运行的 Javascript 文件。
b2g/chrome/content/shell.html
Gaia的入口 — system app的html。 shell.html 会加载 settings.js 和 shell.js:
settings.js 包含了系统设置的默认参数。
b2g/chrome/content/shell.js
shell.js 是在 Gaia system app中装载的第一个脚本文件。.
shell.js 导入了所有需要的模块,注册键值监听,定义了 sendCustomEvent 和sendChromeEvent 与Gaia 通信,并且提供了 webapp 的安装助手: indexedDB quota, RemoteDebugger,keyboard helper, 和screenshot 工具。
但是shell.js 最重要的功能就是启动了 Gaia system app, 之后又将整个系统相关的管理工作移交给了 Gaia system app
b2g/app/b2g.js
这个脚本中包含了预定义的配置信息,如浏览器中的 about:config, 文件与 Gaia 中的 pref.js 类似。这些配置可以在 Settings app中更改,可以使用Gaia 构建脚本文件 Gaia user.js文件覆写。
dom/{API}
新的 API 实现(post-b2g)放置在 dom/ 文件夹中;而旧的API 的dom/base 文件夹中,如 navigator.cpp。
dom/apps
.jsm 文件会被加载,是对.js API 的实现,如 webapp.js 等。
dom/apps/src/
所有的权限信息都在 PermissionsTable.jsm 文件中定义。
dom/webidl
WebIDL 是一种用来定义 web APIs 的语言。可查看 WebIDL_bindings 文件来获取它所支持的特性。
hal/gonk
这个文件夹包含了 gonk 接口层的相关文件。
Generated files
module/libpref/src/init/all.js
包含所有的配置文件。
/system/b2g/ omni.ja and omni.js
包含了设备中的资源样式包。