Package org.chromium.sdk.util

Examples of org.chromium.sdk.util.RelaySyncCallback$Guard


  public RelayOk evaluateAsync(String expression, ValueNameBuilder valueNameBuidler,
      Map<String, String> additionalContext,
      WipValueLoader destinationValueLoader, EvaluateCommandHandler<?> evaluateCommandHandler,
      final JsEvaluateContext.EvaluateCallback callback, SyncCallback syncCallback) {

    RelaySyncCallback relaySyncCallback = new RelaySyncCallback(syncCallback);

    final EvaluateSession evaluateSession = new EvaluateSession(expression, valueNameBuidler,
        additionalContext, destinationValueLoader, evaluateCommandHandler);

    final RelaySyncCallback.Guard guard = relaySyncCallback.newGuard();

    GenericCallback<Void> postEnsureCallback = new GenericCallback<Void>() {
          @Override
          public void success(Void value) {
            RelayOk relayOk = evaluateSession.run(callback, guard.getRelay());
View Full Code Here


  // TODO: make sure we do not return those scripts that are reported compiled but not loaded yet.
  RelayOk getScripts(final GenericCallback<Collection<Script>> callback,
      SyncCallback syncCallback) {

    // Async command chain here, wrap syncCallback to guaranteed calling.
    RelaySyncCallback relay = new RelaySyncCallback(syncCallback);

    // Guard for the step one.
    final RelaySyncCallback.Guard guardOne = relay.newGuard();

    // Chain commands are in the reverse order.

    // Wait for script pre-load operation and return scripts.
    final AsyncFuture.Callback<Void> futureCallback = new AsyncFuture.Callback<Void>() {
View Full Code Here

      }
    }

    // Start a chain of asynchronous operations.
    // Make sure we call this sync callback sooner or later.
    RelaySyncCallback relay =  new RelaySyncCallback(syncCallback);

    return loadNextScript(scripts, result, callback, relay);
  }
View Full Code Here

      };

      RelayOk restart(final GenericCallback<Boolean> callback,
          SyncCallback syncCallback) {

        RelaySyncCallback relaySyncCallback = new RelaySyncCallback(syncCallback);

        final RelaySyncCallback.Guard guard = relaySyncCallback.newGuard();

        RestartFrameParams params = new RestartFrameParams(id);
        WipCommandProcessor commandProcessor = valueLoader.getTabImpl().getCommandProcessor();
        GenericCallback<RestartFrameData> commandCallback =
            new GenericCallback<RestartFrameData>() {
View Full Code Here

TOP

Related Classes of org.chromium.sdk.util.RelaySyncCallback$Guard

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.