[GTK] Move WebGtkExtensionManager and WebGtkInjectedBundleMain to glib API dir
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Jun 2017 07:49:21 +0000 (07:49 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Jun 2017 07:49:21 +0000 (07:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=173606

Reviewed by Žan Doberšek.

.:

Update public symbols that were renamed.

* Source/cmake/gtksymbols.filter:

Source/WebKit2:

And rename them to use WebKit prefix instead of WebGtk.

* PlatformGTK.cmake:
* WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp: Renamed from Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.cpp.
(WebKit::WebKitExtensionManager::singleton):
(WebKit::WebKitExtensionManager::WebKitExtensionManager):
(WebKit::WebKitExtensionManager::scanModules):
(WebKit::WebKitExtensionManager::initializeWebExtension):
(WebKit::WebKitExtensionManager::initialize):
* WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h: Renamed from Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.h.
* WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp: Renamed from Source/WebKit2/WebProcess/gtk/WebGtkInjectedBundleMain.cpp.
(WKBundleInitialize):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@218628 268f45cc-cd09-0410-ab3c-d52691b4dbfc

ChangeLog
Source/WebKit2/ChangeLog
Source/WebKit2/PlatformGTK.cmake
Source/WebKit2/WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp [moved from Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.cpp with 90% similarity]
Source/WebKit2/WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h [moved from Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.h with 86% similarity]
Source/WebKit2/WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp [moved from Source/WebKit2/WebProcess/gtk/WebGtkInjectedBundleMain.cpp with 92% similarity]
Source/cmake/gtksymbols.filter

index 0886b89..90df82e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2017-06-21  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK] Move WebGtkExtensionManager and WebGtkInjectedBundleMain to glib API dir
+        https://bugs.webkit.org/show_bug.cgi?id=173606
+
+        Reviewed by Žan Doberšek.
+
+        Update public symbols that were renamed.
+
+        * Source/cmake/gtksymbols.filter:
+
 2017-06-20  Zan Dobersek  <zdobersek@igalia.com>
 
         [GCrypt] Implement CryptoKeyEC SPKI imports
index 374ec82..532591a 100644 (file)
@@ -1,3 +1,23 @@
+2017-06-21  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK] Move WebGtkExtensionManager and WebGtkInjectedBundleMain to glib API dir
+        https://bugs.webkit.org/show_bug.cgi?id=173606
+
+        Reviewed by Žan Doberšek.
+
+        And rename them to use WebKit prefix instead of WebGtk.
+
+        * PlatformGTK.cmake:
+        * WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp: Renamed from Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.cpp.
+        (WebKit::WebKitExtensionManager::singleton):
+        (WebKit::WebKitExtensionManager::WebKitExtensionManager):
+        (WebKit::WebKitExtensionManager::scanModules):
+        (WebKit::WebKitExtensionManager::initializeWebExtension):
+        (WebKit::WebKitExtensionManager::initialize):
+        * WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.h: Renamed from Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.h.
+        * WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp: Renamed from Source/WebKit2/WebProcess/gtk/WebGtkInjectedBundleMain.cpp.
+        (WKBundleInitialize):
+
 2017-06-20  Frederic Wang  <fwang@igalia.com>
 
         Pass the argument of DrawingArea::shouldUseTiledBackingForFrameView by reference
