https://bugs.webkit.org/show_bug.cgi?id=56425
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Mar 2011 02:15:52 +0000 (02:15 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Mar 2011 02:15:52 +0000 (02:15 +0000)
commitdae94375cf4d0578a79f2441361d903c92841aca
treedb62ea9e58c4252ebb5b018e55253c4d4630bc19
parent5402cb79ea1c190ddfc6f8ef5291722770d3c188
https://bugs.webkit.org/show_bug.cgi?id=56425
WebKit2 icon database.

Reviewed by Sam Weinig.

../WebCore:

* WebCore.exp.in:

../WebKit2:

Project file paperwork:
* DerivedSources.make:
* DerivedSources.pro:
* GNUmakefile.am:
* WebKit2.pri:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* win/WebKit2.vcproj:
* win/WebKit2Common.vsprops:
* Scripts/webkit2/messages.py: Special-case capitalization for messages that start with "URL" to be lowercased
  to "url" instead of "uRL".

Add messaging-related stuff:
* Platform/CoreIPC/MessageID.h:
* UIProcess/WebIconDatabase.messages.in: Added.
* WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in: Added.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didReceiveMessage):
(WebKit::WebProcessProxy::didReceiveSyncMessage):

Prep to make WebIconDatabase an API object:
* Shared/APIObject.h:

Add an "icon DB is enabled" flag to WebProcessCreationParameters:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:

Add SPI for client apps to set the icon database path:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetIconDatabasePath):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/WebContext.h:
(WebKit::WebContext::setIconDatabasePath):

Hook up initialization, clearing, and messaging for the icon database:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::~WebContext):
(WebKit::WebContext::ensureWebProcess):
(WebKit::WebContext::didReceiveMessage):
(WebKit::WebContext::didReceiveSyncMessage):
(WebKit::WebContext::iconDatabasePath):
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultIconDatabasePath):
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultIconDatabasePath):
* UIProcess/qt/WebContextQt.cpp:
(WebKit::WebContext::platformDefaultIconDatabasePath):
* UIProcess/win/WebContextWin.cpp:
(WebKit::WebContext::platformDefaultIconDatabasePath):

Add the UIProcess-side IconDatabase. It will be the "actual database" as well as the API object:
* UIProcess/WebIconDatabase.cpp: Added.
(WebKit::WebIconDatabase::create):
(WebKit::WebIconDatabase::~WebIconDatabase):
(WebKit::WebIconDatabase::WebIconDatabase):
(WebKit::WebIconDatabase::invalidate):
(WebKit::WebIconDatabase::retainIconForPageURL):
(WebKit::WebIconDatabase::releaseIconForPageURL):
(WebKit::WebIconDatabase::setIconURLForPageURL):
(WebKit::WebIconDatabase::setIconDataForIconURL):
(WebKit::WebIconDatabase::iconDataForPageURL):
(WebKit::WebIconDatabase::iconURLForPageURL):
(WebKit::WebIconDatabase::iconDataKnownForIconURL):
(WebKit::WebIconDatabase::loadDecisionForIconURL):
(WebKit::WebIconDatabase::didReceiveMessage):
(WebKit::WebIconDatabase::didReceiveSyncMessage):
* UIProcess/WebIconDatabase.h: Added.
(WebKit::WebIconDatabase::clearContext):
(WebKit::WebIconDatabase::type):

Add the WebProcess-side IconDatabaseProxy. It acts as the WebCore IconDatabase and operates via messaging:
* WebProcess/IconDatabase: Added.
* WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: Added.
(WebKit::WebIconDatabaseProxy::~WebIconDatabaseProxy):
(WebKit::WebIconDatabaseProxy::WebIconDatabaseProxy):
(WebKit::WebIconDatabaseProxy::isEnabled):
(WebKit::WebIconDatabaseProxy::setEnabled):
(WebKit::WebIconDatabaseProxy::iconForPageURL):
(WebKit::WebIconDatabaseProxy::retainIconForPageURL):
(WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
(WebKit::WebIconDatabaseProxy::iconURLForPageURL):
(WebKit::WebIconDatabaseProxy::iconDataKnownForIconURL):
(WebKit::WebIconDatabaseProxy::loadDecisionForIconURL):
(WebKit::WebIconDatabaseProxy::setIconURLForPageURL):
(WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
(WebKit::WebIconDatabaseProxy::urlImportFinished):
(WebKit::WebIconDatabaseProxy::didReceiveMessage):
* WebProcess/IconDatabase/WebIconDatabaseProxy.h: Added.

Hook up initialization and messaging for the icon database proxy:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::didReceiveMessage):
* WebProcess/WebProcess.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@81208 268f45cc-cd09-0410-ab3c-d52691b4dbfc
33 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebKit2/ChangeLog
Source/WebKit2/DerivedSources.make
Source/WebKit2/DerivedSources.pro
Source/WebKit2/GNUmakefile.am
Source/WebKit2/Platform/CoreIPC/MessageID.h
Source/WebKit2/Scripts/webkit2/messages.py
Source/WebKit2/Shared/APIObject.h
Source/WebKit2/Shared/WebProcessCreationParameters.cpp
Source/WebKit2/Shared/WebProcessCreationParameters.h
Source/WebKit2/UIProcess/API/C/WKContext.cpp
Source/WebKit2/UIProcess/API/C/WKContextPrivate.h
Source/WebKit2/UIProcess/WebContext.cpp
Source/WebKit2/UIProcess/WebContext.h
Source/WebKit2/UIProcess/WebIconDatabase.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/WebIconDatabase.h [new file with mode: 0644]
Source/WebKit2/UIProcess/WebIconDatabase.messages.in [new file with mode: 0644]
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Source/WebKit2/UIProcess/gtk/WebContextGtk.cpp
Source/WebKit2/UIProcess/mac/WebContextMac.mm
Source/WebKit2/UIProcess/qt/WebContextQt.cpp
Source/WebKit2/UIProcess/win/WebContextWin.cpp
Source/WebKit2/WebKit2.pri
Source/WebKit2/WebKit2.pro
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/IconDatabase/WebIconDatabaseProxy.cpp [new file with mode: 0644]
Source/WebKit2/WebProcess/IconDatabase/WebIconDatabaseProxy.h [new file with mode: 0644]
Source/WebKit2/WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in [new file with mode: 0644]
Source/WebKit2/WebProcess/WebProcess.cpp
Source/WebKit2/WebProcess/WebProcess.h
Source/WebKit2/win/WebKit2.vcproj
Source/WebKit2/win/WebKit2Common.vsprops