crosswalk-project/crosswalk — pull request #1043 by hmin (2013-10-31 03:28:44+00:00)
Title: [WiDi API] Implement navigator.presentation.requestShow API on Android

This patch is to implement navigator.presentation.requestShow for
showing a new HTML page on the secondary display.

IMPLEMENTATION NOTES:
o Web messaging can be used for communication between the opener window
and presentation window.
o Only one presentation is allowed to be created. If there is already a
presentation showing, an attempt to call requestShow will fail.
o A presentation will be dismissed in case of:
1. window.close is called to close the presentation DOM window, or
2. The presentation display is disconnected, and there is no available
display for presentation show any more.
o The DOM window object for presentation is retrieved from the routing id
of RenderView. It follows the way chrome.app.window.create does.

TODOS:
o Add `destroy` into XWalkView to destroy an XWalkView instance.
o Add `Promise` support for requestShow API instead of using callback.
o Make it backward-compatible on Android

SPEC=http://otcshare.github.io/presentation-spec/index.html
BUG=https://github.com/crosswalk-project/crosswalk/issues/577