use of android.webkit.PluginData in project XobotOS by xamarin.
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;
}
use of android.webkit.PluginData in project android_frameworks_base by AOSPA.
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;
}
use of android.webkit.PluginData 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;
}
use of android.webkit.PluginData 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;
}
use of android.webkit.PluginData in project android_frameworks_base by ParanoidAndroid.
the class UrlInterceptRegistryTest method testGetPluginData.
public void testGetPluginData() {
PluginData data = new PluginData(null, 0, null, 200);
String url = new String("url1");
MockUrlInterceptHandler handler1 = new MockUrlInterceptHandler(data, url);
data = new PluginData(null, 0, null, 404);
url = new String("url2");
MockUrlInterceptHandler handler2 = new MockUrlInterceptHandler(data, url);
assertTrue(UrlInterceptRegistry.registerHandler(handler1));
assertTrue(UrlInterceptRegistry.registerHandler(handler2));
data = UrlInterceptRegistry.getPluginData("url1", null);
assertTrue(data != null);
assertTrue(data.getStatusCode() == 200);
data = UrlInterceptRegistry.getPluginData("url2", null);
assertTrue(data != null);
assertTrue(data.getStatusCode() == 404);
assertTrue(UrlInterceptRegistry.unregisterHandler(handler1));
assertTrue(UrlInterceptRegistry.unregisterHandler(handler2));
}
Aggregations