[GLib] Build error with RemoteInspector disabled
authorphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Oct 2018 17:54:09 +0000 (17:54 +0000)
committerphiln@webkit.org <philn@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Oct 2018 17:54:09 +0000 (17:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=190623

Reviewed by Michael Catanzaro.

Compilation guards added to ensure the build still works when the
Remote WebInspector has been disabled.

* UIProcess/API/glib/WebKitAutomationSession.cpp:
* UIProcess/API/glib/WebKitAutomationSessionPrivate.h:
* UIProcess/RemoteWebInspectorProxy.cpp:

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/glib/WebKitAutomationSession.cpp
Source/WebKit/UIProcess/API/glib/WebKitAutomationSessionPrivate.h
Source/WebKit/UIProcess/RemoteWebInspectorProxy.cpp

index 706b879..5df88b2 100644 (file)
@@ -1,3 +1,17 @@
+2018-10-16  Philippe Normand  <pnormand@igalia.com>
+
+        [GLib] Build error with RemoteInspector disabled
+        https://bugs.webkit.org/show_bug.cgi?id=190623
+
+        Reviewed by Michael Catanzaro.
+
+        Compilation guards added to ensure the build still works when the
+        Remote WebInspector has been disabled.
+
+        * UIProcess/API/glib/WebKitAutomationSession.cpp:
+        * UIProcess/API/glib/WebKitAutomationSessionPrivate.h:
+        * UIProcess/RemoteWebInspectorProxy.cpp:
+
 2018-10-16  Patrick Griffis  <pgriffis@igalia.com>
 
         [GTK][WPE] Fix sandbox on distros with suid bubblewrap
index 7eb95e9..298339e 100644 (file)
@@ -84,7 +84,9 @@ private:
 
     void didDisconnectFromRemote(WebAutomationSession&) override
     {
+#if ENABLE(REMOTE_INSPECTOR)
         webkitWebContextWillCloseAutomationSession(m_session->priv->webContext);
+#endif
     }
 
     void requestNewPageWithOptions(WebAutomationSession&, API::AutomationSessionBrowsingContextOptions, CompletionHandler<void(WebPageProxy*)>&& completionHandler) override
@@ -288,6 +290,7 @@ static void webkit_automation_session_class_init(WebKitAutomationSessionClass* s
         G_TYPE_NONE);
 }
 
+#if ENABLE(REMOTE_INSPECTOR)
 WebKitAutomationSession* webkitAutomationSessionCreate(WebKitWebContext* webContext, const char* sessionID, const Inspector::RemoteInspector::Client::SessionCapabilities& capabilities)
 {
     auto* session = WEBKIT_AUTOMATION_SESSION(g_object_new(WEBKIT_TYPE_AUTOMATION_SESSION, "id", sessionID, nullptr));
@@ -301,6 +304,7 @@ WebKitAutomationSession* webkitAutomationSessionCreate(WebKitWebContext* webCont
     }
     return session;
 }
+#endif
 
 WebAutomationSession& webkitAutomationSessionGetSession(WebKitAutomationSession* session)
 {
index b48cf70..88c3215 100644 (file)
 #include "WebKitWebContext.h"
 #include <JavaScriptCore/RemoteInspector.h>
 
+#if ENABLE(REMOTE_INSPECTOR)
 WebKitAutomationSession* webkitAutomationSessionCreate(WebKitWebContext*, const char* sessionID, const Inspector::RemoteInspector::Client::SessionCapabilities&);
+#endif
+
 WebKit::WebAutomationSession& webkitAutomationSessionGetSession(WebKitAutomationSession*);
 String webkitAutomationSessionGetBrowserName(WebKitAutomationSession*);
 String webkitAutomationSessionGetBrowserVersion(WebKitAutomationSession*);
index d82e582..6f1e407 100644 (file)
@@ -148,7 +148,7 @@ void RemoteWebInspectorProxy::closeFrontendPageAndWindow()
     platformCloseFrontendPageAndWindow();
 }
 
-#if !PLATFORM(MAC) && !PLATFORM(GTK)
+#if !ENABLE(REMOTE_INSPECTOR) || (!PLATFORM(MAC) && !PLATFORM(GTK))
 WebPageProxy* RemoteWebInspectorProxy::platformCreateFrontendPageAndWindow()
 {
     notImplemented();