Changeset 141648 in webkit


Ignore:
Timestamp:
Feb 1, 2013 2:56:20 PM (11 years ago)
Author:
andersca@apple.com
Message:

More work on UI side storage
https://bugs.webkit.org/show_bug.cgi?id=108700

Reviewed by Sam Weinig.

  • DerivedSources.make:

Add StorageManager.messages.in.

  • Platform/CoreIPC/HandleMessage.h:

(CoreIPC::callMemberFunction):
Add new overload.

  • UIProcess/Storage/StorageManager.cpp:

(WebKit::StorageManager::didReceiveMessageOnConnectionWorkQueue):
Call the right function.

(WebKit::StorageManager::createStorageArea):
(WebKit::StorageManager::destroyStorageArea):
Add stubs.

  • UIProcess/Storage/StorageManager.messages.in: Added.

Add new messages files.

  • WebKit2.xcodeproj/project.pbxproj:

Add new files.

  • WebProcess/Storage/StorageAreaProxy.cpp:

(WebKit::StorageAreaProxy::~StorageAreaProxy):
Add another FIXME.

(WebKit::StorageAreaProxy::canAccessStorage):
(WebKit::StorageAreaProxy::incrementAccessCount):
(WebKit::StorageAreaProxy::decrementAccessCount):
Implement these.

