crosswalk-project/crosswalk — pull request #907 by DonnaWuDongxia (2013-10-17 09:59:06+00:00)
Title: [Android] Multi-frame support for Java extensions, it fixes #705.

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)