FileDocCategorySizeDatePackage
ContentSettingsAdapter.javaAPI DocAndroid 5.1 API18294Thu Mar 12 22:22:56 GMT 2015com.android.webview.chromium

ContentSettingsAdapter

public class ContentSettingsAdapter extends android.webkit.WebSettings

Fields Summary
private static final String
LOGTAG
private static final boolean
TRACE
private org.chromium.android_webview.AwSettings
mAwSettings
Constructors Summary
public ContentSettingsAdapter(org.chromium.android_webview.AwSettings awSettings)


       
        mAwSettings = awSettings;
    
Methods Summary
public booleanenableSmoothTransition()

        // Intentional no-op.
        return false;
    
public booleangetAcceptThirdPartyCookies()

        return mAwSettings.getAcceptThirdPartyCookies();
    
public booleangetAllowContentAccess()

        return mAwSettings.getAllowContentAccess();
    
public booleangetAllowFileAccess()

        return mAwSettings.getAllowFileAccess();
    
public booleangetAllowFileAccessFromFileURLs()

        return mAwSettings.getAllowFileAccessFromFileURLs();
    
public booleangetAllowUniversalAccessFromFileURLs()

        return mAwSettings.getAllowUniversalAccessFromFileURLs();
    
org.chromium.android_webview.AwSettingsgetAwSettings()

        return mAwSettings;
    
public synchronized booleangetBlockNetworkImage()

        return !mAwSettings.getImagesEnabled();
    
public synchronized booleangetBlockNetworkLoads()

        return mAwSettings.getBlockNetworkLoads();
    
public booleangetBuiltInZoomControls()

        return mAwSettings.getBuiltInZoomControls();
    
public intgetCacheMode()

        return mAwSettings.getCacheMode();
    
public synchronized java.lang.StringgetCursiveFontFamily()

        return mAwSettings.getCursiveFontFamily();
    
public synchronized booleangetDatabaseEnabled()

        return mAwSettings.getDatabaseEnabled();
    
public synchronized java.lang.StringgetDatabasePath()

        // Intentional no-op.
        return "";
    
public synchronized intgetDefaultFixedFontSize()

        return mAwSettings.getDefaultFixedFontSize();
    
public synchronized intgetDefaultFontSize()

        return mAwSettings.getDefaultFontSize();
    
public synchronized java.lang.StringgetDefaultTextEncodingName()

        return mAwSettings.getDefaultTextEncodingName();
    
public android.webkit.WebSettings.ZoomDensitygetDefaultZoom()

        // Intentional no-op.
        return ZoomDensity.MEDIUM;
    
public booleangetDisplayZoomControls()

        return mAwSettings.getDisplayZoomControls();
    
public synchronized booleangetDomStorageEnabled()

        return mAwSettings.getDomStorageEnabled();
    
public synchronized java.lang.StringgetFantasyFontFamily()

        return mAwSettings.getFantasyFontFamily();
    
public synchronized java.lang.StringgetFixedFontFamily()

        return mAwSettings.getFixedFontFamily();
    
public synchronized booleangetJavaScriptCanOpenWindowsAutomatically()

        return mAwSettings.getJavaScriptCanOpenWindowsAutomatically();
    
public synchronized booleangetJavaScriptEnabled()

        return mAwSettings.getJavaScriptEnabled();
    
public synchronized android.webkit.WebSettings.LayoutAlgorithmgetLayoutAlgorithm()

        // TODO: Remove the upstream enum and mapping once the new value is in the public API.
        final LayoutAlgorithm[] webViewValues = {
            LayoutAlgorithm.NORMAL,
            LayoutAlgorithm.SINGLE_COLUMN,
            LayoutAlgorithm.NARROW_COLUMNS,
            LayoutAlgorithm.TEXT_AUTOSIZING
        };
        return webViewValues[mAwSettings.getLayoutAlgorithm().ordinal()];
    
public booleangetLightTouchEnabled()

        // Intentional no-op.
        return false;
    
public booleangetLoadWithOverviewMode()

        return mAwSettings.getLoadWithOverviewMode();
    
public synchronized booleangetLoadsImagesAutomatically()

        return mAwSettings.getLoadsImagesAutomatically();
    
public booleangetMediaPlaybackRequiresUserGesture()

        return mAwSettings.getMediaPlaybackRequiresUserGesture();
    
public synchronized intgetMinimumFontSize()

        return mAwSettings.getMinimumFontSize();
    
