crosswalk-project/crosswalk — pull request #921 by DonnaWuDongxia (2013-10-19 05:41:35+00:00)
Title: [Android] Multi-frame support for XWalk extension on Android

When there are multiple frames in one page, extension instance will
be created for each frame. But as internal WebFrame is not exposed
in Java side, there is no way for Java side to identify which
instance to send message. This patch exposed instanceID up to Java
side when it receives message which can be used to identify the
target instance when post message to JavaScript side. What's more
a new interface "broadcastMessage" was added to meet the requirement
that Java side may need to broadcast message to all exiting instances.

Changed interfaces for Java extension:
1. postMessage(String msg) -> postMessage(int instanceID, String msg)
2. onMessage(String msg) -> onMessage(int instanceID, String msg)
3. onSyncMessage(String msg) -> onSyncMessage(int instanceID, String msg)
4. new added: broadcastMessage(String msg)

BUG=#705