<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[218089] trunk/Source/WebKit2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/218089">218089</a></dd>
<dt>Author</dt> <dd>carlosgc@webkit.org</dd>
<dt>Date</dt> <dd>2017-06-11 23:05:05 -0700 (Sun, 11 Jun 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[GTK] Remove WKInspectorClientGtk
https://bugs.webkit.org/show_bug.cgi?id=173142

Reviewed by Michael Catanzaro.

It's only used internally in GTk+ API, we can simplify it by using a C++ client instead.

* PlatformGTK.cmake:
* UIProcess/API/C/gtk/WKInspectorClientGtk.cpp: Removed.
* UIProcess/API/C/gtk/WKInspectorClientGtk.h: Removed.
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitWebInspector.cpp:
(_WebKitWebInspectorPrivate::~_WebKitWebInspectorPrivate):
(webkitWebInspectorCreate):
* UIProcess/WebInspectorProxy.cpp:
* UIProcess/WebInspectorProxy.h:
* UIProcess/gtk/WebInspectorClientGtk.cpp: Removed.
* UIProcess/gtk/WebInspectorProxyClient.h: Renamed from Source/WebKit2/UIProcess/gtk/WebInspectorClientGtk.h.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::setClient):
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::platformDidClose):
(WebKit::WebInspectorProxy::platformBringToFront):
(WebKit::WebInspectorProxy::platformInspectedURLChanged):
(WebKit::WebInspectorProxy::platformAttach):
(WebKit::WebInspectorProxy::platformDetach):
(WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
(WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitPrivateh">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkWebKitWebInspectorcpp">trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebInspector.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebInspectorProxycpp">trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebInspectorProxyh">trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessgtkWebInspectorProxyGtkcpp">trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessgtkWebInspectorProxyClienth">trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyClient.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2UIProcessAPICgtkWKInspectorClientGtkcpp">trunk/Source/WebKit2/UIProcess/API/C/gtk/WKInspectorClientGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICgtkWKInspectorClientGtkh">trunk/Source/WebKit2/UIProcess/API/C/gtk/WKInspectorClientGtk.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessgtkWebInspectorClientGtkcpp">trunk/Source/WebKit2/UIProcess/gtk/WebInspectorClientGtk.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessgtkWebInspectorClientGtkh">trunk/Source/WebKit2/UIProcess/gtk/WebInspectorClientGtk.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (218088 => 218089)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog   2017-06-12 05:19:00 UTC (rev 218088)
+++ trunk/Source/WebKit2/ChangeLog      2017-06-12 06:05:05 UTC (rev 218089)
</span><span class="lines">@@ -1,3 +1,35 @@
</span><ins>+2017-06-11  Carlos Garcia Campos  <cgarcia@igalia.com>
+
+        [GTK] Remove WKInspectorClientGtk
+        https://bugs.webkit.org/show_bug.cgi?id=173142
+
+        Reviewed by Michael Catanzaro.
+
+        It's only used internally in GTk+ API, we can simplify it by using a C++ client instead.
+
+        * PlatformGTK.cmake:
+        * UIProcess/API/C/gtk/WKInspectorClientGtk.cpp: Removed.
+        * UIProcess/API/C/gtk/WKInspectorClientGtk.h: Removed.
+        * UIProcess/API/gtk/WebKitPrivate.h:
+        * UIProcess/API/gtk/WebKitWebInspector.cpp:
+        (_WebKitWebInspectorPrivate::~_WebKitWebInspectorPrivate):
+        (webkitWebInspectorCreate):
+        * UIProcess/WebInspectorProxy.cpp:
+        * UIProcess/WebInspectorProxy.h:
+        * UIProcess/gtk/WebInspectorClientGtk.cpp: Removed.
+        * UIProcess/gtk/WebInspectorProxyClient.h: Renamed from Source/WebKit2/UIProcess/gtk/WebInspectorClientGtk.h.
+        * UIProcess/gtk/WebInspectorProxyGtk.cpp:
+        (WebKit::WebInspectorProxy::setClient):
+        (WebKit::WebInspectorProxy::createInspectorWindow):
+        (WebKit::WebInspectorProxy::platformDidClose):
+        (WebKit::WebInspectorProxy::platformBringToFront):
+        (WebKit::WebInspectorProxy::platformInspectedURLChanged):
+        (WebKit::WebInspectorProxy::platformAttach):
+        (WebKit::WebInspectorProxy::platformDetach):
+        (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
+        (WebKit::WebInspectorProxy::platformSetAttachedWindowWidth):
+        (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
+
</ins><span class="cx"> 2017-06-11  Tim Horton  <timothy_horton@apple.com>
</span><span class="cx"> 
</span><span class="cx">         REGRESSION (r217870): Null deref under PageOverlayController::uninstallPageOverlay using find in page
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (218088 => 218089)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake   2017-06-12 05:19:00 UTC (rev 218088)
+++ trunk/Source/WebKit2/PlatformGTK.cmake      2017-06-12 06:05:05 UTC (rev 218089)
</span><span class="lines">@@ -109,7 +109,6 @@
</span><span class="cx"> 
</span><span class="cx">     UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp
</span><span class="cx"> 
</span><del>-    UIProcess/API/C/gtk/WKInspectorClientGtk.cpp
</del><span class="cx">     UIProcess/API/C/gtk/WKTextCheckerGtk.cpp
</span><span class="cx">     UIProcess/API/C/gtk/WKView.cpp
</span><span class="cx"> 
</span><span class="lines">@@ -336,7 +335,6 @@
</span><span class="cx">     UIProcess/gtk/WaylandCompositor.cpp
</span><span class="cx">     UIProcess/gtk/WebColorPickerGtk.cpp
</span><span class="cx">     UIProcess/gtk/WebContextMenuProxyGtk.cpp
</span><del>-    UIProcess/gtk/WebInspectorClientGtk.cpp
</del><span class="cx">     UIProcess/gtk/WebInspectorProxyGtk.cpp
</span><span class="cx">     UIProcess/gtk/WebKitInspectorWindow.cpp
</span><span class="cx">     UIProcess/gtk/WebPageProxyGtk.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICgtkWKInspectorClientGtkcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/C/gtk/WKInspectorClientGtk.cpp (218088 => 218089)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/gtk/WKInspectorClientGtk.cpp        2017-06-12 05:19:00 UTC (rev 218088)
+++ trunk/Source/WebKit2/UIProcess/API/C/gtk/WKInspectorClientGtk.cpp   2017-06-12 06:05:05 UTC (rev 218089)
</span><span class="lines">@@ -1,37 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WKInspectorClientGtk.h"
-
-#include "WKAPICast.h"
-#include "WebInspectorProxy.h"
-
-using namespace WebKit;
-
-void WKInspectorSetInspectorClientGtk(WKInspectorRef inspectorRef, const WKInspectorClientGtkBase* wkClient)
-{
-    toImpl(inspectorRef)->initializeInspectorClientGtk(wkClient);
-}
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICgtkWKInspectorClientGtkh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/API/C/gtk/WKInspectorClientGtk.h (218088 => 218089)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/gtk/WKInspectorClientGtk.h  2017-06-12 05:19:00 UTC (rev 218088)
+++ trunk/Source/WebKit2/UIProcess/API/C/gtk/WKInspectorClientGtk.h     2017-06-12 06:05:05 UTC (rev 218089)
</span><span class="lines">@@ -1,67 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WKInspectorClientGtk_h
-#define WKInspectorClientGtk_h
-
-#include <WebKit/WKBase.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef bool (*WKInspectorClientGtkInspectorCallback)(WKInspectorRef inspector, const void* clientInfo);
-typedef void (*WKInspectorClientGtkInspectorDidCloseCallback)(WKInspectorRef inspector, const void* clientInfo);
-typedef void (*WKInspectorClientGtkInspectedURLChangedCallback)(WKInspectorRef inspector, WKStringRef url, const void* clientInfo);
-typedef void (*WKInspectorClientGtkDidChangeAttachedHeightCallback)(WKInspectorRef inspector, unsigned height, const void* clientInfo);
-typedef void (*WKInspectorClientGtkDidChangeAttachedWidthCallback)(WKInspectorRef inspector, unsigned width, const void* clientInfo);
-typedef void (*WKInspectorClientGtkDidChangeAttachAvailabilityCallback)(WKInspectorRef inspector, bool available, const void* clientInfo);
-
-typedef struct WKInspectorClientGtkBase {
-    int                                                 version;
-    const void*                                         clientInfo;
-} WKInspectorClientGtkBase;
-
-typedef struct WKInspectorClientGtkV0 {
-    WKInspectorClientGtkBase                            base;
-
-    WKInspectorClientGtkInspectorCallback               openWindow;
-    WKInspectorClientGtkInspectorDidCloseCallback       didClose;
-    WKInspectorClientGtkInspectorCallback               bringToFront;
-    WKInspectorClientGtkInspectedURLChangedCallback     inspectedURLChanged;
-    WKInspectorClientGtkInspectorCallback               attach;
-    WKInspectorClientGtkInspectorCallback               detach;
-    WKInspectorClientGtkDidChangeAttachedHeightCallback didChangeAttachedHeight;
-    WKInspectorClientGtkDidChangeAttachedWidthCallback  didChangeAttachedWidth;
-    WKInspectorClientGtkDidChangeAttachAvailabilityCallback didChangeAttachAvailability;
-} WKInspectorClientGtkV0;
-
-WK_EXPORT void WKInspectorSetInspectorClientGtk(WKInspectorRef inspectorRef, const WKInspectorClientGtkBase* client);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* WKInspectorClientGtk_h */
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h (218088 => 218089)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h   2017-06-12 05:19:00 UTC (rev 218088)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitPrivate.h      2017-06-12 06:05:05 UTC (rev 218089)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx"> #include <WebKit/WKGeolocationPosition.h>
</span><span class="cx"> #include <WebKit/WKIconDatabase.h>
</span><span class="cx"> #include <WebKit/WKInspector.h>
</span><del>-#include <WebKit/WKInspectorClientGtk.h>
</del><span class="cx"> #include <WebKit/WKRetainPtr.h>
</span><span class="cx"> #include <WebKit/WKSerializedScriptValue.h>
</span><span class="cx"> #include <WebKit/WKString.h>
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkWebKitWebInspectorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebInspector.cpp (218088 => 218089)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebInspector.cpp    2017-06-12 05:19:00 UTC (rev 218088)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebInspector.cpp       2017-06-12 06:05:05 UTC (rev 218089)
</span><span class="lines">@@ -21,6 +21,7 @@
</span><span class="cx"> #include "WebKitWebInspector.h"
</span><span class="cx"> 
</span><span class="cx"> #include "WebInspectorProxy.h"
</span><ins>+#include "WebInspectorProxyClient.h"
</ins><span class="cx"> #include "WebKitWebInspectorPrivate.h"
</span><span class="cx"> #include <glib/gi18n-lib.h>
</span><span class="cx"> #include <wtf/glib/GRefPtr.h>
</span><span class="lines">@@ -78,7 +79,7 @@
</span><span class="cx"> struct _WebKitWebInspectorPrivate {
</span><span class="cx">     ~_WebKitWebInspectorPrivate()
</span><span class="cx">     {
</span><del>-        WKInspectorSetInspectorClientGtk(toAPI(webInspector.get()), 0);
</del><ins>+        webInspector->setClient(nullptr);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     RefPtr<WebInspectorProxy> webInspector;
</span><span class="lines">@@ -281,89 +282,84 @@
</span><span class="cx">         G_TYPE_BOOLEAN, 0);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static bool openWindow(WKInspectorRef, const void* clientInfo)
-{
-    gboolean returnValue;
-    g_signal_emit(WEBKIT_WEB_INSPECTOR(clientInfo), signals[OPEN_WINDOW], 0, &returnValue);
-    return returnValue;
-}
</del><ins>+class WebKitInspectorClient final : public WebInspectorProxyClient {
+public:
+    explicit WebKitInspectorClient(WebKitWebInspector* inspector)
+        : m_inspector(inspector)
+    {
+    }
</ins><span class="cx"> 
</span><del>-static void didClose(WKInspectorRef, const void* clientInfo)
-{
-    g_signal_emit(WEBKIT_WEB_INSPECTOR(clientInfo), signals[CLOSED], 0);
-}
</del><ins>+private:
+    bool openWindow(WebInspectorProxy&) override
+    {
+        gboolean returnValue;
+        g_signal_emit(m_inspector, signals[OPEN_WINDOW], 0, &returnValue);
+        return returnValue;
+    }
</ins><span class="cx"> 
</span><del>-static bool bringToFront(WKInspectorRef, const void* clientInfo)
-{
-    gboolean returnValue;
-    g_signal_emit(WEBKIT_WEB_INSPECTOR(clientInfo), signals[BRING_TO_FRONT], 0, &returnValue);
-    return returnValue;
-}
</del><ins>+    void didClose(WebInspectorProxy&) override
+    {
+        g_signal_emit(m_inspector, signals[CLOSED], 0);
+    }
</ins><span class="cx"> 
</span><del>-static void inspectedURLChanged(WKInspectorRef, WKStringRef url, const void* clientInfo)
-{
-    WebKitWebInspector* inspector = WEBKIT_WEB_INSPECTOR(clientInfo);
-    CString uri = toImpl(url)->string().utf8();
-    if (uri == inspector->priv->inspectedURI)
-        return;
-    inspector->priv->inspectedURI = uri;
-    g_object_notify(G_OBJECT(inspector), "inspected-uri");
-}
</del><ins>+    bool bringToFront(WebInspectorProxy&) override
+    {
+        gboolean returnValue;
+        g_signal_emit(m_inspector, signals[BRING_TO_FRONT], 0, &returnValue);
+        return returnValue;
+    }
</ins><span class="cx"> 
</span><del>-static bool attach(WKInspectorRef, const void* clientInfo)
-{
-    gboolean returnValue;
-    g_signal_emit(WEBKIT_WEB_INSPECTOR(clientInfo), signals[ATTACH], 0, &returnValue);
-    return returnValue;
-}
</del><ins>+    void inspectedURLChanged(WebInspectorProxy&, const String& url) override
+    {
+        CString uri = url.utf8();
+        if (uri == m_inspector->priv->inspectedURI)
+            return;
+        m_inspector->priv->inspectedURI = uri;
+        g_object_notify(G_OBJECT(m_inspector), "inspected-uri");
+    }
</ins><span class="cx"> 
</span><del>-static bool detach(WKInspectorRef, const void* clientInfo)
-{
-    gboolean returnValue;
-    g_signal_emit(WEBKIT_WEB_INSPECTOR(clientInfo), signals[DETACH], 0, &returnValue);
-    return returnValue;
-}
</del><ins>+    bool attach(WebInspectorProxy&) override
+    {
+        gboolean returnValue;
+        g_signal_emit(m_inspector, signals[ATTACH], 0, &returnValue);
+        return returnValue;
+    }
</ins><span class="cx"> 
</span><del>-static void didChangeAttachedHeight(WKInspectorRef, unsigned height, const void* clientInfo)
-{
-    WebKitWebInspector* inspector = WEBKIT_WEB_INSPECTOR(clientInfo);
-    if (inspector->priv->attachedHeight == height)
-        return;
-    inspector->priv->attachedHeight = height;
-    g_object_notify(G_OBJECT(inspector), "attached-height");
-}
</del><ins>+    bool detach(WebInspectorProxy&) override
+    {
+        gboolean returnValue;
+        g_signal_emit(m_inspector, signals[DETACH], 0, &returnValue);
+        return returnValue;
+    }
</ins><span class="cx"> 
</span><del>-static void didChangeAttachAvailability(WKInspectorRef, bool available, const void* clientInfo)
-{
-    WebKitWebInspector* inspector = WEBKIT_WEB_INSPECTOR(clientInfo);
-    if (inspector->priv->canAttach == available)
-        return;
-    inspector->priv->canAttach = available;
-    g_object_notify(G_OBJECT(clientInfo), "can-attach");
-}
</del><ins>+    void didChangeAttachedHeight(WebInspectorProxy&, unsigned height) override
+    {
+        if (m_inspector->priv->attachedHeight == height)
+            return;
+        m_inspector->priv->attachedHeight = height;
+        g_object_notify(G_OBJECT(m_inspector), "attached-height");
+    }
</ins><span class="cx"> 
</span><ins>+    void didChangeAttachedWidth(WebInspectorProxy&, unsigned width) override
+    {
+    }
+
+    void didChangeAttachAvailability(WebInspectorProxy&, bool available) override
+    {
+        if (m_inspector->priv->canAttach == available)
+            return;
+        m_inspector->priv->canAttach = available;
+        g_object_notify(G_OBJECT(m_inspector), "can-attach");
+    }
+
+    WebKitWebInspector* m_inspector;
+};
+
</ins><span class="cx"> WebKitWebInspector* webkitWebInspectorCreate(WebInspectorProxy* webInspector)
</span><span class="cx"> {
</span><span class="cx">     WebKitWebInspector* inspector = WEBKIT_WEB_INSPECTOR(g_object_new(WEBKIT_TYPE_WEB_INSPECTOR, NULL));
</span><span class="cx">     inspector->priv->webInspector = webInspector;
</span><del>-
-    WKInspectorClientGtkV0 wkInspectorClientGtk = {
-        {
-            0, // version
-            inspector, // clientInfo
-        },
-        openWindow,
-        didClose,
-        bringToFront,
-        inspectedURLChanged,
-        attach,
-        detach,
-        didChangeAttachedHeight,
-        nullptr, // didChangeAttachedWidth
-        didChangeAttachAvailability
-    };
-    WKInspectorSetInspectorClientGtk(toAPI(webInspector), &wkInspectorClientGtk.base);
-
</del><ins>+    webInspector->setClient(std::make_unique<WebKitInspectorClient>(inspector));
</ins><span class="cx">     return inspector;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebInspectorProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp (218088 => 218089)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp     2017-06-12 05:19:00 UTC (rev 218088)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.cpp        2017-06-12 06:05:05 UTC (rev 218089)
</span><span class="lines">@@ -47,6 +47,10 @@
</span><span class="cx"> #include <WebCore/NotImplemented.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx"> 
</span><ins>+#if PLATFORM(GTK)
+#include "WebInspectorProxyClient.h"
+#endif
+
</ins><span class="cx"> using namespace WebCore;
</span><span class="cx"> 
</span><span class="cx"> namespace WebKit {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebInspectorProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h (218088 => 218089)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h       2017-06-12 05:19:00 UTC (rev 218088)
+++ trunk/Source/WebKit2/UIProcess/WebInspectorProxy.h  2017-06-12 06:05:05 UTC (rev 218089)
</span><span class="lines">@@ -49,10 +49,6 @@
</span><span class="cx"> OBJC_CLASS WKWebViewConfiguration;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#if PLATFORM(GTK)
-#include "WebInspectorClientGtk.h"
-#endif
-
</del><span class="cx"> namespace WebCore {
</span><span class="cx"> class URL;
</span><span class="cx"> }
</span><span class="lines">@@ -60,6 +56,7 @@
</span><span class="cx"> namespace WebKit {
</span><span class="cx"> 
</span><span class="cx"> class WebFrameProxy;
</span><ins>+class WebInspectorProxyClient;
</ins><span class="cx"> class WebPageProxy;
</span><span class="cx"> class WebPreferences;
</span><span class="cx"> 
</span><span class="lines">@@ -115,7 +112,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK)
</span><span class="cx">     GtkWidget* inspectorView() const { return m_inspectorView; };
</span><del>-    void initializeInspectorClientGtk(const WKInspectorClientGtkBase*);
</del><ins>+    void setClient(std::unique_ptr<WebInspectorProxyClient>&&);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void showConsole();
</span><span class="lines">@@ -242,7 +239,7 @@
</span><span class="cx">     RunLoop::Timer<WebInspectorProxy> m_closeTimer;
</span><span class="cx">     String m_urlString;
</span><span class="cx"> #elif PLATFORM(GTK)
</span><del>-    WebInspectorClientGtk m_client;
</del><ins>+    std::unique_ptr<WebInspectorProxyClient> m_client;
</ins><span class="cx">     GtkWidget* m_inspectorView { nullptr };
</span><span class="cx">     GtkWidget* m_inspectorWindow { nullptr };
</span><span class="cx">     GtkWidget* m_headerBar { nullptr };
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkWebInspectorClientGtkcpp"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/gtk/WebInspectorClientGtk.cpp (218088 => 218089)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/WebInspectorClientGtk.cpp     2017-06-12 05:19:00 UTC (rev 218088)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebInspectorClientGtk.cpp        2017-06-12 06:05:05 UTC (rev 218089)
</span><span class="lines">@@ -1,98 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WebInspectorClientGtk.h"
-
-#include "WKAPICast.h"
-#include "WebInspectorProxy.h"
-#include <wtf/text/WTFString.h>
-
-namespace WebKit {
-
-bool WebInspectorClientGtk::openWindow(WebInspectorProxy* inspector)
-{
-    if (!m_client.openWindow)
-        return false;
-    return m_client.openWindow(toAPI(inspector), m_client.base.clientInfo);
-}
-
-void WebInspectorClientGtk::didClose(WebInspectorProxy* inspector)
-{
-    if (!m_client.didClose)
-        return;
-    m_client.didClose(toAPI(inspector), m_client.base.clientInfo);
-}
-
-bool WebInspectorClientGtk::bringToFront(WebInspectorProxy* inspector)
-{
-    if (!m_client.bringToFront)
-        return false;
-    return m_client.bringToFront(toAPI(inspector), m_client.base.clientInfo);
-}
-
-void WebInspectorClientGtk::inspectedURLChanged(WebInspectorProxy* inspector, const String& url)
-{
-    if (!m_client.inspectedURLChanged)
-        return;
-    m_client.inspectedURLChanged(toAPI(inspector), toAPI(url.impl()), m_client.base.clientInfo);
-}
-
-bool WebInspectorClientGtk::attach(WebInspectorProxy* inspector)
-{
-    if (!m_client.attach)
-        return false;
-    return m_client.attach(toAPI(inspector), m_client.base.clientInfo);
-}
-
-bool WebInspectorClientGtk::detach(WebInspectorProxy* inspector)
-{
-    if (!m_client.detach)
-        return false;
-    return m_client.detach(toAPI(inspector), m_client.base.clientInfo);
-}
-
-void WebInspectorClientGtk::didChangeAttachedHeight(WebInspectorProxy* inspector, unsigned height)
-{
-    if (!m_client.didChangeAttachedHeight)
-        return;
-    m_client.didChangeAttachedHeight(toAPI(inspector), height, m_client.base.clientInfo);
-}
-
-void WebInspectorClientGtk::didChangeAttachedWidth(WebInspectorProxy* inspector, unsigned width)
-{
-    if (!m_client.didChangeAttachedWidth)
-        return;
-    m_client.didChangeAttachedWidth(toAPI(inspector), width, m_client.base.clientInfo);
-}
-
-void WebInspectorClientGtk::didChangeAttachAvailability(WebInspectorProxy* inspector, bool available)
-{
-    if (!m_client.didChangeAttachAvailability)
-        return;
-    m_client.didChangeAttachAvailability(toAPI(inspector), available, m_client.base.clientInfo);
-}
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkWebInspectorClientGtkh"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit2/UIProcess/gtk/WebInspectorClientGtk.h (218088 => 218089)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/WebInspectorClientGtk.h       2017-06-12 05:19:00 UTC (rev 218088)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebInspectorClientGtk.h  2017-06-12 06:05:05 UTC (rev 218089)
</span><span class="lines">@@ -1,57 +0,0 @@
</span><del>-/*
- * Copyright (C) 2012 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include "APIClient.h"
-#include "WKInspectorClientGtk.h"
-#include <wtf/text/WTFString.h>
-
-namespace API {
-class Object;
-
-template<> struct ClientTraits<WKInspectorClientGtkBase> {
-    typedef std::tuple<WKInspectorClientGtkV0> Versions;
-};
-}
-
-namespace WebKit {
-
-class WebInspectorProxy;
-
-class WebInspectorClientGtk : public API::Client<WKInspectorClientGtkBase> {
-public:
-    bool openWindow(WebInspectorProxy*);
-    void didClose(WebInspectorProxy*);
-    bool bringToFront(WebInspectorProxy*);
-    void inspectedURLChanged(WebInspectorProxy*, const String& url);
-    bool attach(WebInspectorProxy*);
-    bool detach(WebInspectorProxy*);
-    void didChangeAttachedHeight(WebInspectorProxy*, unsigned height);
-    void didChangeAttachedWidth(WebInspectorProxy*, unsigned width);
-    void didChangeAttachAvailability(WebInspectorProxy*, bool available);
-};
-
-} // namespace WebKit
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkWebInspectorProxyClienthfromrev218086trunkSourceWebKit2UIProcessgtkWebInspectorClientGtkh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyClient.h (from rev 218086, trunk/Source/WebKit2/UIProcess/gtk/WebInspectorClientGtk.h) (0 => 218089)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyClient.h                             (rev 0)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyClient.h        2017-06-12 06:05:05 UTC (rev 218089)
</span><span class="lines">@@ -0,0 +1,47 @@
</span><ins>+/*
+ * Copyright (C) 2012 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <wtf/text/WTFString.h>
+
+namespace WebKit {
+
+class WebInspectorProxy;
+
+class WebInspectorProxyClient {
+public:
+    virtual bool openWindow(WebInspectorProxy&) = 0;
+    virtual void didClose(WebInspectorProxy&) = 0;
+    virtual bool bringToFront(WebInspectorProxy&) = 0;
+    virtual void inspectedURLChanged(WebInspectorProxy&, const String& url) = 0;
+    virtual bool attach(WebInspectorProxy&) = 0;
+    virtual bool detach(WebInspectorProxy&) = 0;
+    virtual void didChangeAttachedHeight(WebInspectorProxy&, unsigned height) = 0;
+    virtual void didChangeAttachedWidth(WebInspectorProxy&, unsigned width) = 0;
+    virtual void didChangeAttachAvailability(WebInspectorProxy&, bool available) = 0;
+};
+
+} // namespace WebKit
</ins></span></pre></div>
<a id="trunkSourceWebKit2UIProcessgtkWebInspectorProxyGtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp (218088 => 218089)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp      2017-06-12 05:19:00 UTC (rev 218088)
+++ trunk/Source/WebKit2/UIProcess/gtk/WebInspectorProxyGtk.cpp 2017-06-12 06:05:05 UTC (rev 218089)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "WebInspectorProxy.h"
</span><span class="cx"> 
</span><ins>+#include "WebInspectorProxyClient.h"
</ins><span class="cx"> #include "WebKitInspectorWindow.h"
</span><span class="cx"> #include "WebKitWebViewBasePrivate.h"
</span><span class="cx"> #include "WebPageGroup.h"
</span><span class="lines">@@ -56,9 +57,9 @@
</span><span class="cx">     return std::max<unsigned long long>(expectedUsage, currentDatabaseUsage * 1.25);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebInspectorProxy::initializeInspectorClientGtk(const WKInspectorClientGtkBase* inspectorClient)
</del><ins>+void WebInspectorProxy::setClient(std::unique_ptr<WebInspectorProxyClient>&& client)
</ins><span class="cx"> {
</span><del>-    m_client.initialize(inspectorClient);
</del><ins>+    m_client = WTFMove(client);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebPageProxy* WebInspectorProxy::platformCreateInspectorPage()
</span><span class="lines">@@ -142,7 +143,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorProxy::createInspectorWindow()
</span><span class="cx"> {
</span><del>-    if (m_client.openWindow(this))
</del><ins>+    if (m_client && m_client->openWindow(*this))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     GtkWidget* inspectedViewParent = gtk_widget_get_toplevel(inspectedPage()->viewWidget());
</span><span class="lines">@@ -184,7 +185,8 @@
</span><span class="cx">     if (m_inspectorView)
</span><span class="cx">         g_signal_handlers_disconnect_by_func(m_inspectorView, reinterpret_cast<void*>(inspectorViewDestroyed), this);
</span><span class="cx"> 
</span><del>-    m_client.didClose(this);
</del><ins>+    if (m_client)
+        m_client->didClose(*this);
</ins><span class="cx"> 
</span><span class="cx">     if (m_inspectorWindow) {
</span><span class="cx">         gtk_widget_destroy(m_inspectorWindow);
</span><span class="lines">@@ -208,7 +210,7 @@
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorProxy::platformBringToFront()
</span><span class="cx"> {
</span><del>-    if (m_client.bringToFront(this))
</del><ins>+    if (m_client && m_client->bringToFront(*this))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     GtkWidget* parent = gtk_widget_get_toplevel(m_inspectorView);
</span><span class="lines">@@ -232,7 +234,8 @@
</span><span class="cx"> void WebInspectorProxy::platformInspectedURLChanged(const String& url)
</span><span class="cx"> {
</span><span class="cx">     m_inspectedURLString = url;
</span><del>-    m_client.inspectedURLChanged(this, url);
</del><ins>+    if (m_client)
+        m_client->inspectedURLChanged(*this, url);
</ins><span class="cx"> 
</span><span class="cx">     if (m_inspectorWindow)
</span><span class="cx">         updateInspectorWindowTitle();
</span><span class="lines">@@ -285,7 +288,7 @@
</span><span class="cx">         platformSetAttachedWindowWidth(std::max(minimumAttachedWidth, std::min(defaultAttachedSize, maximumAttachedWidth)));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (m_client.attach(this))
</del><ins>+    if (m_client && m_client->attach(*this))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     webkitWebViewBaseAddWebInspector(WEBKIT_WEB_VIEW_BASE(inspectedPage()->viewWidget()), m_inspectorView, m_attachmentSide);
</span><span class="lines">@@ -298,7 +301,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     GRefPtr<GtkWidget> inspectorView = m_inspectorView;
</span><del>-    if (!m_client.detach(this)) {
</del><ins>+    if (m_client && !m_client->detach(*this)) {
</ins><span class="cx">         // Detach is called when m_isAttached is true, but it could called before
</span><span class="cx">         // the inspector is opened if the inspector is shown/closed quickly. So,
</span><span class="cx">         // we might not have a parent yet.
</span><span class="lines">@@ -324,7 +327,8 @@
</span><span class="cx">     if (!m_isAttached)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_client.didChangeAttachedHeight(this, height);
</del><ins>+    if (m_client)
+        m_client->didChangeAttachedHeight(*this, height);
</ins><span class="cx">     webkitWebViewBaseSetInspectorViewSize(WEBKIT_WEB_VIEW_BASE(inspectedPage()->viewWidget()), height);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -333,7 +337,8 @@
</span><span class="cx">     if (!m_isAttached)
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_client.didChangeAttachedWidth(this, width);
</del><ins>+    if (m_client)
+        m_client->didChangeAttachedWidth(*this, width);
</ins><span class="cx">     webkitWebViewBaseSetInspectorViewSize(WEBKIT_WEB_VIEW_BASE(inspectedPage()->viewWidget()), width);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -354,7 +359,8 @@
</span><span class="cx"> 
</span><span class="cx"> void WebInspectorProxy::platformAttachAvailabilityChanged(bool available)
</span><span class="cx"> {
</span><del>-    m_client.didChangeAttachAvailability(this, available);
</del><ins>+    if (m_client)
+        m_client->didChangeAttachAvailability(*this, available);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre>
</div>
</div>

</body>
</html>