All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.webfolder.ui4j.webkit.WebKitBrowserProvider Maven / Gradle / Ivy

The newest version!
package io.webfolder.ui4j.webkit;

import io.webfolder.ui4j.api.browser.BrowserEngine;
import io.webfolder.ui4j.api.browser.BrowserType;
import io.webfolder.ui4j.spi.BrowserProvider;
import io.webfolder.ui4j.spi.ShutdownListener;

public class WebKitBrowserProvider implements BrowserProvider {

    private static class NoOpShutdownListener implements ShutdownListener {

        @Override
        public void onShutdown(BrowserEngine engine) {
            // no op
        }
    }

    private ShutdownListener shutdownListener = new NoOpShutdownListener();

    @Override
    public BrowserType getBrowserType() {
        return BrowserType.WebKit;
    }

    @Override
    public BrowserEngine create() {
        return new WebKitBrowser(shutdownListener);
    }

    @Override
    public void setShutdownListener(ShutdownListener listener) {
        this.shutdownListener = listener;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy