new RequestEvent.Listener() {
public void onRequest(JavaScriptObject request, Sender sender,
SendResponse sendResponse) {
if (DataBag.getBooleanProperty(request, "autoOpen")) {
// Open Speed Tracer.
Tab tab = sender.getTab();
monitorTabClickListener.onClicked(tab);
// The Monitor coming alive and calling back should be
// asynchronous. We should be able to stick in the SendResponse
// callback in before the Monitor calls back, and then notify the
// content script after we know the monitor is opened and ready.
BrowserConnectionState browserConnection = browserConnectionMap.get(CHROME_BROWSER_ID);
browserConnection.tabMap.get(tab.getId()).monitorOpenedCallback = sendResponse.cast();
}
}
});
}