Make a few icon database improvements
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2014 14:44:50 +0000 (14:44 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 13 May 2014 14:44:50 +0000 (14:44 +0000)
commit508fc4c5e5511a07eb1654185ea814003c31c0e5
treed7878ef925571d1e741cff52371f8501c2a249bd
parent1af99f152239a3943b3bb645f9d4d21ef3ad4c58
Make a few icon database improvements
https://bugs.webkit.org/show_bug.cgi?id=132812

Reviewed by Brady Eidson.

Source/WebCore:
* WebCore.exp.in: Export more IconDatabase functions, since they are now called
by WebKit2 through pointers to a class marked final.

* loader/icon/IconDatabase.cpp: Removed unneeded includes. Use override for
virtual functions.

* loader/icon/IconDatabase.h: Removed unneeded includes. Marked the class final.
Use override for virtual functions. Use a public constructor instead of a create
function.

* loader/icon/IconDatabaseBase.h: Removed unneeded includes.

Source/WebKit2:
* UIProcess/API/C/WKIconDatabase.cpp:
(WKIconDatabaseCopyIconDataForPageURL): Moved the actual implementation of this
out of the bindings into the WebIconDatabase class.

* UIProcess/API/C/WKIconDatabase.h: Fixed argument names that were inconsistent.

* UIProcess/WebIconDatabase.cpp: Removed unneeded includes.
(WebKit::WebIconDatabase::create): Pass a reference instead of a pointer.
(WebKit::WebIconDatabase::WebIconDatabase): Take a reference instead of a pointer.
(WebKit::WebIconDatabase::invalidate): Use nullptr.
(WebKit::WebIconDatabase::setDatabasePath): Use make_unique.
(WebKit::WebIconDatabase::setIconDataForIconURL): Removed unneeded local variable.
(WebKit::WebIconDatabase::imageForPageURL): Use nullptr.
(WebKit::WebIconDatabase::nativeImageForPageURL): Ditto.
(WebKit::WebIconDatabase::didFinishURLImport): Use a modern for loop.
(WebKit::WebIconDatabase::iconDataForPageURL): Added. Moved this here from
WKIconDatabase.cpp, but also changed to use createWithoutCopying to avoid making
another copy of the data for each icon.

* UIProcess/WebIconDatabase.h: Removed unneeded includes. Derive from
IconDatabaseClient privately. Use nullptr. Added iconDataForPageURL member
function. Use a reference for the constructor argument. Use override for
virtual functions. Use unique_ptr instead of OwnPtr.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/loader/icon/IconDatabase.cpp
Source/WebCore/loader/icon/IconDatabase.h
Source/WebCore/loader/icon/IconDatabaseBase.h
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/C/WKIconDatabase.cpp
Source/WebKit2/UIProcess/API/C/WKIconDatabase.h
Source/WebKit2/UIProcess/WebIconDatabase.cpp
Source/WebKit2/UIProcess/WebIconDatabase.h