[GTK] Add missing ENABLE(NETSCAPE_PLUGIN_API) build guards
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 May 2015 09:33:54 +0000 (09:33 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 14 May 2015 09:33:54 +0000 (09:33 +0000)
https://bugs.webkit.org/show_bug.cgi?id=144994

Reviewed by Carlos Garcia Campos.

This fixes the build when configured with Netscape plugin API
support disabled.

* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_set_additional_plugins_directory):
(webkitWebContextGetPluginThread):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
Source/WebKit2/UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp

index b86492c..96b85cf 100644 (file)
@@ -1,3 +1,19 @@
+2015-05-14  Zan Dobersek  <zdobersek@igalia.com>
+
+        [GTK] Add missing ENABLE(NETSCAPE_PLUGIN_API) build guards
+        https://bugs.webkit.org/show_bug.cgi?id=144994
+
+        Reviewed by Carlos Garcia Campos.
+
+        This fixes the build when configured with Netscape plugin API
+        support disabled.
+
+        * UIProcess/API/gtk/WebKitWebContext.cpp:
+        (webkit_web_context_set_additional_plugins_directory):
+        (webkitWebContextGetPluginThread):
+        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
+        (WebKit::ProcessLauncher::launchProcess):
+
 2015-05-13  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         [SOUP] Network Cache: NetworkProcess segfault when file system doesn't support xattrs
index 0cd600d..c74cce5 100644 (file)
@@ -666,7 +666,9 @@ void webkit_web_context_set_additional_plugins_directory(WebKitWebContext* conte
     g_return_if_fail(WEBKIT_IS_WEB_CONTEXT(context));
     g_return_if_fail(directory);
 
+#if ENABLE(NETSCAPE_PLUGIN_API)
     context->priv->context->setAdditionalPluginsDirectory(WebCore::filenameToString(directory));
+#endif
 }
 
 static void destroyPluginList(GList* plugins)
@@ -676,10 +678,12 @@ static void destroyPluginList(GList* plugins)
 
 static void webkitWebContextGetPluginThread(GTask* task, gpointer object, gpointer /* taskData */, GCancellable*)
 {
-    Vector<PluginModuleInfo> plugins = WEBKIT_WEB_CONTEXT(object)->priv->context->pluginInfoStore().plugins();
     GList* returnValue = 0;
+#if ENABLE(NETSCAPE_PLUGIN_API)
+    Vector<PluginModuleInfo> plugins = WEBKIT_WEB_CONTEXT(object)->priv->context->pluginInfoStore().plugins();
     for (size_t i = 0; i < plugins.size(); ++i)
         returnValue = g_list_prepend(returnValue, webkitPluginCreate(plugins[i]));
+#endif
     g_task_return_pointer(task, returnValue, reinterpret_cast<GDestroyNotify>(destroyPluginList));
 }
 
index 000d544..8e6ee02 100644 (file)
@@ -65,6 +65,7 @@ void ProcessLauncher::launchProcess()
     case WebProcess:
         executablePath = executablePathOfWebProcess();
         break;
+#if ENABLE(NETSCAPE_PLUGIN_API)
     case PluginProcess:
         executablePath = executablePathOfPluginProcess();
 #if ENABLE(PLUGIN_PROCESS_GTK2)
@@ -74,6 +75,7 @@ void ProcessLauncher::launchProcess()
         pluginPath = m_launchOptions.extraInitializationData.get("plugin-path");
         realPluginPath = fileSystemRepresentation(pluginPath);
         break;
+#endif
 #if ENABLE(NETWORK_PROCESS)
     case NetworkProcess:
         executablePath = executablePathOfNetworkProcess();