Location:
trunk/Source/WebKit2
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r141640 r141648  
     12013-02-01  Anders Carlsson  <andersca@apple.com>
     2
     3        More work on UI side storage
     4        https://bugs.webkit.org/show_bug.cgi?id=108700
     5
     6        Reviewed by Sam Weinig.
     7
     8        * DerivedSources.make:
     9        Add StorageManager.messages.in.
     10
     11        * Platform/CoreIPC/HandleMessage.h:
     12        (CoreIPC::callMemberFunction):
     13        Add new overload.
     14
     15        * UIProcess/Storage/StorageManager.cpp:
     16        (WebKit::StorageManager::didReceiveMessageOnConnectionWorkQueue):
     17        Call the right function.
     18
     19        (WebKit::StorageManager::createStorageArea):
     20        (WebKit::StorageManager::destroyStorageArea):
     21        Add stubs.
     22
     23        * UIProcess/Storage/StorageManager.messages.in: Added.
     24        Add new messages files.
     25
     26        * WebKit2.xcodeproj/project.pbxproj:
     27        Add new files.
     28
     29        * WebProcess/Storage/StorageAreaProxy.cpp:
     30        (WebKit::StorageAreaProxy::~StorageAreaProxy):
     31        Add another FIXME.
     32
     33        (WebKit::StorageAreaProxy::canAccessStorage):
     34        (WebKit::StorageAreaProxy::incrementAccessCount):
     35        (WebKit::StorageAreaProxy::decrementAccessCount):
     36        Implement these.
     37
    1382013-02-01  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
    239
  • trunk/Source/WebKit2/DerivedSources.make

    r141335 r141648  
    5454    $(WebKit2)/UIProcess/Plugins \
    5555    $(WebKit2)/UIProcess/SharedWorkers \
     56    $(WebKit2)/UIProcess/Storage \
    5657    $(WebKit2)/UIProcess/mac \
    5758#
     
    7677    SharedWorkerProcess \
    7778    SharedWorkerProcessProxy \
     79    StorageManager \
    7880    WebApplicationCacheManager \
    7981    WebApplicationCacheManagerProxy \
  • trunk/Source/WebKit2/Platform/CoreIPC/HandleMessage.h

    r132926 r141648  
    236236}
    237237
     238template<typename C, typename MF, typename P1, typename P2, typename P3>
     239void callMemberFunction(Connection* connection, const Arguments3<P1, P2, P3>& args, C* object, MF function)
     240{
     241    (object->*function)(connection, args.argument1, args.argument2, args.argument3);
     242}
     243
    238244template<typename C, typename MF, typename P1, typename P2, typename P3, typename P4>
    239245void callMemberFunction(Connection* connection, const Arguments4<P1, P2, P3, P4>& args, C* object, MF function)
  • trunk/Source/WebKit2/UIProcess/Storage/StorageManager.cpp

    r141510 r141648  
    2727#include "StorageManager.h"
    2828
     29#include "StorageManagerMessages.h"
     30
    2931namespace WebKit {
    3032
     
    4244}
    4345
     46void StorageManager::didReceiveMessageOnConnectionWorkQueue(CoreIPC::Connection* connection, CoreIPC::MessageDecoder& decoder, bool& didHandleMessage)
     47{
     48    if (decoder.messageReceiverName() == Messages::StorageManager::messageReceiverName())
     49        didReceiveStorageManagerMessageOnConnectionWorkQueue(connection, decoder, didHandleMessage);
     50}
     51
     52void StorageManager::createStorageArea(CoreIPC::Connection*, uint64_t storageAreaID, uint64_t storageNamespaceID, const SecurityOriginData&)
     53{
     54}
     55
     56void StorageManager::destroyStorageArea(CoreIPC::Connection*, uint64_t storageAreaID)
     57{
     58}
     59
    4460} // namespace WebKit
  • trunk/Source/WebKit2/UIProcess/Storage/StorageManager.h

    r141510 r141648  
    2727#define StorageManager_h
    2828
     29#include "Connection.h"
    2930#include <wtf/PassRefPtr.h>
    3031#include <wtf/ThreadSafeRefCounted.h>
    3132
    3233namespace WebKit {
     34struct SecurityOriginData;
    3335
    34 class StorageManager : public ThreadSafeRefCounted<StorageManager> {
     36class StorageManager : public ThreadSafeRefCounted<StorageManager>, public CoreIPC::Connection::QueueClient {
    3537public:
    3638    static PassRefPtr<StorageManager> create();
     
    3941private:
    4042    StorageManager();
     43
     44    // CoreIPC::Connection::QueueClient.
     45    virtual void didReceiveMessageOnConnectionWorkQueue(CoreIPC::Connection*, CoreIPC::MessageDecoder&, bool& didHandleMessage) OVERRIDE;
     46
     47    void didReceiveStorageManagerMessageOnConnectionWorkQueue(CoreIPC::Connection*, CoreIPC::MessageDecoder&, bool& didHandleMessage);
     48
     49    // Message handlers.
     50    void createStorageArea(CoreIPC::Connection*, uint64_t storageAreaID, uint64_t storageNamespaceID, const SecurityOriginData&);
     51    void destroyStorageArea(CoreIPC::Connection*, uint64_t storageAreaID);
    4152};
    4253
  • trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r141473 r141648  
    229229                1AB16AED164B41E400290D62 /* RemoteGraphicsLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AB16AEB164B41E400290D62 /* RemoteGraphicsLayer.mm */; };
    230230                1AB16AEE164B41E400290D62 /* RemoteGraphicsLayer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB16AEC164B41E400290D62 /* RemoteGraphicsLayer.h */; };
     231                1AB31A9616BC688100F6DBC9 /* StorageManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AB31A9416BC688100F6DBC9 /* StorageManagerMessageReceiver.cpp */; };
     232                1AB31A9716BC688100F6DBC9 /* StorageManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB31A9516BC688100F6DBC9 /* StorageManagerMessages.h */; };
    231233                1AB7D4CA1288AAA700CFD08C /* DownloadProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 1AB7D4C81288AAA700CFD08C /* DownloadProxy.h */; };
    232234                1AB7D4CB1288AAA700CFD08C /* DownloadProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AB7D4C91288AAA700CFD08C /* DownloadProxy.cpp */; };
     
    15181520                1AB16AEB164B41E400290D62 /* RemoteGraphicsLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteGraphicsLayer.mm; sourceTree = "<group>"; };
    15191521                1AB16AEC164B41E400290D62 /* RemoteGraphicsLayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteGraphicsLayer.h; sourceTree = "<group>"; };
     1522                1AB31A9316BC65AB00F6DBC9 /* StorageManager.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = StorageManager.messages.in; sourceTree = "<group>"; };
     1523                1AB31A9416BC688100F6DBC9 /* StorageManagerMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StorageManagerMessageReceiver.cpp; path = StorageManagerMessageReceiver.cpp; sourceTree = "<group>"; };
     1524                1AB31A9516BC688100F6DBC9 /* StorageManagerMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StorageManagerMessages.h; path = StorageManagerMessages.h; sourceTree = "<group>"; };
    15201525                1AB7D4C81288AAA700CFD08C /* DownloadProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadProxy.h; sourceTree = "<group>"; };
    15211526                1AB7D4C91288AAA700CFD08C /* DownloadProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DownloadProxy.cpp; sourceTree = "<group>"; };
     
    27572762                                1A44B95916B73F9F00B7BBD8 /* StorageManager.cpp */,
    27582763                                1A44B95A16B73F9F00B7BBD8 /* StorageManager.h */,
     2764                                1AB31A9316BC65AB00F6DBC9 /* StorageManager.messages.in */,
    27592765                        );
    27602766                        path = Storage;
     
    46414647                                E1EDFDB31628AD730039ECDA /* SharedWorkerProcessProxyMessageReceiver.cpp */,
    46424648                                E1EDFDB41628AD730039ECDA /* SharedWorkerProcessProxyMessages.h */,
     4649                                1AB31A9416BC688100F6DBC9 /* StorageManagerMessageReceiver.cpp */,
     4650                                1AB31A9516BC688100F6DBC9 /* StorageManagerMessages.h */,
    46434651                                512E3568130B57F000ABD19A /* WebApplicationCacheManagerMessageReceiver.cpp */,
    46444652                                512E3569130B57F000ABD19A /* WebApplicationCacheManagerMessages.h */,
     
    53585366                                A5EFD38C16B0E88C00B2F0E8 /* WKPageVisibilityTypes.h in Headers */,
    53595367                                1AC4C82916B876A90069DCCD /* MessageFlags.h in Headers */,
     5368                                1AB31A9716BC688100F6DBC9 /* StorageManagerMessages.h in Headers */,
    53605369                        );
    53615370                        runOnlyForDeploymentPostprocessing = 0;
     
    64796488                                BC82844D16B5081C00A278FE /* PluginServiceEntryPoint.mm in Sources */,
    64806489                                BCBECDE716B6416800047A1A /* XPCServiceEntryPoint.mm in Sources */,
     6490                                1AB31A9616BC688100F6DBC9 /* StorageManagerMessageReceiver.cpp in Sources */,
    64816491                        );
    64826492                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Source/WebKit2/WebProcess/Storage/StorageAreaProxy.cpp

    r140756 r141648  
    2727#include "StorageAreaProxy.h"
    2828
     29#include <WebCore/Frame.h>
    2930#include <WebCore/SecurityOrigin.h>
    3031
     
    4546StorageAreaProxy::~StorageAreaProxy()
    4647{
     48    // FIXME: Implement.
    4749}
    4850
     
    9395}
    9496
    95 bool StorageAreaProxy::canAccessStorage(Frame*) const
     97bool StorageAreaProxy::canAccessStorage(Frame* frame) const
    9698{
    97     // FIXME: Implement this.
    98     ASSERT_NOT_REACHED();
    99     return false;
     99    return frame && frame->page();
    100100}
    101101
     
    109109void StorageAreaProxy::incrementAccessCount()
    110110{
    111     // FIXME: Implement this.
    112     ASSERT_NOT_REACHED();
     111    // Storage access is handled in the UI process, so there's nothing to do here.
    113112}
    114113
    115114void StorageAreaProxy::decrementAccessCount()
    116115{
    117     // FIXME: Implement this.
    118     ASSERT_NOT_REACHED();
     116    // Storage access is handled in the UI process, so there's nothing to do here.
    119117}
    120118
Note: See TracChangeset for help on using the changeset viewer.