public synchronized intgetMinimumLogicalFontSize()

        return mAwSettings.getMinimumLogicalFontSize();
    
public intgetMixedContentMode()

        return mAwSettings.getMixedContentMode();
    
public booleangetNavDump()

        // Intentional no-op.
        return false;
    
public synchronized android.webkit.WebSettings.PluginStategetPluginState()

        return mAwSettings.getPluginState();
    
public synchronized booleangetPluginsEnabled()

        return mAwSettings.getPluginsEnabled();
    
public synchronized java.lang.StringgetSansSerifFontFamily()

        return mAwSettings.getSansSerifFontFamily();
    
public booleangetSaveFormData()

        return mAwSettings.getSaveFormData();
    
public booleangetSavePassword()

        // Intentional no-op.
        return false;
    
public synchronized java.lang.StringgetSerifFontFamily()

        return mAwSettings.getSerifFontFamily();
    
public synchronized java.lang.StringgetStandardFontFamily()

        return mAwSettings.getStandardFontFamily();
    
public synchronized intgetTextZoom()

        return mAwSettings.getTextZoom();
    
public booleangetUseWebViewBackgroundForOverscrollBackground()

        // Intentional no-op.
        return false;
    
public synchronized booleangetUseWideViewPort()

        return mAwSettings.getUseWideViewPort();
    
public synchronized intgetUserAgent()

        // Minimal implementation for backwards compatibility: just identifies default vs custom.
        return AwSettings.getDefaultUserAgent().equals(getUserAgentString()) ? 0 : -1;
    
public synchronized java.lang.StringgetUserAgentString()

        return mAwSettings.getUserAgentString();
    
public booleangetVideoOverlayForEmbeddedEncryptedVideoEnabled()

        return mAwSettings.getVideoOverlayForEmbeddedVideoEnabled();
    
public voidsetAcceptThirdPartyCookies(boolean accept)

        if (TRACE) Log.d(LOGTAG, "setAcceptThirdPartyCookies=" + accept);
        mAwSettings.setAcceptThirdPartyCookies(accept);
    
public voidsetAllowContentAccess(boolean allow)

        if (TRACE) Log.d(LOGTAG, "setAllowContentAccess=" + allow);
        mAwSettings.setAllowContentAccess(allow);
    
public voidsetAllowFileAccess(boolean allow)

        if (TRACE) Log.d(LOGTAG, "setAllowFileAccess=" + allow);
        mAwSettings.setAllowFileAccess(allow);
    
public voidsetAllowFileAccessFromFileURLs(boolean flag)

        if (TRACE) Log.d(LOGTAG, "setAllowFileAccessFromFileURLs=" + flag);
        mAwSettings.setAllowFileAccessFromFileURLs(flag);
    
public voidsetAllowUniversalAccessFromFileURLs(boolean flag)

        if (TRACE) Log.d(LOGTAG, "setAllowUniversalAccessFromFileURLs=" + flag);
        mAwSettings.setAllowUniversalAccessFromFileURLs(flag);
    
public synchronized voidsetAppCacheEnabled(boolean flag)

        if (TRACE) Log.d(LOGTAG, "setAppCacheEnabled=" + flag);
        mAwSettings.setAppCacheEnabled(flag);
    
public synchronized voidsetAppCacheMaxSize(long appCacheMaxSize)

        // Intentional no-op.
    
public synchronized voidsetAppCachePath(java.lang.String appCachePath)

        if (TRACE) Log.d(LOGTAG, "setAppCachePath=" + appCachePath);
        mAwSettings.setAppCachePath(appCachePath);
    
public synchronized voidsetBlockNetworkImage(boolean flag)

        if (TRACE) Log.d(LOGTAG, "setBlockNetworkImage=" + flag);
        mAwSettings.setImagesEnabled(!flag);
    
public synchronized voidsetBlockNetworkLoads(boolean flag)

        if (TRACE) Log.d(LOGTAG, "setBlockNetworkLoads=" + flag);
        mAwSettings.setBlockNetworkLoads(flag);
    
public voidsetBuiltInZoomControls(boolean enabled)

        if (TRACE) Log.d(LOGTAG, "setBuiltInZoomControls=" + enabled);
        mAwSettings.setBuiltInZoomControls(enabled);
    
public voidsetCacheMode(int mode)

        if (TRACE) Log.d(LOGTAG, "setCacheMode=" + mode);
        mAwSettings.setCacheMode(mode);
    
