List of usage examples for com.google.gwt.chrome.crx.client Debugger sendRequest
public native static void sendRequest(int tabId, String method, JavaScriptObject params, SendRequestCallback callback) ;
From source file:com.google.speedtracer.client.model.ChromeDebuggerDataInstance.java
License:Apache License
private static void startTimeline(final int tabId, final Proxy proxy) { Debugger.sendRequest(tabId, "Timeline.start", createStartTimelineParams(tabId), new Debugger.SendRequestCallback() { public void onResponse(JavaScriptObject result) { if (result == null) { // Starting failed. Chrome.getExtension().getBackgroundPage().getConsole() .log("Error starting timeline for tab: " + tabId); }/*from w ww. ja v a2 s .c o m*/ proxy.onTimelineProfilerStarted(); } }); }
From source file:com.google.speedtracer.client.model.ChromeDebuggerDataInstance.java
License:Apache License
private static void startNetwork(final int tabId, final Proxy proxy) { Debugger.sendRequest(tabId, "Network.enable", createStartNetworkParams(tabId), new Debugger.SendRequestCallback() { public void onResponse(JavaScriptObject result) { if (result == null) { // Starting failed. Chrome.getExtension().getBackgroundPage().getConsole() .log("Error starting network tracing for tab: " + tabId); }/*from w w w . j a v a 2 s . c o m*/ proxy.onTimelineProfilerStarted(); } }); }
From source file:com.google.speedtracer.client.model.ChromeDebuggerDataInstance.java
License:Apache License
private static void startPage(final int tabId, final Proxy proxy) { Debugger.sendRequest(tabId, "Page.enable", createStartPageParams(tabId), new Debugger.SendRequestCallback() { public void onResponse(JavaScriptObject result) { if (result == null) { // Starting failed. Chrome.getExtension().getBackgroundPage().getConsole() .log("Error starting page events for tab: " + tabId); }/*from w w w . j ava2s.c om*/ proxy.onTimelineProfilerStarted(); } }); }