crosswalk-project/crosswalk — pull request #1272 by cmarcelo (2013-12-09 01:05:36+00:00)
Title: Add Crosswalk object

This is a draft implementation of the step (4) of Mikhail's and Alexander's plan:

"4. Fix ownership at Chromium Content API embedding classes: ContentBrowserClient, MainParts, BrowserContext"

https://docs.google.com/a/intel.com/document/d/1N0VVlut7JCWFbAEwTQc0loN9_D2JlOXRJprQeCbXY2U/edit

My early feedback was to merge together the "main object" of Crosswalk with ApplicationSystem, but after some more thought, feedback from discussions and trying out in the code, I think for now we could benefit of a separate object. Later on if needed ApplicationSystem can "blend" itself into that main object.

The "Crosswalk" object is responsible to setup (and teardown) the object tree for Crosswalk execution. This job was spread between different classes. As discussed, the idea is treat the previous "candidates to be a main class" (RuntimeContext, XWalkBrowserMainParts, XWalkContentBrowserClient) as "things we use for Content API adaptation". Our main class have a clear lifecycle AND owns (or creates and gives) the previous candidates to Content framework as necessary.

See also the commit messages for more detailed view on each change. The series is not complete but the patches so far are "ready to review" quality, except for Android which I couldn't test yet and might be missing one thing or other. I do not intend to land this before the branch of crosswalk-3. I don't think there are any major conflicts with the shared_browser_process branch, but I volunteer to help sorting out any conflicts.

@pozdnyakov @kenchris @darktears @jeez could you take a look?