public synchronized voidsetCursiveFontFamily(java.lang.String font)

        if (TRACE) Log.d(LOGTAG, "setCursiveFontFamily=" + font);
        mAwSettings.setCursiveFontFamily(font);
    
public synchronized voidsetDatabaseEnabled(boolean flag)

        if (TRACE) Log.d(LOGTAG, "setDatabaseEnabled=" + flag);
        mAwSettings.setDatabaseEnabled(flag);
    
public synchronized voidsetDatabasePath(java.lang.String databasePath)

        // Intentional no-op.
    
public synchronized voidsetDefaultFixedFontSize(int size)

        if (TRACE) Log.d(LOGTAG, "setDefaultFixedFontSize=" + size);
        mAwSettings.setDefaultFixedFontSize(size);
    
public synchronized voidsetDefaultFontSize(int size)

        if (TRACE) Log.d(LOGTAG, "setDefaultFontSize=" + size);
        mAwSettings.setDefaultFontSize(size);
    
public synchronized voidsetDefaultTextEncodingName(java.lang.String encoding)

        if (TRACE) Log.d(LOGTAG, "setDefaultTextEncodingName=" + encoding);
        mAwSettings.setDefaultTextEncodingName(encoding);
    
public voidsetDefaultZoom(android.webkit.WebSettings.ZoomDensity zoom)

        if (zoom != ZoomDensity.MEDIUM) {
            Log.w(LOGTAG, "setDefaultZoom not supported, zoom=" + zoom);
        }
    
public voidsetDisplayZoomControls(boolean enabled)

        if (TRACE) Log.d(LOGTAG, "setDisplayZoomControls=" + enabled);
        mAwSettings.setDisplayZoomControls(enabled);
    
public synchronized voidsetDomStorageEnabled(boolean flag)

        if (TRACE) Log.d(LOGTAG, "setDomStorageEnabled=" + flag);
        mAwSettings.setDomStorageEnabled(flag);
    
public voidsetEnableSmoothTransition(boolean enable)

        // Intentional no-op.
    
public synchronized voidsetFantasyFontFamily(java.lang.String font)

        if (TRACE) Log.d(LOGTAG, "setFantasyFontFamily=" + font);
        mAwSettings.setFantasyFontFamily(font);
    
public synchronized voidsetFixedFontFamily(java.lang.String font)

        if (TRACE) Log.d(LOGTAG, "setFixedFontFamily=" + font);
        mAwSettings.setFixedFontFamily(font);
    
public synchronized voidsetGeolocationDatabasePath(java.lang.String databasePath)

        // Intentional no-op.
    
public synchronized voidsetGeolocationEnabled(boolean flag)

        if (TRACE) Log.d(LOGTAG, "setGeolocationEnabled=" + flag);
        mAwSettings.setGeolocationEnabled(flag);
    
public synchronized voidsetJavaScriptCanOpenWindowsAutomatically(boolean flag)

        if (TRACE) Log.d(LOGTAG, "setJavaScriptCanOpenWindowsAutomatically=" + flag);
        mAwSettings.setJavaScriptCanOpenWindowsAutomatically(flag);
    
public synchronized voidsetJavaScriptEnabled(boolean flag)

        if (TRACE) Log.d(LOGTAG, "setJavaScriptEnabled=" + flag);
        mAwSettings.setJavaScriptEnabled(flag);
    
public synchronized voidsetLayoutAlgorithm(android.webkit.WebSettings.LayoutAlgorithm l)

        // TODO: Remove the upstream enum and mapping once the new value is in the public API.
        final AwSettings.LayoutAlgorithm[] chromiumValues = {
            AwSettings.LayoutAlgorithm.NORMAL,
            AwSettings.LayoutAlgorithm.SINGLE_COLUMN,
            AwSettings.LayoutAlgorithm.NARROW_COLUMNS,
            AwSettings.LayoutAlgorithm.TEXT_AUTOSIZING
        };
        mAwSettings.setLayoutAlgorithm(chromiumValues[l.ordinal()]);
    
public voidsetLightTouchEnabled(boolean enabled)

        // Intentional no-op.
    
public voidsetLoadWithOverviewMode(boolean overview)

        if (TRACE) Log.d(LOGTAG, "setLoadWithOverviewMode=" + overview);
        mAwSettings.setLoadWithOverviewMode(overview);
    
public synchronized voidsetLoadsImagesAutomatically(boolean flag)

        if (TRACE) Log.d(LOGTAG, "setLoadsImagesAutomatically=" + flag);
        mAwSettings.setLoadsImagesAutomatically(flag);
    
