crosswalk-project/crosswalk — pull request #814 by PeterWangIntel (2013-09-30 07:22:38+00:00)
Title: Auto generate internal-extension JS API file

Leverage Chromium "json_schema_compiler" to build xwalk extension JS API file auto-gen-tool, taking Dialog as example.
Key parts of this patch are:
(1) experimental/dialog/dialog.json
To describe the interfaces related with "MeaasgeHanle"(js api). And by my understanding it's better to use JSON than IDL, since what we want auto-generate are not interfaces cross language, but a "map" between "message" and function pointer.
(2) tools/json_schema_compiler/xwalk_extension_compiler.py
This is the entrance of calling json-related tool.
(3) experimental/xwalk_json_schema_compile.gypi
Glue with outside gyp file.
(4) The python files added in path "./tools"are copied from chromium.

If this patch is ok for everybody, my next plan is to add a CPP auto-generator (we need to separate the part that can be auto-generated), then add an external-extensions template-generator.