crosswalk-project/crosswalk — pull request #1393 by cmarcelo (2013-12-23 20:30:23+00:00)
Title: [Runtime] Move ApplicationSystem to XWalkRunner

ApplicationSystem was being created in RuntimeContext, we now create it
in XWalkRunner.

I've also removed RuntimeContext::GetActiveApplication(), and changed
the callers to use XWalkRunner::Get()->app_system() for now. While it's
usually OK for the tests continue to rely on XWalkRunner, other uses
should be removed in future steps.

I'm targetting first moving the construction to the right place, then
making sure dependencies are passed correctly and we avoid reaching the
global.

Note there's a circular dependency between RuntimeContext and
ApplicationSystem. The current plan is to provide a hook for adding
protocol handlers so that ApplicationSystem (or XWalkRunner) can use it
without RuntimeContext needing to be aware. I'm postponing this change
until there's more knowledge of these relationships.