Search in sources :

Example 6 with UrlInterceptHandler

use of android.webkit.UrlInterceptHandler in project platform_frameworks_base by android.

the class UrlInterceptRegistry method getPluginData.

/**
     * Given an url, returns the PluginData of the first
     * UrlInterceptHandler interested, or null if none are or if
     * intercepts are disabled.
     *
     * @return A PluginData instance containing surrogate content.
     *
     * @hide
     * @deprecated This class was intended to be used by Gears. Since Gears was
     * deprecated, so is this class.
     */
@Deprecated
public static synchronized PluginData getPluginData(String url, Map<String, String> headers) {
    if (urlInterceptDisabled()) {
        return null;
    }
    Iterator iter = getHandlers().listIterator();
    while (iter.hasNext()) {
        UrlInterceptHandler handler = (UrlInterceptHandler) iter.next();
        PluginData data = handler.getPluginData(url, headers);
        if (data != null) {
            return data;
        }
    }
    return null;
}
Also used : UrlInterceptHandler(android.webkit.UrlInterceptHandler) PluginData(android.webkit.PluginData) Iterator(java.util.Iterator)

Example 7 with UrlInterceptHandler

use of android.webkit.UrlInterceptHandler in project android_frameworks_base by crdroidandroid.

the class UrlInterceptRegistry method getSurrogate.

/**
     * Given an url, returns the CacheResult of the first
     * UrlInterceptHandler interested, or null if none are.
     *
     * @return A CacheResult containing surrogate content.
     *
     * @hide
     * @deprecated This class was intended to be used by Gears. Since Gears was
     * deprecated, so is this class.
     */
@Deprecated
public static synchronized CacheResult getSurrogate(String url, Map<String, String> headers) {
    if (urlInterceptDisabled()) {
        return null;
    }
    Iterator iter = getHandlers().listIterator();
    while (iter.hasNext()) {
        UrlInterceptHandler handler = (UrlInterceptHandler) iter.next();
        CacheResult result = handler.service(url, headers);
        if (result != null) {
            return result;
        }
    }
    return null;
}
Also used : UrlInterceptHandler(android.webkit.UrlInterceptHandler) Iterator(java.util.Iterator) CacheResult(android.webkit.CacheManager.CacheResult)

Example 8 with UrlInterceptHandler

use of android.webkit.UrlInterceptHandler in project platform_frameworks_base by android.

the class UrlInterceptRegistry method getSurrogate.

/**
     * Given an url, returns the CacheResult of the first
     * UrlInterceptHandler interested, or null if none are.
     *
     * @return A CacheResult containing surrogate content.
     *
     * @hide
     * @deprecated This class was intended to be used by Gears. Since Gears was
     * deprecated, so is this class.
     */
@Deprecated
public static synchronized CacheResult getSurrogate(String url, Map<String, String> headers) {
    if (urlInterceptDisabled()) {
        return null;
    }
    Iterator iter = getHandlers().listIterator();
    while (iter.hasNext()) {
        UrlInterceptHandler handler = (UrlInterceptHandler) iter.next();
        CacheResult result = handler.service(url, headers);
        if (result != null) {
            return result;
        }
    }
    return null;
}
Also used : UrlInterceptHandler(android.webkit.UrlInterceptHandler) Iterator(java.util.Iterator) CacheResult(android.webkit.CacheManager.CacheResult)

Example 9 with UrlInterceptHandler

use of android.webkit.UrlInterceptHandler in project android_frameworks_base by ParanoidAndroid.

the class UrlInterceptRegistry method getPluginData.

/**
     * Given an url, returns the PluginData of the first
     * UrlInterceptHandler interested, or null if none are or if
     * intercepts are disabled.
     *
     * @return A PluginData instance containing surrogate content.
     *
     * @hide
     * @deprecated This class was intended to be used by Gears. Since Gears was
     * deprecated, so is this class.
     */
@Deprecated
public static synchronized PluginData getPluginData(String url, Map<String, String> headers) {
    if (urlInterceptDisabled()) {
        return null;
    }
    Iterator iter = getHandlers().listIterator();
    while (iter.hasNext()) {
        UrlInterceptHandler handler = (UrlInterceptHandler) iter.next();
        PluginData data = handler.getPluginData(url, headers);
        if (data != null) {
            return data;
        }
    }
    return null;
}
Also used : UrlInterceptHandler(android.webkit.UrlInterceptHandler) PluginData(android.webkit.PluginData) Iterator(java.util.Iterator)

Example 10 with UrlInterceptHandler

use of android.webkit.UrlInterceptHandler in project XobotOS by xamarin.

the class UrlInterceptRegistry method getSurrogate.

/**
     * Given an url, returns the CacheResult of the first
     * UrlInterceptHandler interested, or null if none are.
     *
     * @return A CacheResult containing surrogate content.
     *
     * @hide
     * @deprecated This class was intended to be used by Gears. Since Gears was
     * deprecated, so is this class.
     */
@Deprecated
public static synchronized CacheResult getSurrogate(String url, Map<String, String> headers) {
    if (urlInterceptDisabled()) {
        return null;
    }
    Iterator iter = getHandlers().listIterator();
    while (iter.hasNext()) {
        UrlInterceptHandler handler = (UrlInterceptHandler) iter.next();
        CacheResult result = handler.service(url, headers);
        if (result != null) {
            return result;
        }
    }
    return null;
}
Also used : UrlInterceptHandler(android.webkit.UrlInterceptHandler) Iterator(java.util.Iterator) CacheResult(android.webkit.CacheManager.CacheResult)

Aggregations

UrlInterceptHandler (android.webkit.UrlInterceptHandler)14 Iterator (java.util.Iterator)14 CacheResult (android.webkit.CacheManager.CacheResult)7 PluginData (android.webkit.PluginData)7