Changeset 53180 in webkit


Ignore:
Timestamp:
Jan 12, 2010 10:51:24 PM (14 years ago)
Author:
jorlow@chromium.org
Message:

2010-01-11 Jeremy Orlow <jorlow@chromium.org>

Reviewed by Darin Fisher.

[Chromium] Move getSessionStorageNamespace from WebKitClient to WebViewClient
https://bugs.webkit.org/show_bug.cgi?id=33492

  • public/WebKitClient.h:
  • public/WebViewClient.h: (WebKit::WebViewClient::getSessionStorageNamespace):
  • src/StorageNamespaceProxy.cpp: (WebCore::StorageNamespace::sessionStorageNamespace):

2010-01-11 Jeremy Orlow <jorlow@chromium.org>

Reviewed by Darin Fisher.

[Chromium] Move getSessionStorageNamespace from WebKitClient to WebViewClient
https://bugs.webkit.org/show_bug.cgi?id=33492

  • page/Page.cpp: (WebCore::Page::sessionStorage):
  • storage/StorageNamespace.cpp: (WebCore::StorageNamespace::sessionStorageNamespace):
  • storage/StorageNamespace.h: (WebCore::StorageNamespace::~StorageNamespace):
Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r53177 r53180  
     12010-01-11  Jeremy Orlow  <jorlow@chromium.org>
     2
     3        Reviewed by Darin Fisher.
     4
     5        [Chromium] Move getSessionStorageNamespace from WebKitClient to WebViewClient
     6        https://bugs.webkit.org/show_bug.cgi?id=33492
     7
     8        * page/Page.cpp:
     9        (WebCore::Page::sessionStorage):
     10        * storage/StorageNamespace.cpp:
     11        (WebCore::StorageNamespace::sessionStorageNamespace):
     12        * storage/StorageNamespace.h:
     13        (WebCore::StorageNamespace::~StorageNamespace):
     14
    1152010-01-12  Dumitru Daniliuc  <dumi@chromium.org>
    216
  • trunk/WebCore/page/Page.cpp

    r52103 r53180  
    690690{
    691691    if (!m_sessionStorage && optionalCreate)
    692         m_sessionStorage = StorageNamespace::sessionStorageNamespace();
     692        m_sessionStorage = StorageNamespace::sessionStorageNamespace(this);
    693693
    694694    return m_sessionStorage.get();
  • trunk/WebCore/storage/StorageNamespace.cpp

    r49040 r53180  
    4242}
    4343
    44 PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace()
     44// The page argument is only used by the Chromium port.
     45PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace(Page*)
    4546{
    4647    return StorageNamespaceImpl::sessionStorageNamespace();
  • trunk/WebCore/storage/StorageNamespace.h

    r49040 r53180  
    3636namespace WebCore {
    3737
    38     class SecurityOrigin;
    39     class StorageArea;
     38class Page;
     39class SecurityOrigin;
     40class StorageArea;
    4041
    41     // This interface is required for Chromium since these actions need to be proxied between processes.
    42     class StorageNamespace : public RefCounted<StorageNamespace> {
    43     public:
    44         static PassRefPtr<StorageNamespace> localStorageNamespace(const String& path, unsigned quota);
    45         static PassRefPtr<StorageNamespace> sessionStorageNamespace();
     42// This interface is required for Chromium since these actions need to be proxied between processes.
     43class StorageNamespace : public RefCounted<StorageNamespace> {
     44public:
     45    static PassRefPtr<StorageNamespace> localStorageNamespace(const String& path, unsigned quota);
     46    static PassRefPtr<StorageNamespace> sessionStorageNamespace(Page*);
    4647
    47         virtual ~StorageNamespace() { }
    48         virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>) = 0;
    49         virtual PassRefPtr<StorageNamespace> copy() = 0;
    50         virtual void close() = 0;
    51         virtual void unlock() = 0;
    52     };
     48    virtual ~StorageNamespace() { }
     49    virtual PassRefPtr<StorageArea> storageArea(PassRefPtr<SecurityOrigin>) = 0;
     50    virtual PassRefPtr<StorageNamespace> copy() = 0;
     51    virtual void close() = 0;
     52    virtual void unlock() = 0;
     53};
    5354
    5455} // namespace WebCore
  • trunk/WebKit/chromium/ChangeLog

    r53144 r53180  
     12010-01-11  Jeremy Orlow  <jorlow@chromium.org>
     2
     3        Reviewed by Darin Fisher.
     4
     5        [Chromium] Move getSessionStorageNamespace from WebKitClient to WebViewClient
     6        https://bugs.webkit.org/show_bug.cgi?id=33492
     7
     8        * public/WebKitClient.h:
     9        * public/WebViewClient.h:
     10        (WebKit::WebViewClient::getSessionStorageNamespace):
     11        * src/StorageNamespaceProxy.cpp:
     12        (WebCore::StorageNamespace::sessionStorageNamespace):
     13
    1142010-01-11  Darin Fisher  <darin@chromium.org>
    215
  • trunk/WebKit/chromium/public/WebKitClient.h

    r53001 r53180  
    9090
    9191    // Return a new SessionStorage namespace.
     92    // THIS IS DEPRECATED.  WebViewClient::getSessionStorageNamespace() is the new way to access this.
    9293    virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; }
    9394
  • trunk/WebKit/chromium/public/WebViewClient.h

    r50681 r53180  
    4949class WebNotificationPresenter;
    5050class WebRange;
     51class WebStorageNamespace;
    5152class WebURL;
    5253class WebView;
     
    7273    virtual WebWidget* createPopupMenu(const WebPopupMenuInfo&) { return 0; }
    7374
     75    // Create a session storage namespace associated with this WebView.
     76    virtual WebStorageNamespace* createSessionStorageNamespace() { return 0; }
    7477
    7578    // Misc ----------------------------------------------------------------
  • trunk/WebKit/chromium/src/StorageNamespaceProxy.cpp

    r50746 r53180  
    2929#if ENABLE(DOM_STORAGE)
    3030
     31#include "Chrome.h"
     32#include "ChromeClientImpl.h"
     33#include "Page.h"
    3134#include "SecurityOrigin.h"
    3235#include "StorageAreaProxy.h"
     
    3538#include "WebStorageNamespace.h"
    3639#include "WebString.h"
     40#include "WebViewClient.h"
     41#include "WebViewImpl.h"
    3742
    3843namespace WebCore {
     
    4348}
    4449
    45 PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace()
     50PassRefPtr<StorageNamespace> StorageNamespace::sessionStorageNamespace(Page* page)
    4651{
    47     return new StorageNamespaceProxy(WebKit::webKitClient()->createSessionStorageNamespace());
     52    WebKit::ChromeClientImpl* chromeClientImpl = static_cast<WebKit::ChromeClientImpl*>(page->chrome()->client());
     53    WebKit::WebViewClient* webViewClient = chromeClientImpl->webView()->client();
     54    return new StorageNamespaceProxy(webViewClient->createSessionStorageNamespace());
    4855}
    4956
Note: See TracChangeset for help on using the changeset viewer.