Package org.chromium.sdk.internal.v8native

Examples of org.chromium.sdk.internal.v8native.InternalContext$UserContext


  private UserContext createUserContext() {
    return createUserContext( fnr );
  }

  public static UserContext createUserContext( String fnr ) {
    UserContext uc = new UserContext();
    uc.setUserid( fnr );
    return uc;
  }
View Full Code Here


    DataWithRef dataWithRef = DataWithRef.fromSomeRef(someRef);
    SubpropertiesMirror.ListBased subpropertiesMirror = new SubpropertiesMirror.ListBased(
        new PropertyReference("x", dataWithRef),
        new PropertyReference("y", dataWithRef)
    );
    InternalContext internalContext = ContextBuilder.getInternalContextForTests(debugContext);
    eventMirror = internalContext.getValueLoader().addDataToMap(Long.valueOf(11),
        Type.TYPE_OBJECT, null, null,
        subpropertiesMirror);

    FrameObject frameObject;
    {
View Full Code Here

    DebugContext debugContext = listener.getDebugContext();

    String propertyRefText = "{'ref':" + FixtureChromeStub.getNumber3Ref() +
        ",'type':'number','value':3,'text':'3'}";

    InternalContext internalContext = ContextBuilder.getInternalContextForTests(debugContext);
    String valueHandleJsonText = (
            "{'protoObject':{'ref':55516,'className':'Array','type':'object'}," +
            "'text':'#<an Array>'," +
            "'handle':5559,'" +
            "constructorFunction':{'ref':55515,'inferredName':''," +
            "'name':'Array','type':'function'}," +
            "'prototypeObject':{'ref':5553,'type':'undefined'}," +
            "'className':'Array','properties':[{'name':'length'," +
            "'value':{'ref':55517,'value':2,'type':'number'}}," +
            "{'name':1,'value':" + propertyRefText + "}," +
            "{'name':3,'value':"+ propertyRefText +"}],'type':'object'}"
        ).replace('\'', '"');
    JSONObject valueHandleJson = (JSONObject) JSONValue.parse(valueHandleJsonText);
    ValueHandle valueHandle =
        V8ProtocolParserAccess.get().parseValueHandle(valueHandleJson);
    arrayMirror = internalContext.getValueLoader().addDataToMap(valueHandle);

    String proptoHandleJsonText = (
            "{'text':'#<an Object>', 'handle':55516,'className':'Object','type':'object'}"
         ).replace('\'', '"');
    JSONObject protoHandleJson = (JSONObject) JSONValue.parse(proptoHandleJsonText);
    ValueHandle protoHandle = V8ProtocolParserAccess.get().parseValueHandle(protoHandleJson);
    internalContext.getValueLoader().addDataToMap(protoHandle);



    FrameObject frameObject;
    {
View Full Code Here

      ContextBuilder contextBuilder = debugSession.getContextBuilder();

      ContextBuilder.ExpectingBreakEventStep step1 = contextBuilder.buildNewContext();

      InternalContext internalContext = step1.getInternalContext();

      BreakEventBody breakEventBody;
      try {
        breakEventBody = eventMessage.body().asBreakEventBody();
      } catch (JsonProtocolParseException e) {
View Full Code Here

    }
  }

  public void processNextStep(ContextBuilder.ExpectingBacktraceStep step2) {
    BacktraceProcessor backtraceProcessor = new BacktraceProcessor(step2);
    InternalContext internalContext = step2.getInternalContext();

    DebuggerMessage message = DebuggerMessageFactory.backtrace(null, null, true);
    try {
      // Command is not immediate because we are supposed to be suspended.
      internalContext.sendV8CommandAsync(message, false, backtraceProcessor, null);
    } catch (ContextDismissedCheckedException e) {
      // Can't happen -- we are just creating context, it couldn't have become invalid
      throw new RuntimeException(e);
    }
  }
View Full Code Here

      Registration registration = producer.getRegistrationOrFailIfInvalid(getPortletDescription.getRegistrationContext());

      PortletContext portletContext = getPortletDescription.getPortletContext();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(portletContext, PORTLET_CONTEXT, GET_PORTLET_DESCRIPTION);

      UserContext userContext = getPortletDescription.getUserContext();
      checkUserAuthorization(userContext);

      // RegistrationLocal.setRegistration is called further down the invocation in ServiceDescriptionHandler.getPortletDescription
      final List<String> desiredLocales = WSRPUtils.replaceByEmptyListIfNeeded(getPortletDescription.getDesiredLocales());
      PortletDescription description = producer.getPortletDescription(portletContext, desiredLocales, registration);
View Full Code Here

      try
      {
         Registration registration = producer.getRegistrationOrFailIfInvalid(getPortletPropertyDescription.getRegistrationContext());
         RegistrationLocal.setRegistration(registration);

         UserContext userContext = getPortletPropertyDescription.getUserContext();
         checkUserAuthorization(userContext);

         Portlet portlet = getPortletFrom(portletContext, registration);
         PortletInfo info = portlet.getInfo();
         PreferencesInfo prefsInfo = info.getPreferences();
View Full Code Here

      PortletContext portletContext = clonePortlet.getPortletContext();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(portletContext, "PortletContext", "ClonePortlet");

      Registration registration = producer.getRegistrationOrFailIfInvalid(clonePortlet.getRegistrationContext());

      UserContext userContext = clonePortlet.getUserContext();
      checkUserAuthorization(userContext);

      org.gatein.pc.api.PortletContext portalPC = WSRPUtils.convertToPortalPortletContext(portletContext);
      try
      {
View Full Code Here

         toRegistationContext = copyPortlets.getFromRegistrationContext();
      }

      Registration toRegistration = producer.getRegistrationOrFailIfInvalid(toRegistationContext);

      UserContext fromUserContext = copyPortlets.getFromUserContext();
      checkUserAuthorization(fromUserContext);
      UserContext toUserContext = copyPortlets.getToUserContext();
      checkUserAuthorization(toUserContext);

      try
      {
         RegistrationLocal.setRegistration(fromRegistration);
View Full Code Here

      PortletContext portletContext = getPortletProperties.getPortletContext();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(portletContext, PORTLET_CONTEXT, GET_PORTLET_PROPERTIES);

      Registration registration = producer.getRegistrationOrFailIfInvalid(getPortletProperties.getRegistrationContext());

      UserContext userContext = getPortletProperties.getUserContext();
      checkUserAuthorization(userContext);

      List<String> names = getPortletProperties.getNames();
      names = WSRPUtils.replaceByEmptyListIfNeeded(names);
View Full Code Here

TOP

Related Classes of org.chromium.sdk.internal.v8native.InternalContext$UserContext

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.