[EFL] Add message APIs to communicate between ewk_context and extensions
authorryuan.choi@navercorp.com <ryuan.choi@navercorp.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Feb 2015 11:02:14 +0000 (11:02 +0000)
committerryuan.choi@navercorp.com <ryuan.choi@navercorp.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Feb 2015 11:02:14 +0000 (11:02 +0000)
commit4367e308a2bb3529469ac098a2c940db0dd1f34b
treef6646c005400aa907272fb8b73f6283faaf05f6f
parentafd007bdf17fc01cd7d45aa443cab007893810f2
[EFL] Add message APIs to communicate between ewk_context and extensions
https://bugs.webkit.org/show_bug.cgi?id=137660

Reviewed by Gyuyoung Kim.

* PlatformEfl.cmake: Added dependencies for ewk2UnitTestExtensionSample
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
(EwkContext::didReceiveMessageFromInjectedBundle):
(EwkContext::setMessageFromExtensionCallback):
(EwkContext::processReceivedMessageFromInjectedBundle):
(ewk_context_message_post_to_extensions):
(ewk_context_message_from_extensions_callback_set):
(EwkContext::didReceiveSynchronousMessageFromInjectedBundle):
Deleted to split synchronouse message APIs from asynchronuous message APIs.
ewebkit will not support this until there are requirements.
(EwkContext::setMessageFromInjectedBundleCallback): Renamed to setMessageFromExtensionCallback.
(ewk_context_message_post_to_injected_bundle): Renamed to ewk_context_message_post_to_extensions.
(ewk_context_message_from_injected_bundle_callback_set): Renamed to ewk_context_message_from_injected_bundle_callback_set.
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
Improved test case for ewk_context_new_with_extensions_path using the message APIs.
(EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase):
(EWK2UnitTest::EWK2UnitTestBase::SetUp):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
(EWK2UnitTest::EWK2UnitTestEnvironment::extensionSample): Deleted.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
* UIProcess/API/efl/tests/extensions/extension_sample.cpp:
Improved test case for ewk_context_new_with_extensions_path using the message APIs.
* UIProcess/API/efl/tests/test_ewk2_context.cpp: Ditto.
(EWK2ContextTestWithExtension::messageReceivedCallback):
(EWK2ContextTestWithExtension::EWK2ContextTestWithExtension):
(TEST_F):
* WebProcess/InjectedBundle/API/efl/ewk_extension.cpp:
(toEwkExtendion):
(EwkExtension::EwkExtension):
(EwkExtension::didCreatePage):
(EwkExtension::willDestroyPage):
(EwkExtension::didReceiveMessage):
(EwkExtension::didReceiveMessageToPage):
(ewk_extension_message_post): Implemented to post message to ewk_context.
* WebProcess/InjectedBundle/API/efl/ewk_extension.h:
* WebProcess/InjectedBundle/API/efl/ewk_extension_private.h:
(EwkExtension::bundle):
* WebProcess/efl/ExtensionManagerEfl.cpp:
(WebKit::ExtensionManagerEfl::initialize):
Fixed the bug when there are different shared objects in extension path.
This is spotted while improving test case.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformEfl.cmake
Source/WebKit2/UIProcess/API/efl/ewk_context.cpp
Source/WebKit2/UIProcess/API/efl/ewk_context.h
Source/WebKit2/UIProcess/API/efl/ewk_context_private.h
Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp
Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h
Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp
Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h
Source/WebKit2/UIProcess/API/efl/tests/extensions/extension_sample.cpp
Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/efl/ewk_extension.cpp
Source/WebKit2/WebProcess/InjectedBundle/API/efl/ewk_extension.h
Source/WebKit2/WebProcess/InjectedBundle/API/efl/ewk_extension_private.h
Source/WebKit2/WebProcess/efl/ExtensionManagerEfl.cpp