예제 #1
0
 @Override
 protected void onDetach() {
   if (messageEventListeners != null) {
     for (final PostMessageEventListener messageEventListener : messageEventListeners) {
       final JavaScriptObject postMessageListenerFunction =
           postMessageListenerFunctions.remove(messageEventListener.getActionToWatch());
       removeFrameNotificationListener(postMessageListenerFunction);
     }
   }
   super.onDetach();
 }
예제 #2
0
 @Override
 protected void onAttach() {
   if (messageEventListeners != null) {
     for (final PostMessageEventListener messageEventListener : messageEventListeners) {
       if (!postMessageListenerFunctions.containsKey(messageEventListener.getActionToWatch())) {
         postMessageListenerFunctions.put(
             messageEventListener.getActionToWatch(),
             addFrameNotificationListener(messageEventListener));
       }
     }
   }
   super.onAttach();
 }