Source/WebCore: Use a platform strategy for local storage
[WebKit-https.git] / Source / WebKit / gtk / WebCoreSupport / PlatformStrategiesGtk.h
1 /*
2  * Copyright (C) 2012 Igalia S.L.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17  */
18
19 #ifndef PlatformStrategiesGtk_h
20 #define PlatformStrategiesGtk_h
21
22 #include "CookiesStrategy.h"
23 #include "DatabaseStrategy.h"
24 #include "LoaderStrategy.h"
25 #include "PasteboardStrategy.h"
26 #include "PlatformStrategies.h"
27 #include "PluginStrategy.h"
28 #include "SharedWorkerStrategy.h"
29 #include "StorageStrategy.h"
30 #include "VisitedLinkStrategy.h"
31
32 class PlatformStrategiesGtk : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::DatabaseStrategy, private WebCore::LoaderStrategy, private WebCore::PluginStrategy, private WebCore::SharedWorkerStrategy, private WebCore::StorageStrategy, private WebCore::VisitedLinkStrategy {
33 public:
34     static void initialize();
35
36 private:
37     PlatformStrategiesGtk();
38
39     // WebCore::PlatformStrategies
40     virtual WebCore::CookiesStrategy* createCookiesStrategy();
41     virtual WebCore::DatabaseStrategy* createDatabaseStrategy();
42     virtual WebCore::LoaderStrategy* createLoaderStrategy();
43     virtual WebCore::PasteboardStrategy* createPasteboardStrategy();
44     virtual WebCore::PluginStrategy* createPluginStrategy();
45     virtual WebCore::SharedWorkerStrategy* createSharedWorkerStrategy();
46     virtual WebCore::StorageStrategy* createStorageStrategy();
47     virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy();
48
49     // WebCore::CookiesStrategy
50     virtual String cookiesForDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
51     virtual void setCookiesFromDOM(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, const String&);
52     virtual bool cookiesEnabled(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
53     virtual String cookieRequestHeaderFieldValue(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&);
54     virtual bool getRawCookies(const WebCore::NetworkStorageSession&, const WebCore::KURL& firstParty, const WebCore::KURL&, Vector<WebCore::Cookie>&);
55     virtual void deleteCookie(const WebCore::NetworkStorageSession&, const WebCore::KURL&, const String&);
56
57     // WebCore::DatabaseStrategy
58     // - Using default implementation.
59
60     // WebCore::PluginStrategy
61     virtual void refreshPlugins();
62     virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&);
63
64     // WebCore::VisitedLinkStrategy
65     virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::KURL& baseURL, const WTF::AtomicString& attributeURL);
66     virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash);
67 };
68
69 #endif // PlatformStrategiesGtk_h