Commit 51fa263e authored by beidson@apple.com's avatar beidson@apple.com

https://bugs.webkit.org/show_bug.cgi?id=57069

Add WKIconDatabase api to the project files, and expose accessor on WKContext.

Reviewed by Darin Adler.

Project file stuffs:
* GNUmakefile.am:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:

* Shared/API/c/WKBase.h:
* UIProcess/API/C/WKAPICast.h:

* UIProcess/API/C/WKContext.cpp:
(WKContextGetIconDatabase):
* UIProcess/API/C/WKContext.h:

* UIProcess/API/C/WKIconDatabase.cpp: Added.
(WKIconDatabaseGetTypeID):
* UIProcess/API/C/WKIconDatabase.h: Added.

* UIProcess/WebContext.h:
(WebKit::WebContext::iconDatabase):



git-svn-id: svn://svn.chromium.org/blink/trunk@81928 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 45838c8d
2011-03-24 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
https://bugs.webkit.org/show_bug.cgi?id=57069
Add WKIconDatabase api to the project files, and expose accessor on WKContext.
Project file stuffs:
* GNUmakefile.am:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* Shared/API/c/WKBase.h:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetIconDatabase):
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKIconDatabase.cpp: Added.
(WKIconDatabaseGetTypeID):
* UIProcess/API/C/WKIconDatabase.h: Added.
* UIProcess/WebContext.h:
(WebKit::WebContext::iconDatabase):
2011-03-24 Brent Fulgham <bfulgham@webkit.org>
Build correction.
......
......@@ -321,6 +321,8 @@ libWebKit2_la_SOURCES = \
Source/WebKit2/UIProcess/API/C/WKFrame.h \
Source/WebKit2/UIProcess/API/C/WKFramePolicyListener.cpp \
Source/WebKit2/UIProcess/API/C/WKFramePolicyListener.h \
Source/WebKit2/UIProcess/API/C/WKIconDatabase.cpp \
Source/WebKit2/UIProcess/API/C/WKIconDatabase.h \
Source/WebKit2/UIProcess/API/C/WKInspector.cpp \
Source/WebKit2/UIProcess/API/C/WKInspector.h \
Source/WebKit2/UIProcess/API/C/WKKeyValueStorageManager.cpp \
......
......@@ -84,6 +84,7 @@ typedef const struct OpaqueWKFramePolicyListener* WKFramePolicyListenerRef;
typedef const struct OpaqueWKGeolocationManager* WKGeolocationManagerRef;
typedef const struct OpaqueWKGeolocationPermissionRequest* WKGeolocationPermissionRequestRef;
typedef const struct OpaqueWKGeolocationPosition* WKGeolocationPositionRef;
typedef const struct OpaqueWKIconDatabase* WKIconDatabaseRef;
typedef const struct OpaqueWKInspector* WKInspectorRef;
typedef const struct OpaqueWKKeyValueStorageManager* WKKeyValueStorageManagerRef;
typedef const struct OpaqueWKMediaCacheManager* WKMediaCacheManagerRef;
......
......@@ -59,6 +59,7 @@ class WebFramePolicyListenerProxy;
class WebFrameProxy;
class WebGeolocationManagerProxy;
class WebGeolocationPosition;
class WebIconDatabase;
class WebInspectorProxy;
class WebKeyValueStorageManagerProxy;
class WebMediaCacheManagerProxy;
......@@ -88,6 +89,7 @@ WK_ADD_API_MAPPING(WKFrameRef, WebFrameProxy)
WK_ADD_API_MAPPING(WKGeolocationManagerRef, WebGeolocationManagerProxy)
WK_ADD_API_MAPPING(WKGeolocationPermissionRequestRef, GeolocationPermissionRequestProxy)
WK_ADD_API_MAPPING(WKGeolocationPositionRef, WebGeolocationPosition)
WK_ADD_API_MAPPING(WKIconDatabaseRef, WebIconDatabase)
WK_ADD_API_MAPPING(WKKeyValueStorageManagerRef, WebKeyValueStorageManagerProxy)
WK_ADD_API_MAPPING(WKMediaCacheManagerRef, WebMediaCacheManagerProxy)
WK_ADD_API_MAPPING(WKNavigationDataRef, WebNavigationData)
......
......@@ -178,6 +178,11 @@ WKGeolocationManagerRef WKContextGetGeolocationManager(WKContextRef contextRef)
return toAPI(toImpl(contextRef)->geolocationManagerProxy());
}
WKIconDatabaseRef WKContextGetIconDatabase(WKContextRef contextRef)
{
return toAPI(toImpl(contextRef)->iconDatabase());
}
WKKeyValueStorageManagerRef WKContextGetKeyValueStorageManager(WKContextRef contextRef)
{
return toAPI(toImpl(contextRef)->keyValueStorageManagerProxy());
......
......@@ -133,6 +133,7 @@ WK_EXPORT WKApplicationCacheManagerRef WKContextGetApplicationCacheManager(WKCon
WK_EXPORT WKCookieManagerRef WKContextGetCookieManager(WKContextRef context);
WK_EXPORT WKDatabaseManagerRef WKContextGetDatabaseManager(WKContextRef context);
WK_EXPORT WKGeolocationManagerRef WKContextGetGeolocationManager(WKContextRef context);
WK_EXPORT WKIconDatabaseRef WKContextGetIconDatabase(WKContextRef context);
WK_EXPORT WKKeyValueStorageManagerRef WKContextGetKeyValueStorageManager(WKContextRef context);
WK_EXPORT WKMediaCacheManagerRef WKContextGetMediaCacheManager(WKContextRef context);
WK_EXPORT WKPluginSiteDataManagerRef WKContextGetPluginSiteDataManager(WKContextRef context);
......
/*
* Copyright (C) 2011 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "WKIconDatabase.h"
#include "WKAPICast.h"
#include "WebIconDatabase.h"
using namespace WebKit;
WKTypeID WKIconDatabaseGetTypeID()
{
return toAPI(WebIconDatabase::APIType);
}
/*
* Copyright (C) 2011 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef WKIconDatabase_h
#define WKIconDatabase_h
#include <WebKit2/WKBase.h>
#ifdef __cplusplus
extern "C" {
#endif
WK_EXPORT WKTypeID WKIconDatabaseGetTypeID();
#ifdef __cplusplus
}
#endif
#endif /* WKIconDatabase_h */
......@@ -145,6 +145,7 @@ public:
WebCookieManagerProxy* cookieManagerProxy() const { return m_cookieManagerProxy.get(); }
WebDatabaseManagerProxy* databaseManagerProxy() const { return m_databaseManagerProxy.get(); }
WebGeolocationManagerProxy* geolocationManagerProxy() const { return m_geolocationManagerProxy.get(); }
WebIconDatabase* iconDatabase() const { return m_iconDatabase.get(); }
WebKeyValueStorageManagerProxy* keyValueStorageManagerProxy() const { return m_keyValueStorageManagerProxy.get(); }
WebMediaCacheManagerProxy* mediaCacheManagerProxy() const { return m_mediaCacheManagerProxy.get(); }
WebPluginSiteDataManager* pluginSiteDataManager() const { return m_pluginSiteDataManager.get(); }
......@@ -155,7 +156,7 @@ public:
unsigned wkPageCount;
unsigned wkFrameCount;
};
static Statistics& statistics();
static Statistics& statistics();
void setDatabaseDirectory(const String& dir) { m_overrideDatabaseDirectory = dir; }
void setIconDatabasePath(const String&);
......
......@@ -276,6 +276,8 @@
51021E9C12B16788005C033C /* WebContextMenuClientMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51021E9B12B16788005C033C /* WebContextMenuClientMac.mm */; };
510FBB9A1288C95E00AFFDF4 /* WebContextMenuItemData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 510FBB981288C95E00AFFDF4 /* WebContextMenuItemData.cpp */; };
510FBB9B1288C95E00AFFDF4 /* WebContextMenuItemData.h in Headers */ = {isa = PBXBuildFile; fileRef = 510FBB991288C95E00AFFDF4 /* WebContextMenuItemData.h */; };
5110AE0C133C16CB0072717A /* WKIconDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5110AE0A133C16CB0072717A /* WKIconDatabase.cpp */; };
5110AE0D133C16CB0072717A /* WKIconDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 5110AE0B133C16CB0072717A /* WKIconDatabase.h */; settings = {ATTRIBUTES = (Public, ); }; };
511B24A6132E095700065A0C /* WebIconDatabaseProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511B24A4132E095700065A0C /* WebIconDatabaseProxy.cpp */; };
511B24A7132E095700065A0C /* WebIconDatabaseProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 511B24A5132E095700065A0C /* WebIconDatabaseProxy.h */; };
511B24AA132E097200065A0C /* WebIconDatabase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511B24A8132E097200065A0C /* WebIconDatabase.cpp */; };
......@@ -1146,6 +1148,8 @@
51021E9B12B16788005C033C /* WebContextMenuClientMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebContextMenuClientMac.mm; sourceTree = "<group>"; };
510FBB981288C95E00AFFDF4 /* WebContextMenuItemData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebContextMenuItemData.cpp; sourceTree = "<group>"; };
510FBB991288C95E00AFFDF4 /* WebContextMenuItemData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebContextMenuItemData.h; sourceTree = "<group>"; };
5110AE0A133C16CB0072717A /* WKIconDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKIconDatabase.cpp; sourceTree = "<group>"; };
5110AE0B133C16CB0072717A /* WKIconDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKIconDatabase.h; sourceTree = "<group>"; };
511B24A4132E095700065A0C /* WebIconDatabaseProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebIconDatabaseProxy.cpp; path = IconDatabase/WebIconDatabaseProxy.cpp; sourceTree = "<group>"; };
511B24A5132E095700065A0C /* WebIconDatabaseProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebIconDatabaseProxy.h; path = IconDatabase/WebIconDatabaseProxy.h; sourceTree = "<group>"; };
511B24A8132E097200065A0C /* WebIconDatabase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebIconDatabase.cpp; sourceTree = "<group>"; };
......@@ -2615,6 +2619,8 @@
BC06F44C12DBDF3F002D78DE /* WKGeolocationPermissionRequest.h */,
BC0E619712D6CD120012A72A /* WKGeolocationPosition.cpp */,
BC0E619612D6CD120012A72A /* WKGeolocationPosition.h */,
5110AE0A133C16CB0072717A /* WKIconDatabase.cpp */,
5110AE0B133C16CB0072717A /* WKIconDatabase.h */,
1C8E293812761E5B00BC7BD0 /* WKInspector.cpp */,
1C8E293712761E5B00BC7BD0 /* WKInspector.h */,
51A9E1081315CD18009E7031 /* WKKeyValueStorageManager.cpp */,
......@@ -3610,6 +3616,7 @@
33D3A3C91339617900709BE4 /* WebMediaCacheManagerMessages.h in Headers */,
33D3A3CB1339617900709BE4 /* WebMediaCacheManagerProxyMessages.h in Headers */,
C064504A133BE709003470E2 /* LayerTreeHostCA.h in Headers */,
5110AE0D133C16CB0072717A /* WKIconDatabase.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -4230,6 +4237,7 @@
5160BFE113381DF900918999 /* Logging.mac.mm in Sources */,
C0D74DDE133BE2D90089CD44 /* LayerTreeHostCA.cpp in Sources */,
C03A136C133BEBF900D767D1 /* LayerTreeHostCAMac.mm in Sources */,
5110AE0C133C16CB0072717A /* WKIconDatabase.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......
......@@ -2988,6 +2988,14 @@
RelativePath="..\UIProcess\API\C\WKGeolocationPosition.h"
>
</File>
<File
RelativePath="..\UIProcess\API\C\WKIconDatabase.cpp"
>
</File>
<File
RelativePath="..\UIProcess\API\C\WKIconDatabase.h"
>
</File>
<File
RelativePath="..\UIProcess\API\C\WKInspector.cpp"
>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment