Title: [185552] trunk/Source/WebKit2
Revision
185552
Author
[email protected]
Date
2015-06-15 08:43:43 -0700 (Mon, 15 Jun 2015)

Log Message

[EFL] Make send/receive messages to communicate the Web and UI Processes using Injected Bundle.
https://bugs.webkit.org/show_bug.cgi?id=145685

Patch by Hyungwook Lee <[email protected]> on 2015-06-15
Reviewed by Gyuyoung Kim.

To have extensible port specific API facility using Injected Bundle,
we need to load libewebkit_extension_manager.so in default that is same as what gtk port does.

* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
(EwkContext::~EwkContext):
(EwkContext::findOrCreateWrapper):
(bundlePathForExtension):
(EwkContext::create): Deleted.
* UIProcess/API/efl/ewk_context_private.h:
* WebProcess/efl/ExtensionManagerEfl.cpp:
(WebKit::ExtensionManagerEfl::initialize):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (185551 => 185552)


--- trunk/Source/WebKit2/ChangeLog	2015-06-15 15:34:02 UTC (rev 185551)
+++ trunk/Source/WebKit2/ChangeLog	2015-06-15 15:43:43 UTC (rev 185552)
@@ -1,3 +1,23 @@
+2015-06-15  Hyungwook Lee  <[email protected]>
+
+        [EFL] Make send/receive messages to communicate the Web and UI Processes using Injected Bundle.
+        https://bugs.webkit.org/show_bug.cgi?id=145685
+
+        Reviewed by Gyuyoung Kim.
+
+        To have extensible port specific API facility using Injected Bundle,
+        we need to load libewebkit_extension_manager.so in default that is same as what gtk port does.
+
+        * UIProcess/API/efl/ewk_context.cpp:
+        (EwkContext::EwkContext):
+        (EwkContext::~EwkContext):
+        (EwkContext::findOrCreateWrapper):
+        (bundlePathForExtension):
+        (EwkContext::create): Deleted.
+        * UIProcess/API/efl/ewk_context_private.h:
+        * WebProcess/efl/ExtensionManagerEfl.cpp:
+        (WebKit::ExtensionManagerEfl::initialize):
+
 2015-06-15  Carlos Garcia Campos  <[email protected]>
 
         [SOUP] Move WebKitSoupRequestGeneric to platform layer

Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp (185551 => 185552)


--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp	2015-06-15 15:34:02 UTC (rev 185551)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp	2015-06-15 15:43:43 UTC (rev 185552)
@@ -99,17 +99,15 @@
     m_callbackForMessageFromExtension.callback = nullptr;
     m_callbackForMessageFromExtension.userData = nullptr;
 
-    if (!extensionsPath.isEmpty()) {
-        WKContextInjectedBundleClientV1 client;
-        memset(&client, 0, sizeof(client));
+    WKContextInjectedBundleClientV1 client;
+    memset(&client, 0, sizeof(client));
 
-        client.base.version = 1;
-        client.base.clientInfo = this;
-        client.didReceiveMessageFromInjectedBundle = didReceiveMessageFromInjectedBundle;
-        client.getInjectedBundleInitializationUserData = getInjectedBundleInitializationUserData;
+    client.base.version = 1;
+    client.base.clientInfo = this;
+    client.didReceiveMessageFromInjectedBundle = didReceiveMessageFromInjectedBundle;
+    client.getInjectedBundleInitializationUserData = getInjectedBundleInitializationUserData;
 
-        WKContextSetInjectedBundleClient(m_context.get(), &client.base);
-    }
+    WKContextSetInjectedBundleClient(m_context.get(), &client.base);
 }
 
 EwkContext::~EwkContext()
@@ -130,11 +128,6 @@
     return adoptRef(new EwkContext(context));
 }
 
-PassRefPtr<EwkContext> EwkContext::create()
-{
-    return adoptRef(new EwkContext(adoptWK(WKContextCreate()).get()));
-}
-
 static String bundlePathForExtension()
 {
     String bundlePathForExtension = WebCore::pathByAppendingComponent(String::fromUTF8(TEST_LIB_DIR), EXTENSIONMANAGERNAME);

Modified: trunk/Source/WebKit2/UIProcess/API/efl/ewk_context_private.h (185551 => 185552)


--- trunk/Source/WebKit2/UIProcess/API/efl/ewk_context_private.h	2015-06-15 15:34:02 UTC (rev 185551)
+++ trunk/Source/WebKit2/UIProcess/API/efl/ewk_context_private.h	2015-06-15 15:43:43 UTC (rev 185552)
@@ -48,8 +48,7 @@
     EWK_OBJECT_DECLARE(EwkContext)
 
     static PassRefPtr<EwkContext> findOrCreateWrapper(WKContextRef context);
-    static PassRefPtr<EwkContext> create();
-    static PassRefPtr<EwkContext> create(const String& injectedBundlePath);
+    static PassRefPtr<EwkContext> create(const String& extensionsPath = String());
 
     static EwkContext* defaultContext();
 

Modified: trunk/Source/WebKit2/WebProcess/efl/ExtensionManagerEfl.cpp (185551 => 185552)


--- trunk/Source/WebKit2/WebProcess/efl/ExtensionManagerEfl.cpp	2015-06-15 15:34:02 UTC (rev 185551)
+++ trunk/Source/WebKit2/WebProcess/efl/ExtensionManagerEfl.cpp	2015-06-15 15:43:43 UTC (rev 185552)
@@ -50,12 +50,14 @@
 {
     ASSERT(!m_extension);
 
+    m_extension = std::make_unique<EwkExtension>(toImpl(bundle));    
+    if (!userData)
+        return;
+
     String extensionsDirectory = toImpl(static_cast<WKStringRef>(userData))->string();
     if (extensionsDirectory.isEmpty())
         return;
 
-    m_extension = std::make_unique<EwkExtension>(toImpl(bundle));
-
     Vector<String> modulePaths = WebCore::listDirectory(extensionsDirectory, ASCIILiteral("*.so"));
 
     for (size_t i = 0; i < modulePaths.size(); ++i) {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to