WebApplicationCacheManagerProxy.h [plain text]
#ifndef WebApplicationCacheManagerProxy_h
#define WebApplicationCacheManagerProxy_h
#include "APIObject.h"
#include "GenericCallback.h"
#include "ImmutableArray.h"
#include "MessageReceiver.h"
#include "WebContextSupplement.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
#include <wtf/Vector.h>
namespace CoreIPC {
class Connection;
}
namespace WebKit {
class WebSecurityOrigin;
struct SecurityOriginData;
typedef GenericCallback<WKArrayRef> ArrayCallback;
class WebApplicationCacheManagerProxy : public TypedAPIObject<APIObject::TypeApplicationCacheManager>, public WebContextSupplement, private CoreIPC::MessageReceiver {
public:
static const char* supplementName();
static PassRefPtr<WebApplicationCacheManagerProxy> create(WebContext*);
virtual ~WebApplicationCacheManagerProxy();
void getApplicationCacheOrigins(PassRefPtr<ArrayCallback>);
void deleteEntriesForOrigin(WebSecurityOrigin*);
void deleteAllEntries();
using APIObject::ref;
using APIObject::deref;
private:
explicit WebApplicationCacheManagerProxy(WebContext*);
void didGetApplicationCacheOrigins(const Vector<SecurityOriginData>&, uint64_t callbackID);
virtual void contextDestroyed() OVERRIDE;
virtual void processDidClose(WebProcessProxy*) OVERRIDE;
virtual bool shouldTerminate(WebProcessProxy*) const OVERRIDE;
virtual void refWebContextSupplement() OVERRIDE;
virtual void derefWebContextSupplement() OVERRIDE;
virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
HashMap<uint64_t, RefPtr<ArrayCallback>> m_arrayCallbacks;
};
}
#endif // WebApplicationCacheManagerProxy_h