// Private methods ---------------------------------------------------------
private void notifyShinyAppClosed(JavaScriptObject params)
{
ShinyApplicationParams appState = params.cast();
// if we don't know that an app is running, ignore this event
if (currentAppFilePath_ == null)
return;
// If the application is stopping, then the user initiated the stop by
// closing the app window. Interrupt R to stop the Shiny app.
if (appState.getState().equals(ShinyApplicationParams.STATE_STOPPING))
{
if (commands_.interruptR().isEnabled())
commands_.interruptR().execute();
appState.setState(ShinyApplicationParams.STATE_STOPPED);
}
eventBus_.fireEvent(new ShinyApplicationStatusEvent(
(ShinyApplicationParams) params.cast()));
}