Package org.chromium.sdk

Examples of org.chromium.sdk.RelayOk


      boolean ownProperties = true;
      request = new GetPropertiesParams(objectId, ownProperties);
    }

    CallbackSemaphore callbackSemaphore = new CallbackSemaphore();
    RelayOk relayOk =
        tabImpl.getCommandProcessor().send(request, callback, callbackSemaphore);
    callbackSemaphore.acquireDefault(relayOk);

    return result[0];
  }
View Full Code Here


    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());
            guard.discharge(relayOk);
          }

          @Override
          public void failure(Exception exception) {
View Full Code Here

    // Start everything in dispatch thread (otherwise user may be called from this thread).
    Runnable mainRunnable = new Runnable() {
      @Override
      public void run() {
        RelayOk relayOk =
            scriptsPreloaded.getAsync(futureCallback, guardOne.getRelay().getUserSyncCallback());
        guardOne.discharge(relayOk);
      }
    };
View Full Code Here

      final Map<String, WipScriptImpl> result, final ScriptSourceLoadCallback callback,
      final RelaySyncCallback relay) {
    final ScriptData data = scripts.poll();
    if (data == null) {
      // Terminate the chain of asynchronous loads and pass a result to the callback.
      RelayOk relayOk;
      if (callback != null) {
        callback.done(result);
      }
      return relay.finish();
    }

    // Create a guard for the case that we fail before issuing next #loadNextScript() call.
    final RelaySyncCallback.Guard guard = relay.newGuard();

    AsyncFuture.Callback<Boolean> futureCallback = new AsyncFuture.Callback<Boolean>() {
      @Override
      public void done(Boolean res) {
        RelayOk relayOk = loadNextScript(scripts, result, callback, relay);
        // We successfully relayed responsibility for operationDestructable to next async call,
        // discharge guard.
        guard.discharge(relayOk);
      }
    };
View Full Code Here

                callback.failure(e);
              }
              // Todo: consider throwing e.
              return;
            }
            RelayOk relayOk = run(commandProcessor, processResult, callback, guard.getRelay());
            guard.discharge(relayOk);
          }
          @Override
          public void failure(String message) {
            if (callback != null) {
              callback.failure(sendStep.processFailure(new Exception(message)));
            }
          }
        };

        return commandProcessor.send(sendStep.getParams(), sendCallback, guard.asSyncCallback());
      }

      @Override
      public <RESPONSE> RelayOk visitSend(final SendStepWithResponse<RESPONSE, RES> sendStep) {
        final RelaySyncCallback.Guard guard = relaySyncCallback.newGuard();

        GenericCallback<RESPONSE> sendCallback = new GenericCallback<RESPONSE>() {
          @Override
          public void success(RESPONSE response) {
            Step<RES> processResult;
            try {
              processResult = sendStep.processResponse(response);
            } catch (ProcessException e) {
              if (callback != null) {
                callback.failure(e);
              }
              // Todo: consider throwing e.
              return;
            }
            RelayOk relayOk = run(commandProcessor, processResult, callback, guard.getRelay());
            guard.discharge(relayOk);
          }

          @Override
          public void failure(Exception exception) {
View Full Code Here

          callback.failure(exception.getMessage());
        }
      };
    }

    RelayOk relayOk = scriptManager.getScripts(innerCallback, callbackSemaphore);

    callbackSemaphore.acquireDefault(relayOk);
  }
View Full Code Here

        WipCommandProcessor commandProcessor = valueLoader.getTabImpl().getCommandProcessor();
        GenericCallback<RestartFrameData> commandCallback =
            new GenericCallback<RestartFrameData>() {
          @Override
          public void success(RestartFrameData value) {
            RelayOk relayOk = handleRestartFrameData(value, callback, guard.getRelay());
            guard.discharge(relayOk);
          }

          @Override
          public void failure(Exception exception) {
View Full Code Here

            Boolean.TRUE) {
          final RelaySyncCallback.Guard guard = relay.newGuard();
          final ContinueCallback continueCallback = new ContinueCallback() {
            @Override
            public void success() {
              RelayOk relayOk = finishSuccessfulRestart(true, callback, guard.getRelay());
              guard.discharge(relayOk);
            }

            @Override
            public void failure(String errorMessage) {
View Full Code Here

        public void onDone(IStatus status) {
          callbackSemaphore.callbackDone(null);
        }
      };
      workspaceBridge.getBreakpointSynchronizer().syncBreakpoints(direction, callback);
      RelayOk relayOk = SYNCHRONIZER_MUST_RELAY_OK;
      checkIsCanceled(monitor);

      BreakpointsWorkPlan.ANALYZE.finish(monitor);

      BreakpointsWorkPlan.REMOTE_CHANGES.start(monitor);
View Full Code Here

            "Failed to evaluate property value: " + errorMessage);
      }
    }
    Callback callback = new Callback();
    CallbackSemaphore callbackSemaphore = new CallbackSemaphore();
    RelayOk relayOk = property.evaluateGet(callback, callbackSemaphore);
    callbackSemaphore.acquireDefault(relayOk);
    return callback.result;
  }
View Full Code Here

TOP

Related Classes of org.chromium.sdk.RelayOk

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.