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

WebStorageAdapter

public final class WebStorageAdapter extends android.webkit.WebStorage
Chromium implementation of WebStorage -- forwards calls to the chromium internal implementation.

Fields Summary
private final org.chromium.android_webview.AwQuotaManagerBridge
mQuotaManagerBridge
Constructors Summary
WebStorageAdapter(org.chromium.android_webview.AwQuotaManagerBridge quotaManagerBridge)

        mQuotaManagerBridge = quotaManagerBridge;
    
Methods Summary
public voiddeleteAllData()

        mQuotaManagerBridge.deleteAllData();
    
public voiddeleteOrigin(java.lang.String origin)

        mQuotaManagerBridge.deleteOrigin(origin);
    
public voidgetOrigins(android.webkit.ValueCallback callback)

        mQuotaManagerBridge.getOrigins(new ValueCallback<AwQuotaManagerBridge.Origins>() {
            @Override
            public void onReceiveValue(AwQuotaManagerBridge.Origins origins) {
                Map<String, Origin> originsMap = new HashMap<String, Origin>();
                for (int i = 0; i < origins.mOrigins.length; ++i) {
                    Origin origin = new Origin(origins.mOrigins[i], origins.mQuotas[i],
                            origins.mUsages[i]) {
                        // Intentionally empty to work around cross-package protected visibility
                        // of Origin constructor.
                    };
                    originsMap.put(origins.mOrigins[i], origin);
                }
                callback.onReceiveValue(originsMap);
            }
        });
    
public voidgetQuotaForOrigin(java.lang.String origin, android.webkit.ValueCallback callback)

        mQuotaManagerBridge.getQuotaForOrigin(origin, callback);
    
public voidgetUsageForOrigin(java.lang.String origin, android.webkit.ValueCallback callback)

        mQuotaManagerBridge.getUsageForOrigin(origin, callback);
    
public voidsetQuotaForOrigin(java.lang.String origin, long quota)

        // Intentional no-op for deprecated method.