Package com.opera.core.systems.scope.protos.EcmascriptProtos

Examples of com.opera.core.systems.scope.protos.EcmascriptProtos.Runtime


  public void init() {
    updateRuntime();
  }

  public boolean updateRuntime() {
    Runtime activeRuntime = findRuntime();

    if (activeRuntime != null) {
      setRuntime(activeRuntime);
      return true;
    }
View Full Code Here


  /**
   * Updates the runtimes list to most recent version.
   */
  private void buildRuntimeTree() {
    updateRuntime();
    Runtime rootInfo = findRuntime();
    root = new RuntimeNode();
    root.setFrameName("_top");
    root.setRuntimeID(rootInfo.getRuntimeID());

    List<Runtime> runtimeInfos = Lists.newArrayList(runtimesList.values());
    runtimeInfos.remove(rootInfo);

    for (Runtime runtimeInfo : runtimeInfos) {
View Full Code Here

    if (node == null) {
      throw new NoSuchFrameException("Invalid frame index " + index);
    }

    Runtime info = runtimesList.get(node.getRuntimeID());
    currentFramePath = info.getHtmlFramePath();
    setRuntime(info);
  }
View Full Code Here

    if (curr == null) {
      throw new NoSuchFrameException("Invalid frame name " + frameName);
    }

    Runtime info = runtimesList.get(curr.getRuntimeID());

    // We should only find frames underneath the current one.
    if (!info.getHtmlFramePath().startsWith(currentFramePath)) {
      throw new NoSuchFrameException("No such frame " + frameName + " in " + currentFramePath);
    }

    currentFramePath = info.getHtmlFramePath();
    setRuntime(info);
  }
View Full Code Here

  public String executeJavascript(String using, Integer windowId) {
    // TODO: Workaround for frame issues when executing in a specific window
    String tmp = currentFramePath;
    currentFramePath = "_top";
    Runtime runtime = findRuntime(windowId);
    currentFramePath = tmp;

    // speed dial doesn't have a runtime
    if (runtime == null) {
      return "";
    }
    return (String) executeScript(using, true, runtime.getRuntimeID());
  }
View Full Code Here

    }
  }

  private void processNewRuntimes() {
    while (!runtimesQueue.isEmpty()) {
      Runtime runtime = getRuntime(runtimesQueue.poll());
      if (runtime != null) {
        if (runtime.getHtmlFramePath().equals("_top")
            && windowManager.getActiveWindowId() == runtime.getWindowID()) {
          setRuntime(runtime);
        }
        runtimesList.putIfAbsent(runtime.getRuntimeID(), runtime);
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.opera.core.systems.scope.protos.EcmascriptProtos.Runtime

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.