Search in sources :

Example 1 with UncheckedCallable

use of com.facebook.stetho.common.UncheckedCallable in project stetho by facebook.

the class DOM method getDocument.

@ChromeDevtoolsMethod
public JsonRpcResult getDocument(JsonRpcPeer peer, JSONObject params) {
    final GetDocumentResponse result = new GetDocumentResponse();
    result.root = mDocument.postAndWait(new UncheckedCallable<Node>() {

        @Override
        public Node call() {
            Object element = mDocument.getRootElement();
            return createNodeForElement(element, mDocument.getDocumentView(), null);
        }
    });
    return result;
}
Also used : UncheckedCallable(com.facebook.stetho.common.UncheckedCallable) JSONObject(org.json.JSONObject) ChromeDevtoolsMethod(com.facebook.stetho.inspector.protocol.ChromeDevtoolsMethod)

Aggregations

UncheckedCallable (com.facebook.stetho.common.UncheckedCallable)1 ChromeDevtoolsMethod (com.facebook.stetho.inspector.protocol.ChromeDevtoolsMethod)1 JSONObject (org.json.JSONObject)1