crosswalk-project/crosswalk — pull request #1593 by shaochangbin (2014-02-19 02:57:31+00:00)
Title: [Do not merge][Runtime] Separate WGT applications manifest handling from XPK applications.

When loading WGT manifest file, current Crosswalk maps XML Widget
elements to manifest keys under namespace 'application_manifest_keys' by
hard code. Consequently, WGT app and XPK app share the same manifest
keys and manifest handlers. As with more manifest keys and handlers are
introduced for WGT app, this causes a mix up of WGT specific keys and
XPK specific keys, due to WGT and XPK app have different manifest formats
and keys, especially put Tizen Extending Configuration Elements into
consideration.

A solution to fix above issue is to separate WGT manifest keys and handlers
from XPK apps. In detail, when loading WGT manifest, we introduce a
mechanism to save XML configuration information into manifest Dictionary
structure(note that this is not hard code mapping), keys are different
from those of XPK apps. WGT keys are put under 'application_widget_keys'
namespace, while XPK keys are put under 'application_manifest_keys'.
Then we could add WGT specific handlers for WGT keys.

In order to save XML configuration in manifest Dictionary, this PR uses
the following converting path:
1. XML file -> JSON file
2. JSON file -> manifest Dictionary structure.
There is already 'JSONFileValueSerializer' to realize step 2. For step
1, this PR provides a Python version implementaion. The C++ version can
be provided later.