public void addListener(final HistoryListener listener, Disposable parent) {
    listeners.add(listener);
    Disposer.register(parent, new Disposable() {
      @Override
      public void dispose() {
        listeners.remove(listener);
      }
    });
  }
public void addListener(final HistoryListener listener, Disposable parent)