index 85fc209..2215f3f 100644 (file)
@@ -241,6 +241,7 @@ list(APPEND WebKit2_SOURCES
     WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.cpp
 
     WebProcess/InjectedBundle/API/glib/WebKitConsoleMessage.cpp
+    WebProcess/InjectedBundle/API/glib/WebKitExtensionManager.cpp
     WebProcess/InjectedBundle/API/glib/WebKitFrame.cpp
     WebProcess/InjectedBundle/API/glib/WebKitScriptWorld.cpp
     WebProcess/InjectedBundle/API/glib/WebKitWebEditor.cpp
@@ -396,8 +397,6 @@ list(APPEND WebKit2_SOURCES
     WebProcess/WebPage/gtk/WebPageGtk.cpp
     WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp
 
-    WebProcess/gtk/WebGtkExtensionManager.cpp
-    WebProcess/gtk/WebGtkInjectedBundleMain.cpp
     WebProcess/gtk/WebProcessMainGtk.cpp
 
     WebProcess/soup/WebKitSoupRequestInputStream.cpp
@@ -796,7 +795,6 @@ list(APPEND WebKit2_INCLUDE_DIRECTORIES
     "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/gtk/DOM"
     "${WEBKIT2_DIR}/WebProcess/Plugins/Netscape/unix"
     "${WEBKIT2_DIR}/WebProcess/Plugins/Netscape/x11"
-    "${WEBKIT2_DIR}/WebProcess/gtk"
     "${WEBKIT2_DIR}/WebProcess/soup"
     "${WEBKIT2_DIR}/WebProcess/unix"
     "${WEBKIT2_DIR}/WebProcess/WebCoreSupport/gtk"
@@ -1095,7 +1093,7 @@ include_directories(
     "${FORWARDING_HEADERS_WEBKIT2GTK_DIR}"
 )
 
-add_library(webkit2gtkinjectedbundle MODULE "${WEBKIT2_DIR}/WebProcess/gtk/WebGtkInjectedBundleMain.cpp")
+add_library(webkit2gtkinjectedbundle MODULE "${WEBKIT2_DIR}/WebProcess/InjectedBundle/API/glib/WebKitInjectedBundleMain.cpp")
 add_webkit2_prefix_header(webkit2gtkinjectedbundle)
 target_link_libraries(webkit2gtkinjectedbundle WebKit2)
 
@@ -18,7 +18,7 @@
  */
 
 #include "config.h"
-#include "WebGtkExtensionManager.h"
+#include "WebKitExtensionManager.h"
 
 #include "APIString.h"
 #include "InjectedBundle.h"
 
 namespace WebKit {
 
-WebGtkExtensionManager& WebGtkExtensionManager::singleton()
+WebKitExtensionManager& WebKitExtensionManager::singleton()
 {
-    static NeverDestroyed<WebGtkExtensionManager> extensionManager;
+    static NeverDestroyed<WebKitExtensionManager> extensionManager;
     return extensionManager;
 }
 
-WebGtkExtensionManager::WebGtkExtensionManager()
+WebKitExtensionManager::WebKitExtensionManager()
 {
 }
 
-void WebGtkExtensionManager::scanModules(const String& webExtensionsDirectory, Vector<String>& modules)
+void WebKitExtensionManager::scanModules(const String& webExtensionsDirectory, Vector<String>& modules)
 {
     Vector<String> modulePaths = WebCore::listDirectory(webExtensionsDirectory, String("*.so"));
     for (size_t i = 0; i < modulePaths.size(); ++i) {
@@ -67,7 +67,7 @@ static void parseUserData(API::Object* userData, String& webExtensionsDirectory,
     initializationUserData = adoptGRef(data);
 }
 
-bool WebGtkExtensionManager::initializeWebExtension(Module* extensionModule, GVariant* userData)
+bool WebKitExtensionManager::initializeWebExtension(Module* extensionModule, GVariant* userData)
 {
     WebKitWebExtensionInitializeWithUserDataFunction initializeWithUserDataFunction =
         extensionModule->functionPointer<WebKitWebExtensionInitializeWithUserDataFunction>("webkit_web_extension_initialize_with_user_data");
@@ -86,7 +86,7 @@ bool WebGtkExtensionManager::initializeWebExtension(Module* extensionModule, GVa
     return false;
 }
 
-void WebGtkExtensionManager::initialize(InjectedBundle* bundle, API::Object* userDataObject)
+void WebKitExtensionManager::initialize(InjectedBundle* bundle, API::Object* userDataObject)
 {
     ASSERT(bundle);
     ASSERT(userDataObject);
@@ -35,16 +35,15 @@ namespace WebKit {
 
 class InjectedBundle;
 
-class WebGtkExtensionManager {
-    WTF_MAKE_NONCOPYABLE(WebGtkExtensionManager);
-
+class WebKitExtensionManager {
+    WTF_MAKE_NONCOPYABLE(WebKitExtensionManager);
 public:
-    static WebGtkExtensionManager& singleton();
+    static WebKitExtensionManager& singleton();
 
     void initialize(InjectedBundle*, API::Object*);
 
 private:
-    WebGtkExtensionManager();
+    WebKitExtensionManager();
 
     void scanModules(const String&, Vector<String>&);
     bool initializeWebExtension(Module* extensionModule, GVariant* userData);
@@ -52,7 +51,7 @@ private:
     Vector<Module*> m_extensionModules;
     GRefPtr<WebKitWebExtension> m_extension;
 
-    friend class NeverDestroyed<WebGtkExtensionManager>;
+    friend class NeverDestroyed<WebKitExtensionManager>;
 };
 
 } // namespace WebKit
@@ -20,7 +20,7 @@
 #include "config.h"
 
 #include "InjectedBundle.h"
-#include "WebGtkExtensionManager.h"
+#include "WebKitExtensionManager.h"
 #include <WebKit/WKBundleAPICast.h>
 #include <WebKit/WKBundleInitialize.h>
 
@@ -33,5 +33,5 @@ extern "C"
 #endif
 void WKBundleInitialize(WKBundleRef bundle, WKTypeRef userData)
 {
-    WebGtkExtensionManager::singleton().initialize(toImpl(bundle), toImpl(userData));
+    WebKitExtensionManager::singleton().initialize(toImpl(bundle), toImpl(userData));
 }
index 0140883..5e8cc29 100644 (file)
@@ -5,8 +5,8 @@ global:
   NetworkProcessMainUnix;
   PluginProcessMainUnix;
   DatabaseProcessMainUnix;
-  _ZN6WebKit22WebGtkExtensionManager10initializeEPNS_14InjectedBundleEPN3API6ObjectE;
-  _ZN6WebKit22WebGtkExtensionManager9singletonEv;
+  _ZN6WebKit22WebKitExtensionManager10initializeEPNS_14InjectedBundleEPN3API6ObjectE;
+  _ZN6WebKit22WebKitExtensionManager9singletonEv;
 local:
   webkit_media_player_debug;
   *;