summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2013-09-13 12:51:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-19 20:50:05 +0200
commitd441d6f39bb846989d95bcf5caf387b42414718d (patch)
treee367e64a75991c554930278175d403c072de6bb8 /Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h
parent0060b2994c07842f4c59de64b5e3e430525c4b90 (diff)
downloadqtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit. Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h')
-rw-r--r--Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h27
1 files changed, 14 insertions, 13 deletions
diff --git a/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h b/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h
index 7c695fcbb..c8abbe400 100644
--- a/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h
+++ b/Source/WebKit2/UIProcess/WebDatabaseManagerProxy.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -33,6 +33,7 @@
#include "GenericCallback.h"
#include "MessageReceiver.h"
#include "OriginAndDatabases.h"
+#include "WebContextSupplement.h"
#include "WebDatabaseManagerProxyClient.h"
#include <wtf/HashMap.h>
#include <wtf/PassRefPtr.h>
@@ -45,16 +46,13 @@ class WebSecurityOrigin;
typedef GenericCallback<WKArrayRef> ArrayCallback;
-class WebDatabaseManagerProxy : public APIObject, private CoreIPC::MessageReceiver {
+class WebDatabaseManagerProxy : public TypedAPIObject<APIObject::TypeDatabaseManager>, public WebContextSupplement, private CoreIPC::MessageReceiver {
public:
- static const Type APIType = TypeDatabaseManager;
+ static const char* supplementName();
static PassRefPtr<WebDatabaseManagerProxy> create(WebContext*);
virtual ~WebDatabaseManagerProxy();
- void invalidate();
- void clearContext() { m_webContext = 0; }
-
void initializeClient(const WKDatabaseManagerClient*);
void getDatabasesByOrigin(PassRefPtr<ArrayCallback>);
@@ -73,16 +71,21 @@ public:
static String databaseDetailsExpectedUsageKey();
static String databaseDetailsCurrentUsageKey();
- bool shouldTerminate(WebProcessProxy*) const;
+ using APIObject::ref;
+ using APIObject::deref;
private:
explicit WebDatabaseManagerProxy(WebContext*);
- virtual Type type() const { return APIType; }
+ // WebContextSupplement
+ virtual void contextDestroyed() OVERRIDE;
+ virtual void processDidClose(WebProcessProxy*) OVERRIDE;
+ virtual bool shouldTerminate(WebProcessProxy*) const OVERRIDE;
+ virtual void refWebContextSupplement() OVERRIDE;
+ virtual void derefWebContextSupplement() OVERRIDE;
// CoreIPC::MessageReceiver
- virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&) OVERRIDE;
- void didReceiveWebDatabaseManagerProxyMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::MessageDecoder&);
+ virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageDecoder&) OVERRIDE;
// Message handlers.
void didGetDatabasesByOrigin(const Vector<OriginAndDatabases>& originAndDatabases, uint64_t callbackID);
@@ -90,9 +93,7 @@ private:
void didModifyOrigin(const String& originIdentifier);
void didModifyDatabase(const String& originIdentifier, const String& databaseIdentifier);
- WebContext* m_webContext;
- HashMap<uint64_t, RefPtr<ArrayCallback> > m_arrayCallbacks;
-
+ HashMap<uint64_t, RefPtr<ArrayCallback>> m_arrayCallbacks;
WebDatabaseManagerProxyClient m_client;
};