engine-gecko15-3.3

16:35:39.034 INFO  jd.cli.Main - Decompiling engine-gecko15-3.3.jar
package com.teamdev.jxbrowser.gecko15;

import com.teamdev.jxbrowser.gecko15.dom.DomProxyFactory;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDOMDocument;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDOMWindow;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIWebBrowser;
import java.util.concurrent.atomic.AtomicReference;
import org.w3c.dom.Document;

class ActiveWebBrowserSupport$g
  implements Runnable
{
  ActiveWebBrowserSupport$g(ActiveWebBrowserSupport paramActiveWebBrowserSupport, AtomicReference paramAtomicReference) {}
  
  public void run()
  {
    nsIWebBrowser localnsIWebBrowser = b.getNsIWebBrowser();
    nsIDOMWindow localnsIDOMWindow = localnsIWebBrowser.getContentDOMWindow();
    nsIDOMDocument localnsIDOMDocument = localnsIDOMWindow.getDocument();
    a.set((Document)DomProxyFactory.createDomObjectProxy(localnsIDOMDocument));
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.ActiveWebBrowserSupport.g
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

import java.util.concurrent.atomic.AtomicReference;

class ActiveWebBrowserSupport$f
  implements Runnable
{
  ActiveWebBrowserSupport$f(ActiveWebBrowserSupport paramActiveWebBrowserSupport, AtomicReference paramAtomicReference, String paramString) {}
  
  public void run()
  {
    a.set(ActiveWebBrowserSupport.a(c, b));
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.ActiveWebBrowserSupport.f
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

import com.teamdev.jxbrowser.gecko15.xpcom.ChromeContainerWindow;
import com.teamdev.jxbrowser.gecko15.xpcom.XPCOM;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDocShell;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIInterfaceRequestor;

class ActiveWebBrowserSupport$c
  implements Runnable
{
  ActiveWebBrowserSupport$c(ActiveWebBrowserSupport paramActiveWebBrowserSupport, BrowserPreferences paramBrowserPreferences) {}
  
  public void run()
  {
    nsIInterfaceRequestor localnsIInterfaceRequestor = (nsIInterfaceRequestor)XPCOM.queryInterface(ActiveWebBrowserSupport.a(b).getWebBrowser(), nsIInterfaceRequestor.class);
    nsIDocShell localnsIDocShell = (nsIDocShell)localnsIInterfaceRequestor.getInterface("{6f60ac96-fa2c-41a5-92b4-29aaadbd7a7b}");
    localnsIDocShell.setAllowAuth(a.isAllowAuthentication());
    localnsIDocShell.setAllowImages(a.isAllowImages());
    localnsIDocShell.setAllowJavascript(a.isAllowJavascript());
    localnsIDocShell.setAllowMetaRedirects(a.isAllowMetaRedirects());
    localnsIDocShell.setAllowPlugins(a.isAllowPlugins());
    localnsIDocShell.setAllowSubframes(a.isAllowSubFrames());
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.ActiveWebBrowserSupport.c
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

import com.teamdev.jxbrowser.gecko15.xpcom.ChromeContainerWindow;
import com.teamdev.jxbrowser.gecko15.xpcom.XPCOM;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDocShell;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIInterfaceRequestor;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIWebBrowser;

class ActiveWebBrowserSupport$b
  implements Runnable
{
  ActiveWebBrowserSupport$b(ActiveWebBrowserSupport paramActiveWebBrowserSupport, BrowserPreferences paramBrowserPreferences) {}
  
  public void run()
  {
    nsIWebBrowser localnsIWebBrowser = ActiveWebBrowserSupport.a(b).getWebBrowser();
    nsIInterfaceRequestor localnsIInterfaceRequestor = (nsIInterfaceRequestor)XPCOM.queryInterface(localnsIWebBrowser, nsIInterfaceRequestor.class);
    nsIDocShell localnsIDocShell = (nsIDocShell)localnsIInterfaceRequestor.getInterface("{6f60ac96-fa2c-41a5-92b4-29aaadbd7a7b}");
    a.setAllowAuthentication(localnsIDocShell.getAllowAuth());
    a.setAllowImages(localnsIDocShell.getAllowImages());
    a.setAllowJavascript(localnsIDocShell.getAllowJavascript());
    a.setAllowMetaRedirects(localnsIDocShell.getAllowMetaRedirects());
    a.setAllowPlugins(localnsIDocShell.getAllowPlugins());
    a.setAllowSubFrames(localnsIDocShell.getAllowSubframes());
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.ActiveWebBrowserSupport.b
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

import com.teamdev.jxbrowser.gecko15.xpcom.XPCOM;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDocShell;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIInputStream;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIInterfaceRequestor;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsISupports;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIURI;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIWebBrowserStream;
import com.teamdev.jxbrowser.gecko15.xpcom.util.StringInputStreamFactory;
import com.teamdev.jxbrowser.gecko15.xpcom.util.URIFactory;

class ActiveWebBrowserSupport$e
  implements Runnable
{
  ActiveWebBrowserSupport$e(ActiveWebBrowserSupport paramActiveWebBrowserSupport, String paramString1, String paramString2, String paramString3, String paramString4) {}
  
  public void run()
  {
    Object localObject1;
    Object localObject2;
    Object localObject3;
    if (a == null)
    {
      localObject1 = e.getNsIWebBrowser();
      localObject2 = (nsIInterfaceRequestor)XPCOM.queryInterface((nsISupports)localObject1, nsIInterfaceRequestor.class);
      localObject3 = (nsIDocShell)((nsIInterfaceRequestor)localObject2).getInterface("{6f60ac96-fa2c-41a5-92b4-29aaadbd7a7b}");
      nsIInputStream localnsIInputStream = StringInputStreamFactory.newInputStream(b);
      ((nsIDocShell)localObject3).loadStream(localnsIInputStream, null, c, d, null);
    }
    else
    {
      localObject1 = URIFactory.newURI(a);
      localObject2 = e.getNsIWebBrowser();
      localObject3 = (nsIWebBrowserStream)XPCOM.queryInterface((nsISupports)localObject2, nsIWebBrowserStream.class);
      ((nsIWebBrowserStream)localObject3).openStream((nsIURI)localObject1, c + ";charset=" + d);
      ((nsIWebBrowserStream)localObject3).appendToStream(b.getBytes(), b.length());
      ((nsIWebBrowserStream)localObject3).closeStream();
    }
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.ActiveWebBrowserSupport.e
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

import com.teamdev.jxbrowser.gecko15.xpcom.XPCOM;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDOMMimeType;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDOMMimeTypeArray;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDOMNavigator;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDOMWindow;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDOMWindowInternal;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIWebBrowser;
import java.util.concurrent.atomic.AtomicBoolean;

class ActiveWebBrowserSupport$d
  implements Runnable
{
  ActiveWebBrowserSupport$d(ActiveWebBrowserSupport paramActiveWebBrowserSupport, String paramString, AtomicBoolean paramAtomicBoolean) {}
  
  public void run()
  {
    nsIDOMWindow localnsIDOMWindow = c.getNsIWebBrowser().getContentDOMWindow();
    nsIDOMWindowInternal localnsIDOMWindowInternal = (nsIDOMWindowInternal)XPCOM.queryInterface(localnsIDOMWindow, nsIDOMWindowInternal.class);
    nsIDOMNavigator localnsIDOMNavigator = localnsIDOMWindowInternal.getNavigator();
    nsIDOMMimeTypeArray localnsIDOMMimeTypeArray = localnsIDOMNavigator.getMimeTypes();
    long l = localnsIDOMMimeTypeArray.getLength();
    for (int i = 0; i < l; i++)
    {
      nsIDOMMimeType localnsIDOMMimeType = localnsIDOMMimeTypeArray.item(i);
      String str = localnsIDOMMimeType.getType();
      if (str.equals(a))
      {
        b.set(true);
        break;
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.ActiveWebBrowserSupport.d
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

import com.teamdev.jxbrowser.gecko15.events.impl.nsIWebProgressAdapter;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIRequest;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIWebProgress;
import com.teamdev.jxbrowser.gecko15.xpcom.util.FlagUtil;
import java.util.concurrent.CountDownLatch;

class ActiveWebBrowserSupport$a$a
  extends nsIWebProgressAdapter
{
  ActiveWebBrowserSupport$a$a(ActiveWebBrowserSupport.a parama) {}
  
  public void onStateChange(nsIWebProgress paramnsIWebProgress, nsIRequest paramnsIRequest, long paramLong1, long paramLong2)
  {
    if (FlagUtil.checkFlag(paramLong1, 262160L)) {
      a.c.countDown();
    }
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.ActiveWebBrowserSupport.a.a
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

import com.teamdev.jxbrowser.gecko15.events.impl.nsIWebProgressAdapter;
import com.teamdev.jxbrowser.gecko15.xpcom.Mozilla;
import com.teamdev.jxbrowser.gecko15.xpcom.XPCOM;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDOMDocument;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDOMWindow;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsILocalFile;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIRequest;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIWebBrowser;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIWebBrowserPersist;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIWebProgress;
import com.teamdev.jxbrowser.gecko15.xpcom.util.FlagUtil;
import java.io.File;
import java.util.concurrent.CountDownLatch;

class ActiveWebBrowserSupport$a
  implements Runnable
{
  ActiveWebBrowserSupport$a(ActiveWebBrowserSupport paramActiveWebBrowserSupport, File paramFile, String paramString, CountDownLatch paramCountDownLatch) {}
  
  public void run()
  {
    nsIWebBrowser localnsIWebBrowser = d.getNsIWebBrowser();
    nsIWebBrowserPersist localnsIWebBrowserPersist = (nsIWebBrowserPersist)XPCOM.queryInterface(localnsIWebBrowser, nsIWebBrowserPersist.class);
    File localFile = new File(a, b);
    nsILocalFile localnsILocalFile1 = Mozilla.NewLocalFile(localFile.getAbsolutePath(), false);
    nsILocalFile localnsILocalFile2 = Mozilla.NewLocalFile(a.getAbsolutePath(), false);
    nsIDOMDocument localnsIDOMDocument = localnsIWebBrowser.getContentDOMWindow().getDocument();
    localnsIWebBrowserPersist.setProgressListener(new a());
    localnsIWebBrowserPersist.saveDocument(localnsIDOMDocument, localnsILocalFile1, localnsILocalFile2, "text/html", 4L, 0L);
  }
  
  class a
    extends nsIWebProgressAdapter
  {
    a() {}
    
    public void onStateChange(nsIWebProgress paramnsIWebProgress, nsIRequest paramnsIRequest, long paramLong1, long paramLong2)
    {
      if (FlagUtil.checkFlag(paramLong1, 262160L)) {
        c.countDown();
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.ActiveWebBrowserSupport.a
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

import com.teamdev.jxbrowser.gecko15.dom.DomProxyFactory;
import com.teamdev.jxbrowser.gecko15.download.DownloadHandler;
import com.teamdev.jxbrowser.gecko15.events.BrowserWindowListener;
import com.teamdev.jxbrowser.gecko15.events.ContextMenuListener;
import com.teamdev.jxbrowser.gecko15.events.DisposeListener;
import com.teamdev.jxbrowser.gecko15.events.RequestListener;
import com.teamdev.jxbrowser.gecko15.events.StatusChangeListener;
import com.teamdev.jxbrowser.gecko15.events.TitleChangeListener;
import com.teamdev.jxbrowser.gecko15.events.impl.nsIWebProgressAdapter;
import com.teamdev.jxbrowser.gecko15.script.JavaScriptExecutor;
import com.teamdev.jxbrowser.gecko15.xpcom.ChromeContainerWindow;
import com.teamdev.jxbrowser.gecko15.xpcom.Mozilla;
import com.teamdev.jxbrowser.gecko15.xpcom.XPCOM;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDOMDocument;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDOMMimeType;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDOMMimeTypeArray;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDOMNavigator;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDOMWindow;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDOMWindowInternal;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDocShell;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDocumentEncoder;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIInputStream;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIInterfaceRequestor;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsILocalFile;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIRequest;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsISupports;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIURI;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIWebBrowser;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIWebBrowserPersist;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIWebBrowserStream;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIWebProgress;
import com.teamdev.jxbrowser.gecko15.xpcom.util.FlagUtil;
import com.teamdev.jxbrowser.gecko15.xpcom.util.StringInputStreamFactory;
import com.teamdev.jxbrowser.gecko15.xpcom.util.URIFactory;
import com.teamdev.jxbrowser.gecko15.xpcom.util.WebPageRenderer;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
import javax.imageio.ImageIO;
import org.w3c.dom.Document;

public class ActiveWebBrowserSupport
  implements WebBrowser
{
  private final WebNavigation a;
  private final JavaScriptExecutor b;
  private final ChromeContainerWindow c;
  private final List<String> d;
  
  public ActiveWebBrowserSupport()
  {
    nsIWebBrowser localnsIWebBrowser = (nsIWebBrowser)XPCOM.createComponent("@mozilla.org/embedding/browser/nsWebBrowser;1", nsIWebBrowser.class);
    c = ChromeContainerWindow.newContainer();
    c.setWebBrowser(localnsIWebBrowser);
    a = new WebNavigation(localnsIWebBrowser);
    b = new JavaScriptExecutor();
    d = new ArrayList();
    d.add("text/html");
    d.add("text/plain");
    d.add("text/xml");
    d.add("application/xml");
    d.add("application/xhtml+xml");
    d.add("image/svg+xml");
    d.add("image/png");
    d.add("image/jpeg");
    d.add("image/gif");
  }
  
  public void addBrowserWindowListener(BrowserWindowListener paramBrowserWindowListener)
  {
    c.addBrowserWindowListener(paramBrowserWindowListener);
  }
  
  public void removeBrowserWindowListener(BrowserWindowListener paramBrowserWindowListener)
  {
    c.removeBrowserWindowListener(paramBrowserWindowListener);
  }
  
  public List<BrowserWindowListener> getBrowserWindowListeners()
  {
    return c.getBrowserWindowListeners();
  }
  
  public void addRequestListener(RequestListener paramRequestListener)
  {
    a.addRequestListener(paramRequestListener);
  }
  
  public void removeRequestListener(RequestListener paramRequestListener)
  {
    a.removeRequestListener(paramRequestListener);
  }
  
  public List<RequestListener> getRequestListeners()
  {
    return a.getRequestListeners();
  }
  
  public void addStatusChangeListener(StatusChangeListener paramStatusChangeListener)
  {
    c.addStatusChangeListener(paramStatusChangeListener);
  }
  
  public void removeStatusChangeListener(StatusChangeListener paramStatusChangeListener)
  {
    c.removeStatusChangeListener(paramStatusChangeListener);
  }
  
  public List<StatusChangeListener> getStatusChangeListeners()
  {
    return c.getStatusChangeListeners();
  }
  
  public void addTitleChangeListener(TitleChangeListener paramTitleChangeListener)
  {
    c.addTitleChangeListener(paramTitleChangeListener);
  }
  
  public void removeTitleChangeListener(TitleChangeListener paramTitleChangeListener)
  {
    c.removeTitleChangeListener(paramTitleChangeListener);
  }
  
  public List<TitleChangeListener> getTitleChangeListeners()
  {
    return c.getTitleChangeListeners();
  }
  
  public void addContextMenuListener(ContextMenuListener paramContextMenuListener)
  {
    c.addContextMenuListener(paramContextMenuListener);
  }
  
  public void removeContextMenuListener(ContextMenuListener paramContextMenuListener)
  {
    c.removeContextMenuListener(paramContextMenuListener);
  }
  
  public List<ContextMenuListener> getContextMenuListeners()
  {
    return c.getContextMenuListeners();
  }
  
  public void dispose()
  {
    c.dispose();
  }
  
  public String evaluateScript(String paramString)
  {
    return b.evaluateScript(paramString, a, getNsIWebBrowser());
  }
  
  public String getDocumentContent()
  {
    return getDocumentContent("text/html");
  }
  
  public Component getComponent()
  {
    return c.getContainerComponent();
  }
  
  public Document getDocument()
  {
    final AtomicReference localAtomicReference = new AtomicReference(null);
    XPCOM.invokeAndWait(new g(localAtomicReference));
    return (Document)localAtomicReference.get();
  }
  
  public String getDocumentContent(final String paramString)
  {
    if ((paramString == null) || (paramString.length() == 0)) {
      throw new IllegalArgumentException("Content type cannot be null or empty string.");
    }
    final AtomicReference localAtomicReference = new AtomicReference("");
    XPCOM.invokeAndWait(new f(localAtomicReference, paramString));
    return (String)localAtomicReference.get();
  }
  
  private String a(String paramString)
  {
    nsIWebBrowser localnsIWebBrowser = getNsIWebBrowser();
    nsIDOMWindow localnsIDOMWindow = localnsIWebBrowser.getContentDOMWindow();
    nsIDOMDocument localnsIDOMDocument = localnsIDOMWindow.getDocument();
    nsIDocumentEncoder localnsIDocumentEncoder = (nsIDocumentEncoder)XPCOM.createComponent("@mozilla.org/layout/documentEncoder;1?type=" + paramString, nsIDocumentEncoder.class);
    localnsIDocumentEncoder.init(localnsIDOMDocument, paramString, 4L);
    return localnsIDocumentEncoder.encodeToString();
  }
  
  public String getLocationURL()
  {
    return a.currentURI();
  }
  
  public String getTitle()
  {
    return c.getTitle();
  }
  
  public void goBack()
  {
    a.goBack();
  }
  
  public boolean canGoBack()
  {
    return a.canGoBack();
  }
  
  public boolean canGoForward()
  {
    return a.canGoForward();
  }
  
  public void goForward()
  {
    a.goForward();
  }
  
  public boolean isDisposed()
  {
    throw new UnsupportedOperationException();
  }
  
  public void navigate(String paramString)
  {
    a.navigate(paramString);
  }
  
  public void navigate(String paramString1, String paramString2)
  {
    a.navigate(paramString1, paramString2);
  }
  
  public void navigate(String paramString1, String paramString2, long paramLong)
  {
    a.navigate(paramString1, paramString2, paramLong);
  }
  
  public void refresh()
  {
    a.refresh();
  }
  
  public void stop()
  {
    a.stop();
  }
  
  public void setPreferences(final BrowserPreferences paramBrowserPreferences)
  {
    XPCOM.invokeAndWait(new c(paramBrowserPreferences));
  }
  
  public BrowserPreferences getPreferences()
  {
    final BrowserPreferences localBrowserPreferences = new BrowserPreferences();
    XPCOM.invokeAndWait(new b(localBrowserPreferences));
    return localBrowserPreferences;
  }
  
  public void setContent(String paramString)
  {
    setContent(paramString, "text/html");
  }
  
  public void setContent(String paramString1, String paramString2)
  {
    setContent(paramString1, paramString2, "UTF-8");
  }
  
  public void setContent(String paramString1, String paramString2, String paramString3)
  {
    setContent(paramString1, paramString2, paramString3, null);
  }
  
  public void setContent(final String paramString1, final String paramString2, final String paramString3, final String paramString4)
  {
    if (paramString1 == null) {
      throw new IllegalArgumentException("Content cannot be null.");
    }
    if (paramString2 == null) {
      throw new IllegalArgumentException("ContentType cannot be null.");
    }
    if (paramString3 == null) {
      throw new IllegalArgumentException("Charset cannot be null.");
    }
    XPCOM.invokeAndWait(new e(paramString4, paramString1, paramString2, paramString3));
  }
  
  public BufferedImage toImage()
  {
    return toImage(WebPageRenderer.getDocumentPreferredSize(getNsIWebBrowser()));
  }
  
  public BufferedImage toImage(Dimension paramDimension)
  {
    if (paramDimension == null) {
      throw new IllegalArgumentException("PreferredSize cannot be null.");
    }
    if ((width == 0) || (height == 0)) {
      throw new IllegalArgumentException("PreferredSize cannot be empty.");
    }
    try
    {
      nsIWebBrowser localnsIWebBrowser = getNsIWebBrowser();
      InputStream localInputStream = WebPageRenderer.render(localnsIWebBrowser, paramDimension);
      return ImageIO.read(localInputStream);
    }
    catch (IOException localIOException)
    {
      throw new RuntimeException("Cannot capture a web page.", localIOException);
    }
  }
  
  public boolean isMimeTypeSupported(final String paramString)
  {
    final AtomicBoolean localAtomicBoolean = new AtomicBoolean(d.contains(paramString));
    XPCOM.invokeAndWait(new d(paramString, localAtomicBoolean));
    return localAtomicBoolean.get();
  }
  
  public void addDisposeListener(DisposeListener paramDisposeListener)
  {
    c.addDisposeListener(paramDisposeListener);
  }
  
  public void removeDisposeListener(DisposeListener paramDisposeListener)
  {
    c.removeDisposeListener(paramDisposeListener);
  }
  
  public List<DisposeListener> getDisposeListeners()
  {
    return c.getDisposeListeners();
  }
  
  public nsIWebBrowser getNsIWebBrowser()
  {
    return c.getWebBrowser();
  }
  
  public void saveWebPage(final File paramFile, final String paramString)
  {
    final CountDownLatch localCountDownLatch = new CountDownLatch(1);
    XPCOM.invokeAndWait(new a(paramFile, paramString, localCountDownLatch));
    try
    {
      localCountDownLatch.await();
    }
    catch (InterruptedException localInterruptedException)
    {
      throw new RuntimeException(localInterruptedException);
    }
  }
  
  public DownloadHandler getDownloadHandler()
  {
    throw new UnsupportedOperationException();
  }
  
  public void setDownloadHandler(DownloadHandler paramDownloadHandler)
  {
    throw new UnsupportedOperationException();
  }
  
  class g
    implements Runnable
  {
    g(AtomicReference paramAtomicReference) {}
    
    public void run()
    {
      nsIWebBrowser localnsIWebBrowser = getNsIWebBrowser();
      nsIDOMWindow localnsIDOMWindow = localnsIWebBrowser.getContentDOMWindow();
      nsIDOMDocument localnsIDOMDocument = localnsIDOMWindow.getDocument();
      localAtomicReference.set((Document)DomProxyFactory.createDomObjectProxy(localnsIDOMDocument));
    }
  }
  
  class f
    implements Runnable
  {
    f(AtomicReference paramAtomicReference, String paramString) {}
    
    public void run()
    {
      localAtomicReference.set(ActiveWebBrowserSupport.a(ActiveWebBrowserSupport.this, paramString));
    }
  }
  
  class c
    implements Runnable
  {
    c(BrowserPreferences paramBrowserPreferences) {}
    
    public void run()
    {
      nsIInterfaceRequestor localnsIInterfaceRequestor = (nsIInterfaceRequestor)XPCOM.queryInterface(ActiveWebBrowserSupport.a(ActiveWebBrowserSupport.this).getWebBrowser(), nsIInterfaceRequestor.class);
      nsIDocShell localnsIDocShell = (nsIDocShell)localnsIInterfaceRequestor.getInterface("{6f60ac96-fa2c-41a5-92b4-29aaadbd7a7b}");
      localnsIDocShell.setAllowAuth(paramBrowserPreferences.isAllowAuthentication());
      localnsIDocShell.setAllowImages(paramBrowserPreferences.isAllowImages());
      localnsIDocShell.setAllowJavascript(paramBrowserPreferences.isAllowJavascript());
      localnsIDocShell.setAllowMetaRedirects(paramBrowserPreferences.isAllowMetaRedirects());
      localnsIDocShell.setAllowPlugins(paramBrowserPreferences.isAllowPlugins());
      localnsIDocShell.setAllowSubframes(paramBrowserPreferences.isAllowSubFrames());
    }
  }
  
  class b
    implements Runnable
  {
    b(BrowserPreferences paramBrowserPreferences) {}
    
    public void run()
    {
      nsIWebBrowser localnsIWebBrowser = ActiveWebBrowserSupport.a(ActiveWebBrowserSupport.this).getWebBrowser();
      nsIInterfaceRequestor localnsIInterfaceRequestor = (nsIInterfaceRequestor)XPCOM.queryInterface(localnsIWebBrowser, nsIInterfaceRequestor.class);
      nsIDocShell localnsIDocShell = (nsIDocShell)localnsIInterfaceRequestor.getInterface("{6f60ac96-fa2c-41a5-92b4-29aaadbd7a7b}");
      localBrowserPreferences.setAllowAuthentication(localnsIDocShell.getAllowAuth());
      localBrowserPreferences.setAllowImages(localnsIDocShell.getAllowImages());
      localBrowserPreferences.setAllowJavascript(localnsIDocShell.getAllowJavascript());
      localBrowserPreferences.setAllowMetaRedirects(localnsIDocShell.getAllowMetaRedirects());
      localBrowserPreferences.setAllowPlugins(localnsIDocShell.getAllowPlugins());
      localBrowserPreferences.setAllowSubFrames(localnsIDocShell.getAllowSubframes());
    }
  }
  
  class e
    implements Runnable
  {
    e(String paramString1, String paramString2, String paramString3, String paramString4) {}
    
    public void run()
    {
      Object localObject1;
      Object localObject2;
      Object localObject3;
      if (paramString4 == null)
      {
        localObject1 = getNsIWebBrowser();
        localObject2 = (nsIInterfaceRequestor)XPCOM.queryInterface((nsISupports)localObject1, nsIInterfaceRequestor.class);
        localObject3 = (nsIDocShell)((nsIInterfaceRequestor)localObject2).getInterface("{6f60ac96-fa2c-41a5-92b4-29aaadbd7a7b}");
        nsIInputStream localnsIInputStream = StringInputStreamFactory.newInputStream(paramString1);
        ((nsIDocShell)localObject3).loadStream(localnsIInputStream, null, paramString2, paramString3, null);
      }
      else
      {
        localObject1 = URIFactory.newURI(paramString4);
        localObject2 = getNsIWebBrowser();
        localObject3 = (nsIWebBrowserStream)XPCOM.queryInterface((nsISupports)localObject2, nsIWebBrowserStream.class);
        ((nsIWebBrowserStream)localObject3).openStream((nsIURI)localObject1, paramString2 + ";charset=" + paramString3);
        ((nsIWebBrowserStream)localObject3).appendToStream(paramString1.getBytes(), paramString1.length());
        ((nsIWebBrowserStream)localObject3).closeStream();
      }
    }
  }
  
  class d
    implements Runnable
  {
    d(String paramString, AtomicBoolean paramAtomicBoolean) {}
    
    public void run()
    {
      nsIDOMWindow localnsIDOMWindow = getNsIWebBrowser().getContentDOMWindow();
      nsIDOMWindowInternal localnsIDOMWindowInternal = (nsIDOMWindowInternal)XPCOM.queryInterface(localnsIDOMWindow, nsIDOMWindowInternal.class);
      nsIDOMNavigator localnsIDOMNavigator = localnsIDOMWindowInternal.getNavigator();
      nsIDOMMimeTypeArray localnsIDOMMimeTypeArray = localnsIDOMNavigator.getMimeTypes();
      long l = localnsIDOMMimeTypeArray.getLength();
      for (int i = 0; i < l; i++)
      {
        nsIDOMMimeType localnsIDOMMimeType = localnsIDOMMimeTypeArray.item(i);
        String str = localnsIDOMMimeType.getType();
        if (str.equals(paramString))
        {
          localAtomicBoolean.set(true);
          break;
        }
      }
    }
  }
  
  class a
    implements Runnable
  {
    a(File paramFile, String paramString, CountDownLatch paramCountDownLatch) {}
    
    public void run()
    {
      nsIWebBrowser localnsIWebBrowser = getNsIWebBrowser();
      nsIWebBrowserPersist localnsIWebBrowserPersist = (nsIWebBrowserPersist)XPCOM.queryInterface(localnsIWebBrowser, nsIWebBrowserPersist.class);
      File localFile = new File(paramFile, paramString);
      nsILocalFile localnsILocalFile1 = Mozilla.NewLocalFile(localFile.getAbsolutePath(), false);
      nsILocalFile localnsILocalFile2 = Mozilla.NewLocalFile(paramFile.getAbsolutePath(), false);
      nsIDOMDocument localnsIDOMDocument = localnsIWebBrowser.getContentDOMWindow().getDocument();
      localnsIWebBrowserPersist.setProgressListener(new a());
      localnsIWebBrowserPersist.saveDocument(localnsIDOMDocument, localnsILocalFile1, localnsILocalFile2, "text/html", 4L, 0L);
    }
    
    class a
      extends nsIWebProgressAdapter
    {
      a() {}
      
      public void onStateChange(nsIWebProgress paramnsIWebProgress, nsIRequest paramnsIRequest, long paramLong1, long paramLong2)
      {
        if (FlagUtil.checkFlag(paramLong1, 262160L)) {
          c.countDown();
        }
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.ActiveWebBrowserSupport
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

class Browser$g
  implements Runnable
{
  Browser$g(Browser paramBrowser) {}
  
  public void run()
  {
    Browser.a(a, new ActiveWebBrowserSupport());
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.Browser.g
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

import com.teamdev.jxbrowser.gecko15.events.DisposeListener;

class Browser$i
  implements DisposeListener
{
  Browser$i(Browser paramBrowser) {}
  
  public void disposed()
  {
    Browser.a(a);
    Browser.b(a);
    Browser.c(a);
    Browser.a(a, new DeadWebBrowserSupport());
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.Browser.i
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

import com.teamdev.jxbrowser.gecko15.events.LocationEvent;
import com.teamdev.jxbrowser.gecko15.events.ProgressEvent;
import com.teamdev.jxbrowser.gecko15.events.RequestListener;
import com.teamdev.jxbrowser.gecko15.events.SecurityEvent;
import com.teamdev.jxbrowser.gecko15.events.StateEvent;
import com.teamdev.jxbrowser.gecko15.events.StatusEvent;
import java.util.Iterator;
import java.util.List;

class Browser$h
  implements RequestListener
{
  Browser$h(Browser paramBrowser) {}
  
  public void stateChanged(StateEvent paramStateEvent)
  {
    StateEvent localStateEvent = new StateEvent(a, paramStateEvent.getWebProgress(), paramStateEvent.getRequest(), paramStateEvent.getStateFlags(), paramStateEvent.getStatus());
    List localList = a.getRequestListeners();
    Iterator localIterator = localList.iterator();
    while (localIterator.hasNext())
    {
      RequestListener localRequestListener = (RequestListener)localIterator.next();
      localRequestListener.stateChanged(localStateEvent);
    }
  }
  
  public void progressChanged(ProgressEvent paramProgressEvent)
  {
    ProgressEvent localProgressEvent = new ProgressEvent(a, paramProgressEvent.getWebProgress(), paramProgressEvent.getRequest(), paramProgressEvent.getCurSelfProgress(), paramProgressEvent.getMaxSelfProgress(), paramProgressEvent.getCurTotalProgress(), paramProgressEvent.getMaxTotalProgress());
    List localList = a.getRequestListeners();
    Iterator localIterator = localList.iterator();
    while (localIterator.hasNext())
    {
      RequestListener localRequestListener = (RequestListener)localIterator.next();
      localRequestListener.progressChanged(localProgressEvent);
    }
  }
  
  public void locationChanged(LocationEvent paramLocationEvent)
  {
    LocationEvent localLocationEvent = new LocationEvent(a, paramLocationEvent.getWebProgress(), paramLocationEvent.getRequest(), paramLocationEvent.getLocation());
    List localList = a.getRequestListeners();
    Iterator localIterator = localList.iterator();
    while (localIterator.hasNext())
    {
      RequestListener localRequestListener = (RequestListener)localIterator.next();
      localRequestListener.locationChanged(localLocationEvent);
    }
  }
  
  public void statusChanged(StatusEvent paramStatusEvent)
  {
    StatusEvent localStatusEvent = new StatusEvent(a, paramStatusEvent.getWebProgress(), paramStatusEvent.getRequest(), paramStatusEvent.getStatus(), paramStatusEvent.getMessage());
    List localList = a.getRequestListeners();
    Iterator localIterator = localList.iterator();
    while (localIterator.hasNext())
    {
      RequestListener localRequestListener = (RequestListener)localIterator.next();
      localRequestListener.statusChanged(localStatusEvent);
    }
  }
  
  public void securityChanged(SecurityEvent paramSecurityEvent)
  {
    SecurityEvent localSecurityEvent = new SecurityEvent(a, paramSecurityEvent.getWebProgress(), paramSecurityEvent.getRequest(), paramSecurityEvent.getState());
    List localList = a.getRequestListeners();
    Iterator localIterator = localList.iterator();
    while (localIterator.hasNext())
    {
      RequestListener localRequestListener = (RequestListener)localIterator.next();
      localRequestListener.securityChanged(localSecurityEvent);
    }
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.Browser.h
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

import com.teamdev.jxbrowser.gecko15.events.StatusChangeEvent;
import com.teamdev.jxbrowser.gecko15.events.StatusChangeListener;
import java.util.Iterator;
import java.util.List;

class Browser$d
  implements StatusChangeListener
{
  Browser$d(Browser paramBrowser) {}
  
  public void statusChanged(StatusChangeEvent paramStatusChangeEvent)
  {
    StatusChangeEvent localStatusChangeEvent = new StatusChangeEvent(a, paramStatusChangeEvent.getStatusType(), paramStatusChangeEvent.getStatus());
    List localList = a.getStatusChangeListeners();
    Iterator localIterator = localList.iterator();
    while (localIterator.hasNext())
    {
      StatusChangeListener localStatusChangeListener = (StatusChangeListener)localIterator.next();
      localStatusChangeListener.statusChanged(localStatusChangeEvent);
    }
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.Browser.d
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

import com.teamdev.jxbrowser.gecko15.events.TitleChangeEvent;
import com.teamdev.jxbrowser.gecko15.events.TitleChangeListener;
import java.util.Iterator;
import java.util.List;

class Browser$c
  implements TitleChangeListener
{
  Browser$c(Browser paramBrowser) {}
  
  public void titleChanged(TitleChangeEvent paramTitleChangeEvent)
  {
    TitleChangeEvent localTitleChangeEvent = new TitleChangeEvent(a, paramTitleChangeEvent.getTitle());
    List localList = a.getTitleChangeListeners();
    Iterator localIterator = localList.iterator();
    while (localIterator.hasNext())
    {
      TitleChangeListener localTitleChangeListener = (TitleChangeListener)localIterator.next();
      localTitleChangeListener.titleChanged(localTitleChangeEvent);
    }
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.Browser.c
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

import com.teamdev.jxbrowser.gecko15.events.ContextMenuEvent;
import com.teamdev.jxbrowser.gecko15.events.ContextMenuListener;
import java.util.Iterator;
import java.util.List;

class Browser$f
  implements ContextMenuListener
{
  Browser$f(Browser paramBrowser) {}
  
  public void contextMenuRequested(ContextMenuEvent paramContextMenuEvent)
  {
    ContextMenuEvent localContextMenuEvent = new ContextMenuEvent(a, paramContextMenuEvent.getContextFlags(), paramContextMenuEvent.getMouseEvent(), paramContextMenuEvent.getTargetNode(), paramContextMenuEvent.getAssociatedLink(), paramContextMenuEvent.getImageSrc(), paramContextMenuEvent.getBackgroundImageSrc(), paramContextMenuEvent.getX(), paramContextMenuEvent.getY());
    List localList = a.getContextMenuListeners();
    Iterator localIterator = localList.iterator();
    while (localIterator.hasNext())
    {
      ContextMenuListener localContextMenuListener = (ContextMenuListener)localIterator.next();
      localContextMenuListener.contextMenuRequested(localContextMenuEvent);
    }
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.Browser.f
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

import com.teamdev.jxbrowser.gecko15.events.BrowserWindowEvent;
import com.teamdev.jxbrowser.gecko15.events.BrowserWindowListener;
import java.awt.Rectangle;
import java.util.Iterator;
import java.util.List;

class Browser$e
  implements BrowserWindowListener
{
  Browser$e(Browser paramBrowser) {}
  
  public void windowVisible(BrowserWindowEvent paramBrowserWindowEvent)
  {
    BrowserWindowEvent localBrowserWindowEvent = new BrowserWindowEvent(a, paramBrowserWindowEvent.isVisible());
    List localList = a.getBrowserWindowListeners();
    Iterator localIterator = localList.iterator();
    while (localIterator.hasNext())
    {
      BrowserWindowListener localBrowserWindowListener = (BrowserWindowListener)localIterator.next();
      localBrowserWindowListener.windowVisible(localBrowserWindowEvent);
    }
  }
  
  public void windowSizeChanged(BrowserWindowEvent paramBrowserWindowEvent)
  {
    BrowserWindowEvent localBrowserWindowEvent = new BrowserWindowEvent(a, new Rectangle(paramBrowserWindowEvent.getSize()));
    List localList = a.getBrowserWindowListeners();
    Iterator localIterator = localList.iterator();
    while (localIterator.hasNext())
    {
      BrowserWindowListener localBrowserWindowListener = (BrowserWindowListener)localIterator.next();
      localBrowserWindowListener.windowSizeChanged(localBrowserWindowEvent);
    }
  }
  
  public void windowLocationChanged(BrowserWindowEvent paramBrowserWindowEvent)
  {
    BrowserWindowEvent localBrowserWindowEvent = new BrowserWindowEvent(a, new Rectangle(paramBrowserWindowEvent.getLocation()));
    List localList = a.getBrowserWindowListeners();
    Iterator localIterator = localList.iterator();
    while (localIterator.hasNext())
    {
      BrowserWindowListener localBrowserWindowListener = (BrowserWindowListener)localIterator.next();
      localBrowserWindowListener.windowLocationChanged(localBrowserWindowEvent);
    }
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.Browser.e
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

import com.teamdev.jxbrowser.gecko15.events.RequestAdapter;
import com.teamdev.jxbrowser.gecko15.events.StateEvent;
import java.util.concurrent.CountDownLatch;

class Browser$j
  extends RequestAdapter
{
  Browser$j(Browser paramBrowser, CountDownLatch paramCountDownLatch) {}
  
  public void stateChanged(StateEvent paramStateEvent)
  {
    if (paramStateEvent.isLoadingCompleted()) {
      a.countDown();
    }
  }
}

/* Location:
 * Qualified Name:     com.teamdev.jxbrowser.gecko15.Browser.j
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.teamdev.jxbrowser.gecko15;

import com.teamdev.jxbrowser.gecko15.download.DownloadHandler;
import com.teamdev.jxbrowser.gecko15.download.DownloadHandlerProvider;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIDOMWindow;
import com.teamdev.jxbrowser.gecko15.xpcom.interfaces.nsIWebBrowser;

class Browser$a
  implements DownloadHandlerProvider
{
  private DownloadHandler b;
  
  private Browser$a(Browse
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd