Package com.intellij.javascript.karma.debug

Source Code of com.intellij.javascript.karma.debug.DebuggableWebBrowser

package com.intellij.javascript.karma.debug;

import com.intellij.ide.browsers.WebBrowser;
import com.jetbrains.javascript.debugger.JavaScriptDebugEngine;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public class DebuggableWebBrowser {
  private final JavaScriptDebugEngine myDebugEngine;
  private final WebBrowser myWebBrowser;

  private DebuggableWebBrowser(@NotNull JavaScriptDebugEngine debugEngine, @NotNull WebBrowser webBrowser) {
    myDebugEngine = debugEngine;
    myWebBrowser = webBrowser;
  }

  @NotNull
  public JavaScriptDebugEngine getDebugEngine() {
    return myDebugEngine;
  }

  @NotNull
  public WebBrowser getWebBrowser() {
    return myWebBrowser;
  }

  @Nullable
  public static DebuggableWebBrowser create(@NotNull WebBrowser browser) {
    JavaScriptDebugEngine debugEngine = JavaScriptDebugEngine.findByBrowser(browser);
    return debugEngine != null ? new DebuggableWebBrowser(debugEngine, browser) : null;
  }
}
TOP

Related Classes of com.intellij.javascript.karma.debug.DebuggableWebBrowser

TOP
Copyright © 2018 www.massapi.com. 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.