Package org.chromium.sdk

Examples of org.chromium.sdk.JsValue$ReloadBiggerCallback


    private DeferredData load(ValueLoaderImpl valueLoader, int cacheState)
        throws MethodIsBlockingException {
      ObjectValueHandle scopeObject = loadScopeObject(valueLoader);
      ValueMirror mirror = valueLoader.addDataToMap(scopeObject.getSuper());
      JsValue jsValue = JsVariableImpl.createValue(valueLoader, mirror, "<with object>");
      return new DeferredData(jsValue, cacheState);
    }
View Full Code Here


    final Value uiValue = wrapper.getValue();
    if (uiValue == null) {
      // Probably hasn't got result yet.
      return null;
    }
    JsValue jsValue = uiValue.getJsValue();
    if (jsValue == null) {
      return null;
    }
    JsObject jsObject = jsValue.asObject();
    if (jsObject == null) {
      return null;
    }
    return jsObject.asFunction();
  }
View Full Code Here

  public void reloadBiggerValue(final ReloadValueCallback callback) {
    List<JsValue> jsValueList = new ArrayList<JsValue>(2);
    if (this.value.isTruncated()) {
      jsValueList.add(this.value);
    }
    JsValue detailValue = detailBuilder.getCurrentDetailWrapper().getJsValue();
    if (detailValue != null && detailValue.isTruncated() && !jsValueList.contains(detailValue)) {
      jsValueList.add(detailValue);
    }

    ReloadBiggerValueProcess process = new ReloadBiggerValueProcess(callback);
    process.start(jsValueList);
View Full Code Here

    };
  }

  static JsVariable wrapExceptionValue(RemoteObjectValue valueData,
      WipValueBuilder valueBuilder) {
    JsValue exceptionValue = valueBuilder.wrap(valueData, null);

    final JsVariable property =
        WipValueBuilder.createVariable(exceptionValue, EVALUATE_EXCEPTION_INNER_NAME);

    JsObject wrapperValue = new JsObject() {
View Full Code Here

          exceptionRemoteObject =
              WipParserAccess.get().parseRemoteObjectValue(additionalDataObject);
        } catch (JsonProtocolParseException e) {
          throw new RuntimeException("Failed to parse exception data", e);
        }
        JsValue exceptionValue =
            valueLoader.getValueBuilder().wrap(exceptionRemoteObject, null);
        exceptionData = new ExceptionDataImpl(exceptionValue);
      } else {
        exceptionData = null;
      }
View Full Code Here

  }

  public JsObjectProperty createObjectProperty(final PropertyDescriptorValue propertyDescriptor,
      final String hostObjectRefId, ValueNameBuilder nameBuilder) {
    final QualifiedNameBuilder qualifiedNameBuilder = nameBuilder.getQualifiedNameBuilder();
    JsValue jsValue = wrap(propertyDescriptor.value(), qualifiedNameBuilder);

    final JsValue getter = wrapPropertyDescriptorFunction(propertyDescriptor.get(),
        qualifiedNameBuilder, "getter");

    final JsValue setter = wrapPropertyDescriptorFunction(propertyDescriptor.set(),
        qualifiedNameBuilder, "setter");

    return new ObjectPropertyBase(jsValue, nameBuilder) {
      @Override public boolean isWritable() {
        return propertyDescriptor.writable() == Boolean.TRUE;
View Full Code Here

    if (nameBuilder == null) {
      qualifiedNameBuilder = null;
    } else {
      qualifiedNameBuilder = nameBuilder.getQualifiedNameBuilder();
    }
    JsValue jsValue = wrap(valueData, qualifiedNameBuilder);
    return createVariable(jsValue, nameBuilder);
  }
View Full Code Here

    @Override
    JsValue build(RemoteObjectValue valueData, WipValueLoader valueLoader,
        QualifiedNameBuilder qualifiedNameBuilder) {
      final String valueString = getValueString(valueData);
      return new JsValue() {
        @Override public Type getType() {
          return jsValueType;
        }
        @Override public String getValueString() {
          return valueString;
View Full Code Here

      }

      private ArrayProperties buildArrayProperties() throws MethodIsBlockingException {
        ObjectProperties loadedProperties = getLoadedProperties();
        final TreeMap<Integer, JsVariable> map = new TreeMap<Integer, JsVariable>();
        JsValue lengthValue = null;
        for (JsVariable variable : loadedProperties.properties()) {
          String name = variable.getName();
          if (WipExpressionBuilder.ALL_DIGITS.matcher(name).matches()) {
            Integer number = Integer.valueOf(name);
            map.put(number, variable);
          } else if ("length".equals(name)) {
            lengthValue = variable.getValue();
          }
        }
        int length;
        try {
          length = Integer.parseInt(lengthValue.getValueString());
        } catch (NumberFormatException e) {
          length = -1;
        }
        return new ArrayProperties(length, map);
      }
View Full Code Here

      }

      private ArrayProperties buildArrayProperties() throws MethodIsBlockingException {
        ObjectProperties loadedProperties = getLoadedProperties();
        final TreeMap<Integer, JsVariable> map = new TreeMap<Integer, JsVariable>();
        JsValue lengthValue = null;
        for (JsVariable variable : loadedProperties.properties()) {
          String name = variable.getName();
          if (WipExpressionBuilder.ALL_DIGITS.matcher(name).matches()) {
            Integer number = Integer.valueOf(name);
            map.put(number, variable);
          } else if ("length".equals(name)) {
            lengthValue = variable.getValue();
          }
        }
        int length;
        try {
          length = Integer.parseInt(lengthValue.getValueString());
        } catch (NumberFormatException e) {
          length = -1;
        }
        return new ArrayProperties(length, map);
      }
View Full Code Here

TOP

Related Classes of org.chromium.sdk.JsValue$ReloadBiggerCallback

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.