[EFL][WK2] Refactor favicon database APIs
authorryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 May 2014 08:08:28 +0000 (08:08 +0000)
committerryuan.choi@samsung.com <ryuan.choi@samsung.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 May 2014 08:08:28 +0000 (08:08 +0000)
commit9148b45290f0cdc9c0c02cb38ba840a78c9521a8
tree2f9196894f1fe1e9f8d11a9ae043c6e70380795b
parent651c5329ea9e7e443679319f214c54d2d63b9990
[EFL][WK2] Refactor favicon database APIs
https://bugs.webkit.org/show_bug.cgi?id=132519

Reviewed by Gyuyoung Kim.

Source/WebKit2:
ewebkit2 has two options to get favicon.

The first option is ewk_view_favicon_get with "favicon,changed" signal.
It's simple to use but it always adds the callback to EwkView although applications does not use favicon.

The other option is ewk_favicon_database_icon_get with ewk_favicon_database_icon_change_callback_add API.
But the callback doesn't have information about Ewk_Favicon_Database to call ewk_favicon_database_icon_get.

This patch removed ewk_view_favicon_get and "favicon,changed" signal.
In addition, improved ewk_favicon_database_icon_change_callback.

* UIProcess/API/efl/EwkView.cpp: Remove ewk_favicon_database related code.
(EwkView::EwkView):
(EwkView::~EwkView):
(EwkView::informURLChange):
(EwkView::handleFaviconChanged):
(EwkView::createFavicon): Deleted.
* UIProcess/API/efl/EwkViewCallbacks.h:
* UIProcess/API/efl/ewk_favicon_database.cpp:
(EwkFaviconDatabase::iconDataReadyForPageURL):
(EwkFaviconDatabase::didChangeIconForPageURL): Deleted. dead code.
* UIProcess/API/efl/ewk_favicon_database.h:
Refactor Ewk_Favicon_Database_Icon_Change_Cb and improve doxygen.
* UIProcess/API/efl/ewk_favicon_database_private.h:
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_favicon_get): Deleted.
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
(EWK2FaviconDatabaseTest::requestFaviconData):
(TEST_F):

Tools:
* MiniBrowser/efl/main.c: Use ewk_favicon_database_icon_get instead of ewk_view_favicon_get.
(update_view_favicon):
(on_icon_changed_cb):
(window_free):
(on_url_changed):
(window_create):
(on_view_favicon_changed): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168265 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/efl/EwkView.cpp
Source/WebKit2/UIProcess/API/efl/EwkView.h
Source/WebKit2/UIProcess/API/efl/EwkViewCallbacks.h
Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.cpp
Source/WebKit2/UIProcess/API/efl/ewk_favicon_database.h
Source/WebKit2/UIProcess/API/efl/ewk_favicon_database_private.h
Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
Source/WebKit2/UIProcess/API/efl/ewk_view.h
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp
Tools/ChangeLog
Tools/MiniBrowser/efl/main.c