Cherry-pick: aw: Avoid uncontrolled video context destruction

Clean cherry-pick of chromium

BUG: 17177416

Original description:

Since r289474, the sync factory nulls out the video context
which means the destruction is uncontrolled. Context
destruction is synchronous, so can cause deadlocks if there
are not webviews attached to view tree to run GL.

This is a rewrite of r289474 that just returns null
VideoContextProvider if no webview is ready to use it. But
still hold on to the reference to the context to avoid

Change-Id: Ia5b855dd579dcdafd4ace1d2557414188d440d97
1 file changed