public voidsetMediaPlaybackRequiresUserGesture(boolean require)

        if (TRACE) Log.d(LOGTAG, "setMediaPlaybackRequiresUserGesture=" + require);
        mAwSettings.setMediaPlaybackRequiresUserGesture(require);
    
public synchronized voidsetMinimumFontSize(int size)

        if (TRACE) Log.d(LOGTAG, "setMinimumFontSize=" + size);
        mAwSettings.setMinimumFontSize(size);
    
public synchronized voidsetMinimumLogicalFontSize(int size)

        if (TRACE) Log.d(LOGTAG, "setMinimumLogicalFontSize=" + size);
        mAwSettings.setMinimumLogicalFontSize(size);
    
public voidsetMixedContentMode(int mode)

        mAwSettings.setMixedContentMode(mode);
    
public voidsetNavDump(boolean enabled)

        // Intentional no-op.
    
public voidsetNeedInitialFocus(boolean flag)

        if (TRACE) Log.d(LOGTAG, "setNeedInitialFocus=" + flag);
        mAwSettings.setShouldFocusFirstNode(flag);
    
public synchronized voidsetPluginState(android.webkit.WebSettings.PluginState state)

        if (TRACE) Log.d(LOGTAG, "setPluginState=" + state);
        mAwSettings.setPluginState(state);
    
public synchronized voidsetPluginsEnabled(boolean flag)

        if (TRACE) Log.d(LOGTAG, "setPluginsEnabled=" + flag);
        mAwSettings.setPluginsEnabled(flag);
    
public synchronized voidsetRenderPriority(android.webkit.WebSettings.RenderPriority priority)

        // Intentional no-op.
    
public synchronized voidsetSansSerifFontFamily(java.lang.String font)

        if (TRACE) Log.d(LOGTAG, "setSansSerifFontFamily=" + font);
        mAwSettings.setSansSerifFontFamily(font);
    
public voidsetSaveFormData(boolean save)

        if (TRACE) Log.d(LOGTAG, "setSaveFormData=" + save);
        mAwSettings.setSaveFormData(save);
    
public voidsetSavePassword(boolean save)

        // Intentional no-op.
    
public synchronized voidsetSerifFontFamily(java.lang.String font)

        if (TRACE) Log.d(LOGTAG, "setSerifFontFamily=" + font);
        mAwSettings.setSerifFontFamily(font);
    
public synchronized voidsetStandardFontFamily(java.lang.String font)

        if (TRACE) Log.d(LOGTAG, "setStandardFontFamily=" + font);
        mAwSettings.setStandardFontFamily(font);
    
public synchronized voidsetSupportMultipleWindows(boolean support)

        if (TRACE) Log.d(LOGTAG, "setSupportMultipleWindows=" + support);
        mAwSettings.setSupportMultipleWindows(support);
    
public voidsetSupportZoom(boolean support)

        if (TRACE) Log.d(LOGTAG, "setSupportZoom=" + support);
        mAwSettings.setSupportZoom(support);
    
public synchronized voidsetTextZoom(int textZoom)

        if (TRACE) Log.d(LOGTAG, "setTextZoom=" + textZoom);
        mAwSettings.setTextZoom(textZoom);
    
public voidsetUseWebViewBackgroundForOverscrollBackground(boolean view)

        // Intentional no-op.
    
public synchronized voidsetUseWideViewPort(boolean use)

        if (TRACE) Log.d(LOGTAG, "setUseWideViewPort=" + use);
        mAwSettings.setUseWideViewPort(use);
    
public synchronized voidsetUserAgent(int ua)

        // Minimal implementation for backwards compatibility: just supports resetting to default.
        if (ua == 0) {
            setUserAgentString(null);
        } else {
            Log.w(LOGTAG, "setUserAgent not supported, ua=" + ua);
        }
    
public synchronized voidsetUserAgentString(java.lang.String ua)

        if (TRACE) Log.d(LOGTAG, "setUserAgentString=" + ua);
        mAwSettings.setUserAgentString(ua);
    
public voidsetVideoOverlayForEmbeddedEncryptedVideoEnabled(boolean flag)

        mAwSettings.setVideoOverlayForEmbeddedVideoEnabled(flag);
    
public synchronized booleansupportMultipleWindows()

        return mAwSettings.supportMultipleWindows();
    
public booleansupportZoom()

        return mAwSettings.supportZoom();