Package org.chromium.sdk

Examples of org.chromium.sdk.JsFunction


      @Override
      public RelayOk evaluateGet(EvaluateCallback callback, SyncCallback syncCallback) {
        WipContextBuilder.GlobalEvaluateContext evaluateContext =
            new WipContextBuilder.GlobalEvaluateContext(valueLoader);

        JsFunction getterFunction = getGetterAsFunction();
        if (getterFunction == null) {
          throw new RuntimeException("Getter is not a function");
        }

        Map<String, SerializableValue> context = new HashMap<String, SerializableValue>(2);
View Full Code Here


   * Returns 'function scopes' node packed as a list or an empty list if the input is not
   * a function. The 'function scopes' node holds actual scope variables as its children.
   * @return list of 0 or 1 elements
   */
  private List<Variable> calculateFunctionScopesVariable(JsObject jsObject) {
    JsFunction asFunction = jsObject.asFunction();
    if (asFunction == null) {
      return null;
    }
    FunctionScopeExtension functionScopeExtension =
        getConnectedData().getJavascriptVm().getFunctionScopeExtension();
View Full Code Here

      @Override
      public RelayOk evaluateGet(EvaluateCallback callback, SyncCallback syncCallback) {
        WipContextBuilder.GlobalEvaluateContext evaluateContext =
            new WipContextBuilder.GlobalEvaluateContext(valueLoader);

        JsFunction getterFunction = getGetterAsFunction();
        if (getterFunction == null) {
          throw new RuntimeException("Getter is not a function");
        }

        Map<String, SerializableValue> context = new HashMap<String, SerializableValue>(2);
View Full Code Here

    }
    final ConnectedTargetData connectedTargetData = wrapper.getConnectedTargetData();
    if (connectedTargetData == null) {
      return null;
    }
    final JsFunction jsFunction = getJsFunctionFromElement(wrapper);
    if (jsFunction == null) {
      return null;
    }
    return new Runnable() {

      public void run() {
        // This works in UI thread.
        IWorkbench workbench = PlatformUI.getWorkbench();
        final IWorkbenchWindow activeWorkbenchWindow = workbench.getActiveWorkbenchWindow();

        ISourceLocator sourceLocator =
            connectedTargetData.getDebugTarget().getLaunch().getSourceLocator();
        if (sourceLocator instanceof ISourceLookupDirector == false) {
          return;
        }
        ISourceLookupDirector director = (ISourceLookupDirector) sourceLocator;


        SourcePositionMap positionMap = connectedTargetData.getSourcePositionMap();
        SourcePosition userPosition;
        {
          // First get VM positions.
          Script script = jsFunction.getScript();
          if (script == null) {
            return;
          }
          TextStreamPosition functionOpenParenPosition = jsFunction.getOpenParenPosition();
          if (functionOpenParenPosition == null) {
            return;
          }

          // Convert them to user positions.
View Full Code Here

   * Returns 'function scopes' node packed as a list or an empty list if the input is not
   * a function. The 'function scopes' node holds actual scope variables as its children.
   * @return list of 0 or 1 elements
   */
  private List<Variable> calculateFunctionScopesVariable(JsObject jsObject) {
    JsFunction asFunction = jsObject.asFunction();
    if (asFunction == null) {
      return null;
    }
    FunctionScopeExtension functionScopeExtension =
        getConnectedData().getJavascriptVm().getFunctionScopeExtension();
View Full Code Here

      @Override
      public RelayOk evaluateGet(EvaluateCallback callback, SyncCallback syncCallback) {
        WipContextBuilder.GlobalEvaluateContext evaluateContext =
            new WipContextBuilder.GlobalEvaluateContext(valueLoader);

        JsFunction getterFunction = getGetterAsFunction();
        if (getterFunction == null) {
          throw new RuntimeException("Getter is not a function");
        }

        Map<String, String> context = new HashMap<String, String>(2);
        context.put(GETTER_VAR_NAME, getterFunction.getRefId());
        context.put(OBJECT_VAR_NAME, hostObjectRefId);
        final QualifiedNameBuilder pseudoPropertyNameBuilder =
            createPseudoPropertyNameBuilder(qualifiedNameBuilder, "value");
        ValueNameBuilder valueNameBuilder = new ValueNameBuilder() {
          @Override
View Full Code Here

      @Override
      public RelayOk evaluateGet(EvaluateCallback callback, SyncCallback syncCallback) {
        WipContextBuilder.GlobalEvaluateContext evaluateContext =
            new WipContextBuilder.GlobalEvaluateContext(valueLoader);

        JsFunction getterFunction = getGetterAsFunction();
        if (getterFunction == null) {
          throw new RuntimeException("Getter is not a function");
        }

        Map<String, String> context = new HashMap<String, String>(2);
        context.put(GETTER_VAR_NAME, getterFunction.getRefId());
        context.put(OBJECT_VAR_NAME, hostObjectRefId);
        final QualifiedNameBuilder pseudoPropertyNameBuilder =
            createPseudoPropertyNameBuilder(qualifiedNameBuilder, "value");
        ValueNameBuilder valueNameBuilder = new ValueNameBuilder() {
          @Override
View Full Code Here

TOP

Related Classes of org.chromium.sdk.JsFunction

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.