Changeset 83258 in webkit


Ignore:
Timestamp:
Apr 7, 2011 11:34:46 PM (13 years ago)
Author:
kinuko@chromium.org
Message:

2011-04-07 Kinuko Yasuda <kinuko@chromium.org>

Reviewed by Darin Fisher.

[Chromium] Add WebKit API to query and request unified offline-storage quota
https://bugs.webkit.org/show_bug.cgi?id=57849
Just adding the API, this does not do anything yet.

The API is based on the public discussion for unified quota API:
http://lists.w3.org/Archives/Public/public-webapps/2011JanMar/0346.html
(The detail is not yet fully specified and might be subject to change.)

  • public/WebFrameClient.h: (WebKit::WebFrameClient::queryStorageUsageAndQuota): Added. (WebKit::WebFrameClient::requestStorageQuota): Added.
  • public/WebStorageQuotaCallbacks.h: Added. (WebKit::WebStorageQuotaCallbacks::~WebStorageQuotaCallbacks):
  • public/WebStorageQuotaType.h: Added.
Location:
trunk/Source/WebKit/chromium
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r83256 r83258  
     12011-04-07  Kinuko Yasuda  <kinuko@chromium.org>
     2
     3        Reviewed by Darin Fisher.
     4
     5        [Chromium] Add WebKit API to query and request unified offline-storage quota
     6        https://bugs.webkit.org/show_bug.cgi?id=57849
     7        Just adding the API, this does not do anything yet.
     8
     9        The API is based on the public discussion for unified quota API:
     10        http://lists.w3.org/Archives/Public/public-webapps/2011JanMar/0346.html
     11        (The detail is not yet fully specified and might be subject to change.)
     12
     13        * public/WebFrameClient.h:
     14        (WebKit::WebFrameClient::queryStorageUsageAndQuota): Added.
     15        (WebKit::WebFrameClient::requestStorageQuota): Added.
     16        * public/WebStorageQuotaCallbacks.h: Added.
     17        (WebKit::WebStorageQuotaCallbacks::~WebStorageQuotaCallbacks):
     18        * public/WebStorageQuotaType.h: Added.
     19
    1202011-04-07  Dominic Cooney  <dominicc@google.com>
    221
  • trunk/Source/WebKit/chromium/WebKit.gyp

    r83249 r83258  
    267267                'public/WebStorageArea.h',
    268268                'public/WebStorageEventDispatcher.h',
     269                'public/WebStorageQuotaCallbacks.h',
     270                'public/WebStorageQuotaType.h',
    269271                'public/WebStorageNamespace.h',
    270272                'public/WebString.h',
  • trunk/Source/WebKit/chromium/public/WebFrameClient.h

    r80177 r83258  
    11/*
    2  * Copyright (C) 2010 Google Inc. All rights reserved.
     2 * Copyright (C) 2011 Google Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3636#include "WebNavigationPolicy.h"
    3737#include "WebNavigationType.h"
     38#include "WebStorageQuotaType.h"
    3839#include "WebURLError.h"
    3940
     
    5253class WebSecurityOrigin;
    5354class WebSharedWorker;
     55class WebStorageQuotaCallbacks;
    5456class WebString;
    5557class WebURL;
     
    363365        bool create, WebFileSystemCallbacks*) { }
    364366
     367    // Quota ---------------------------------------------------------
     368
     369    // Queries the origin's storage usage and quota information.
     370    // WebStorageQuotaCallbacks::didQueryStorageUsageAndQuota will be called
     371    // with the current usage and quota information for the origin. When
     372    // an error occurs WebStorageQuotaCallbacks::didFail is called with an
     373    // error code.
     374    // The callbacks object is deleted when the callback method is called
     375    // and does not need to be (and should not be) deleted manually.
     376    virtual void queryStorageUsageAndQuota(
     377        WebFrame*, WebStorageQuotaType, WebStorageQuotaCallbacks*) { }
     378
     379    // Requests a new quota size for the origin's storage.
     380    // |newQuotaInBytes| indicates how much storage space (in bytes) the
     381    // caller expects to need.
     382    // WebStorageQuotaCallbacks::didGrantStorageQuota will be called when
     383    // a new quota is granted. WebStorageQuotaCallbacks::didFail
     384    // is called with an error code otherwise.
     385    // Note that the requesting quota size may not always be granted and
     386    // a smaller amount of quota than requested might be returned.
     387    // The callbacks object is deleted when the callback method is called
     388    // and does not need to be (and should not be) deleted manually.
     389    virtual void requestStorageQuota(
     390        WebFrame*, WebStorageQuotaType,
     391        unsigned long long newQuotaInBytes,
     392        WebStorageQuotaCallbacks*) { }
     393
    365394protected:
    366395    ~WebFrameClient() { }
  • trunk/Source/WebKit/chromium/src/AssertMatchingEnums.cpp

    r82459 r83258  
    3939#include "DocumentMarker.h"
    4040#include "EditorInsertAction.h"
     41#include "ExceptionCode.h"
    4142#include "FileError.h"
    4243#include "FileMetadata.h"
     
    7677#include "WebScrollbar.h"
    7778#include "WebSettings.h"
     79#include "WebStorageQuotaError.h"
    7880#include "WebTextAffinity.h"
    7981#include "WebTextCaseSensitivity.h"
     
    415417COMPILE_ASSERT_MATCHING_ENUM(WebTextCheckingResult::ErrorGrammar, DocumentMarker::Grammar);
    416418
     419#if ENABLE(QUOTA)
     420COMPILE_ASSERT_MATCHING_ENUM(WebStorageQuotaErrorNotSupported, NOT_SUPPORTED_ERR);
     421COMPILE_ASSERT_MATCHING_ENUM(WebStorageQuotaErrorAbort, ABORT_ERR);
     422#endif
     423
    417424#if OS(DARWIN)
    418425COMPILE_ASSERT_MATCHING_ENUM(WebThemeEngine::StateDisabled, PlatformBridge::StateDisabled);
Note: See TracChangeset for help on using the changeset viewer.