Web Inspector: remove disconnectFromBackend from the protocol.
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 26 Nov 2011 15:30:38 +0000 (15:30 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 26 Nov 2011 15:30:38 +0000 (15:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=73127

Source/WebCore:

Patch by Pavel Feldman <pfeldman@google.com> on 2011-11-26
Reviewed by Yury Semikhatsky.

* inspector/Inspector.json:
* inspector/InspectorAgent.cpp:
(WebCore::InspectorAgent::inspectedPageDestroyed):
* inspector/InspectorClient.h:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::close):
* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendHost.cpp:
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* inspector/front-end/InspectorFrontendHostStub.js:
* inspector/front-end/inspector.js:
(WebInspector.disconnectFromWorker):
* loader/EmptyClients.h:
(WebCore::EmptyInspectorClient::closeInspectorFrontend):

Source/WebKit/chromium:

We should instead use InspectorClient::closeInspectorFrontend that would
be closing the front-end window.

Patch by Pavel Feldman <pfeldman@google.com> on 2011-11-26
Reviewed by Yury Semikhatsky.

* src/InspectorClientImpl.cpp:
(WebKit::InspectorClientImpl::closeInspectorFrontend):
* src/InspectorClientImpl.h:
* src/InspectorFrontendClientImpl.cpp:
* src/InspectorFrontendClientImpl.h:
* src/WebDevToolsAgentImpl.cpp:
(WebKit::WebDevToolsAgentImpl::closeInspectorFrontend):
(WebKit::WebDevToolsAgent::disconnectEventAsText):
* src/WebDevToolsAgentImpl.h:

Source/WebKit/gtk:

Patch by Pavel Feldman <pfeldman@google.com> on 2011-11-26
Reviewed by Yury Semikhatsky.

* WebCoreSupport/InspectorClientGtk.cpp:
(WebKit::InspectorClient::inspectorDestroyed):
(WebKit::InspectorClient::closeInspectorFrontend):
* WebCoreSupport/InspectorClientGtk.h:

Source/WebKit/mac:

Patch by Pavel Feldman <pfeldman@google.com> on 2011-11-26
Reviewed by Yury Semikhatsky.

* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:
(WebInspectorClient::inspectorDestroyed):
(WebInspectorClient::closeInspectorFrontend):

Source/WebKit/qt:

Patch by Pavel Feldman <pfeldman@google.com> on 2011-11-26
Reviewed by Yury Semikhatsky.

* WebCoreSupport/InspectorClientQt.cpp:
(WebCore::InspectorClientQt::inspectorDestroyed):
(WebCore::InspectorClientQt::closeInspectorFrontend):
(WebCore::InspectorFrontendClientQt::inspectorClientDestroyed):
* WebCoreSupport/InspectorClientQt.h:

Source/WebKit/win:

Patch by Pavel Feldman <pfeldman@google.com> on 2011-11-26
Reviewed by Yury Semikhatsky.

* WebCoreSupport/WebInspectorClient.cpp:
(WebInspectorClient::inspectorDestroyed):
(WebInspectorClient::closeInspectorFrontend):
* WebCoreSupport/WebInspectorClient.h:

Source/WebKit2:

Patch by Pavel Feldman <pfeldman@google.com> on 2011-11-26
Reviewed by Yury Semikhatsky.

* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::inspectorDestroyed):
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:

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

42 files changed:
Source/WebCore/ChangeLog
Source/WebCore/inspector/Inspector.json
Source/WebCore/inspector/InspectorAgent.cpp
Source/WebCore/inspector/InspectorClient.h
Source/WebCore/inspector/InspectorController.cpp
Source/WebCore/inspector/InspectorFrontendClient.h
Source/WebCore/inspector/InspectorFrontendHost.cpp
Source/WebCore/inspector/InspectorFrontendHost.h
Source/WebCore/inspector/InspectorFrontendHost.idl
Source/WebCore/inspector/front-end/InspectorFrontendHostStub.js
Source/WebCore/inspector/front-end/inspector.js
Source/WebCore/loader/EmptyClients.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/InspectorClientImpl.cpp
Source/WebKit/chromium/src/InspectorClientImpl.h
Source/WebKit/chromium/src/InspectorFrontendClientImpl.cpp
Source/WebKit/chromium/src/InspectorFrontendClientImpl.h
Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
Source/WebKit/chromium/src/WebDevToolsAgentImpl.h
Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.cpp
Source/WebKit/efl/WebCoreSupport/InspectorClientEfl.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
Source/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h
Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
Source/WebKit/qt/WebCoreSupport/InspectorClientQt.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
Source/WebKit/win/WebCoreSupport/WebInspectorClient.h
Source/WebKit/wince/WebCoreSupport/InspectorClientWinCE.cpp
Source/WebKit/wince/WebCoreSupport/InspectorClientWinCE.h
Source/WebKit/wx/WebKitSupport/InspectorClientWx.cpp
Source/WebKit/wx/WebKitSupport/InspectorClientWx.h
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h
Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.h

index 0a4b58e..f5678df 100644 (file)
@@ -1,3 +1,26 @@
+2011-11-26  Pavel Feldman  <pfeldman@google.com>
+
+        Web Inspector: remove disconnectFromBackend from the protocol.
+        https://bugs.webkit.org/show_bug.cgi?id=73127
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/Inspector.json:
+        * inspector/InspectorAgent.cpp:
+        (WebCore::InspectorAgent::inspectedPageDestroyed):
+        * inspector/InspectorClient.h:
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::close):
+        * inspector/InspectorFrontendClient.h:
+        * inspector/InspectorFrontendHost.cpp:
+        * inspector/InspectorFrontendHost.h:
+        * inspector/InspectorFrontendHost.idl:
+        * inspector/front-end/InspectorFrontendHostStub.js:
+        * inspector/front-end/inspector.js:
+        (WebInspector.disconnectFromWorker):
+        * loader/EmptyClients.h:
+        (WebCore::EmptyInspectorClient::closeInspectorFrontend):
+
 2011-11-26  Timothy Hatcher  <timothy@apple.com>
 
         Fix a bug in TreeOutline which would cause parent elements to show up as expanded and empty
index 09d45cf..0ece069 100644 (file)
@@ -8,7 +8,7 @@
         ],
         "events": [
             {
-                "name": "disconnectFromBackend"
+                "name": "disconnectFromWorker"
             },
             {
                 "name": "evaluateForTestInFrontend",
index 5032c17..c40ae51 100644 (file)
@@ -83,8 +83,6 @@ InspectorAgent::~InspectorAgent()
 
 void InspectorAgent::inspectedPageDestroyed()
 {
-    if (m_frontend)
-        m_frontend->inspector()->disconnectFromBackend();
     ASSERT(m_inspectedPage);
     m_inspectedPage = 0;
 }
index 9fad5d6..83ab232 100644 (file)
@@ -44,6 +44,7 @@ public:
     virtual void inspectorDestroyed() = 0;
 
     virtual void openInspectorFrontend(InspectorController*) = 0;
+    virtual void closeInspectorFrontend() = 0;
     virtual void bringFrontendToFront() = 0;
 
     virtual void highlight() = 0;
index d211b4e..16bbaed 100644 (file)
@@ -271,8 +271,8 @@ void InspectorController::close()
 {
     if (!m_inspectorFrontend)
         return;
-    m_inspectorFrontend->inspector()->disconnectFromBackend();
     disconnectFrontend();
+    m_inspectorClient->closeInspectorFrontend();
 }
 
 void InspectorController::restoreInspectorStateFromCookie(const String& inspectorStateCookie)
index bc8a135..78dbbaa 100644 (file)
@@ -53,7 +53,6 @@ public:
 
     virtual void bringToFront() = 0;
     virtual void closeWindow() = 0;
-    virtual void disconnectFromBackend() = 0;
 
     virtual void requestAttachWindow() = 0;
     virtual void requestDetachWindow() = 0;
index 9f49b4d..0ce2db5 100644 (file)
@@ -169,14 +169,6 @@ void InspectorFrontendHost::closeWindow()
     }
 }
 
-void InspectorFrontendHost::disconnectFromBackend()
-{
-    if (m_client) {
-        m_client->disconnectFromBackend();
-        disconnectClient(); // Disconnect from client.
-    }
-}
-
 void InspectorFrontendHost::bringToFront()
 {
     if (m_client)
index 97b558c..1d0769a 100644 (file)
@@ -61,7 +61,6 @@ public:
     void requestAttachWindow();
     void requestDetachWindow();
     void closeWindow();
-    void disconnectFromBackend();
     void bringToFront();
     void inspectedURLChanged(const String&);
 
index db9436b..afefd46 100644 (file)
@@ -36,7 +36,6 @@ module core {
     ] InspectorFrontendHost {
         void loaded();
         void closeWindow();
-        void disconnectFromBackend();
         void bringToFront();
         void inspectedURLChanged(in DOMString newURL);
 
index 590e055..ea603e7 100644 (file)
@@ -65,11 +65,6 @@ WebInspector.InspectorFrontendHostStub.prototype = {
         this._windowVisible = false;
     },
 
-    disconnectFromBackend: function()
-    {
-        this._windowVisible = false;
-    },
-
     attach: function()
     {
     },
index b27e7ff..103fccc 100644 (file)
@@ -466,12 +466,9 @@ WebInspector.close = function(event)
     InspectorFrontendHost.closeWindow();
 }
 
-WebInspector.disconnectFromBackend = function()
+WebInspector.disconnectFromWorker = function()
 {
-    if (WebInspector.WorkerManager.isWorkerFrontend())
-        WebInspector.WorkerManager.showWorkerTerminatedScreen();
-    else
-        InspectorFrontendHost.disconnectFromBackend();
+    WebInspector.WorkerManager.showWorkerTerminatedScreen();
 }
 
 WebInspector.documentClick = function(event)
index 40045a3..3f8a8a6 100644 (file)
@@ -590,6 +590,7 @@ public:
     virtual void inspectorDestroyed() { }
     
     virtual void openInspectorFrontend(InspectorController*) { }
+    virtual void closeInspectorFrontend() { }
     virtual void bringFrontendToFront() { }
 
     virtual void highlight() { }
index a7e689b..9d164f3 100644 (file)
@@ -1,3 +1,23 @@
+2011-11-26  Pavel Feldman  <pfeldman@google.com>
+
+        Web Inspector: remove disconnectFromBackend from the protocol.
+        https://bugs.webkit.org/show_bug.cgi?id=73127
+
+        We should instead use InspectorClient::closeInspectorFrontend that would
+        be closing the front-end window.
+
+        Reviewed by Yury Semikhatsky.
+
+        * src/InspectorClientImpl.cpp:
+        (WebKit::InspectorClientImpl::closeInspectorFrontend):
+        * src/InspectorClientImpl.h:
+        * src/InspectorFrontendClientImpl.cpp:
+        * src/InspectorFrontendClientImpl.h:
+        * src/WebDevToolsAgentImpl.cpp:
+        (WebKit::WebDevToolsAgentImpl::closeInspectorFrontend):
+        (WebKit::WebDevToolsAgent::disconnectEventAsText):
+        * src/WebDevToolsAgentImpl.h:
+
 2011-11-25  Yury Semikhatsky  <yurys@chromium.org>
 
         [Chromium] Web Inspector: assertion failure in InspectorController::restoreInspectorStateFromCookie
index c9af7b8..9f5aad1 100644 (file)
@@ -69,6 +69,12 @@ void InspectorClientImpl::openInspectorFrontend(InspectorController* controller)
         agent->openInspectorFrontend(controller);
 }
 
+void InspectorClientImpl::closeInspectorFrontend()
+{
+    if (WebDevToolsAgentImpl* agent = devToolsAgent())
+        agent->closeInspectorFrontend();
+}
+
 void InspectorClientImpl::bringFrontendToFront()
 {
     if (WebDevToolsAgentImpl* agent = devToolsAgent())
index 743bde6..0e900b5 100644 (file)
@@ -49,6 +49,7 @@ public:
     // InspectorClient methods:
     virtual void inspectorDestroyed();
     virtual void openInspectorFrontend(WebCore::InspectorController*);
+    virtual void closeInspectorFrontend();
     virtual void bringFrontendToFront();
 
     virtual void highlight();
index 114036e..a62ac49 100644 (file)
@@ -105,11 +105,6 @@ void InspectorFrontendClientImpl::closeWindow()
     m_client->closeWindow();
 }
 
-void InspectorFrontendClientImpl::disconnectFromBackend()
-{
-    m_client->closeWindow();
-}
-
 void InspectorFrontendClientImpl::requestAttachWindow()
 {
     m_client->requestDockWindow();
index fd45f5b..f16535c 100644 (file)
@@ -61,7 +61,6 @@ public:
 
     virtual void bringToFront();
     virtual void closeWindow();
-    virtual void disconnectFromBackend();
 
     virtual void requestAttachWindow();
     virtual void requestDetachWindow();
index 704a77f..cd6b09c 100644 (file)
@@ -268,6 +268,10 @@ void WebDevToolsAgentImpl::openInspectorFrontend(InspectorController*)
 {
 }
 
+void WebDevToolsAgentImpl::closeInspectorFrontend()
+{
+}
+
 void WebDevToolsAgentImpl::bringFrontendToFront()
 {
 }
@@ -385,7 +389,7 @@ WebString WebDevToolsAgent::disconnectEventAsText()
         String m_message;
     } channel;
     InspectorFrontend::Inspector inspector(&channel);
-    inspector.disconnectFromBackend();
+    inspector.disconnectFromWorker();
     return channel.m_message;
 }
 
index 63f79ab..91a8891 100644 (file)
@@ -85,6 +85,8 @@ public:
     // InspectorClient implementation.
     virtual void inspectorDestroyed();
     virtual void openInspectorFrontend(WebCore::InspectorController*);
+    virtual void closeInspectorFrontend();
+
     virtual void bringFrontendToFront();
     virtual void highlight();
     virtual void hideHighlight();
index 15147d6..7e29758 100644 (file)
@@ -38,6 +38,11 @@ void InspectorClientEfl::openInspectorFrontend(InspectorController*)
     notImplemented();
 }
 
+void InspectorClientEfl::closeInspectorFrontend()
+{
+    notImplemented();
+}
+
 void InspectorClientEfl::bringFrontendToFront()
 {
     notImplemented();
index e91d943..f92e94d 100644 (file)
@@ -43,6 +43,7 @@ public:
     virtual void inspectorDestroyed();
 
     virtual void openInspectorFrontend(InspectorController*);
+    virtual void closeInspectorFrontend();
     virtual void bringFrontendToFront();
 
     virtual void highlight();
index 4f7526a..64a2048 100644 (file)
@@ -1,3 +1,15 @@
+2011-11-26  Pavel Feldman  <pfeldman@google.com>
+
+        Web Inspector: remove disconnectFromBackend from the protocol.
+        https://bugs.webkit.org/show_bug.cgi?id=73127
+
+        Reviewed by Yury Semikhatsky.
+
+        * WebCoreSupport/InspectorClientGtk.cpp:
+        (WebKit::InspectorClient::inspectorDestroyed):
+        (WebKit::InspectorClient::closeInspectorFrontend):
+        * WebCoreSupport/InspectorClientGtk.h:
+
 2011-11-17  Martin Robinson  <mrobinson@igalia.com>
 
         [GTK] Integrate build-gtkdoc into build-webkit and make
index e15b904..2e55ca3 100644 (file)
@@ -117,6 +117,7 @@ InspectorClient::~InspectorClient()
 
 void InspectorClient::inspectorDestroyed()
 {
+    closeInspectorFrontend();
     delete this;
 }
 
@@ -156,6 +157,12 @@ void InspectorClient::openInspectorFrontend(InspectorController* controller)
     m_frontendPage->setGroupName("");
 }
 
+void InspectorClient::closeInspectorFrontend()
+{
+    if (m_frontendClient)
+        m_frontendClient->destroyInspectorWindow(false);
+}
+
 void InspectorClient::bringFrontendToFront()
 {
     m_frontendClient->bringToFront();
@@ -275,11 +282,6 @@ void InspectorFrontendClient::closeWindow()
     destroyInspectorWindow(true);
 }
 
-void InspectorFrontendClient::disconnectFromBackend()
-{
-    destroyInspectorWindow(false);
-}
-
 void InspectorFrontendClient::attachWindow()
 {
     if (!m_inspectorWebView)
index 158b01f..c692e8f 100644 (file)
@@ -54,6 +54,7 @@ namespace WebKit {
         virtual void inspectorDestroyed();
 
         virtual void openInspectorFrontend(WebCore::InspectorController*);
+        virtual void closeInspectorFrontend();
         virtual void bringFrontendToFront();
 
         virtual void highlight();
@@ -86,7 +87,6 @@ namespace WebKit {
 
         virtual void bringToFront();
         virtual void closeWindow();
-        virtual void disconnectFromBackend();
 
         virtual void attachWindow();
         virtual void detachWindow();
index 1dc1476..878053e 100644 (file)
@@ -1,3 +1,15 @@
+2011-11-26  Pavel Feldman  <pfeldman@google.com>
+
+        Web Inspector: remove disconnectFromBackend from the protocol.
+        https://bugs.webkit.org/show_bug.cgi?id=73127
+
+        Reviewed by Yury Semikhatsky.
+
+        * WebCoreSupport/WebInspectorClient.h:
+        * WebCoreSupport/WebInspectorClient.mm:
+        (WebInspectorClient::inspectorDestroyed):
+        (WebInspectorClient::closeInspectorFrontend):
+
 2011-11-22  Pavel Feldman  <pfeldman@google.com>
 
         Web Inspector: remove Inspector::bringToFront from the protocol.
index 6fde886..52880bd 100644 (file)
@@ -51,6 +51,8 @@ class Page;
 
 }
 
+class WebInspectorFrontendClient;
+
 class WebInspectorClient : public WebCore::InspectorClient {
 public:
     WebInspectorClient(WebView *);
@@ -58,6 +60,7 @@ public:
     virtual void inspectorDestroyed() OVERRIDE;
 
     virtual void openInspectorFrontend(WebCore::InspectorController*) OVERRIDE;
+    virtual void closeInspectorFrontend() OVERRIDE;
     virtual void bringFrontendToFront() OVERRIDE;
 
     virtual void highlight() OVERRIDE;
@@ -76,7 +79,7 @@ private:
     WebView *m_webView;
     RetainPtr<WebNodeHighlighter> m_highlighter;
     WebCore::Page* m_frontendPage;
-    WebCore::InspectorFrontendClient* m_frontendClient;
+    WebInspectorFrontendClient* m_frontendClient;
 };
 
 
index ab87c11..ce881a5 100644 (file)
@@ -83,6 +83,7 @@ WebInspectorClient::WebInspectorClient(WebView *webView)
 
 void WebInspectorClient::inspectorDestroyed()
 {
+    closeInspectorFrontend();
     delete this;
 }
 
@@ -99,6 +100,12 @@ void WebInspectorClient::openInspectorFrontend(InspectorController* inspectorCon
     m_frontendPage->inspectorController()->setInspectorFrontendClient(frontendClient.release());
 }
 
+void WebInspectorClient::closeInspectorFrontend()
+{
+    if (m_frontendClient)
+        m_frontendClient->disconnectFromBackend();
+}
+
 void WebInspectorClient::bringFrontendToFront()
 {
     m_frontendClient->bringToFront();
index 88fe66e..aebc6d8 100644 (file)
@@ -1,3 +1,16 @@
+2011-11-26  Pavel Feldman  <pfeldman@google.com>
+
+        Web Inspector: remove disconnectFromBackend from the protocol.
+        https://bugs.webkit.org/show_bug.cgi?id=73127
+
+        Reviewed by Yury Semikhatsky.
+
+        * WebCoreSupport/InspectorClientQt.cpp:
+        (WebCore::InspectorClientQt::inspectorDestroyed):
+        (WebCore::InspectorClientQt::closeInspectorFrontend):
+        (WebCore::InspectorFrontendClientQt::inspectorClientDestroyed):
+        * WebCoreSupport/InspectorClientQt.h:
+
 2011-11-25  Alexis Menard  <alexis.menard@openbossa.org>
 
         [Qt][WK2] QWebDownloadItem should be registered in the experimental plugin.
index 36b47d5..fdb6da3 100644 (file)
@@ -189,8 +189,7 @@ InspectorClientQt::InspectorClientQt(QWebPage* page)
 void InspectorClientQt::inspectorDestroyed()
 {
 #if ENABLE(INSPECTOR)
-    if (m_frontendClient)
-        m_frontendClient->inspectorClientDestroyed();
+    closeInspectorFrontend();
 
     InspectorServerQt* webInspectorServer = InspectorServerQt::server();
     if (webInspectorServer)
@@ -243,6 +242,12 @@ void InspectorClientQt::openInspectorFrontend(WebCore::InspectorController* insp
 #endif
 }
 
+void InspectorClientQt::closeInspectorFrontend()
+{
+    if (m_frontendClient)
+        m_frontendClient->inspectorClientDestroyed();
+}
+
 void InspectorClientQt::bringFrontendToFront()
 {
     m_frontendClient->bringToFront();
@@ -348,11 +353,6 @@ void InspectorFrontendClientQt::closeWindow()
     destroyInspectorView(true);
 }
 
-void InspectorFrontendClientQt::disconnectFromBackend()
-{
-    destroyInspectorView(false);
-}
-
 void InspectorFrontendClientQt::attachWindow()
 {
     notImplemented();
@@ -407,6 +407,7 @@ void InspectorFrontendClientQt::destroyInspectorView(bool notifyInspectorControl
 
 void InspectorFrontendClientQt::inspectorClientDestroyed()
 {
+    destroyInspectorView(false);
     m_inspectorClient = 0;
     m_inspectedWebPage = 0;
 }
index c649c6b..c94d61a 100644 (file)
@@ -52,6 +52,7 @@ public:
     virtual void inspectorDestroyed();
 
     virtual void openInspectorFrontend(WebCore::InspectorController*);
+    virtual void closeInspectorFrontend();
     virtual void bringFrontendToFront();
 
     virtual void highlight();
@@ -87,7 +88,6 @@ public:
 
     virtual void bringToFront();
     virtual void closeWindow();
-    virtual void disconnectFromBackend();
 
     virtual void attachWindow();
     virtual void detachWindow();
index fe74ea1..2692df3 100644 (file)
@@ -1,3 +1,15 @@
+2011-11-26  Pavel Feldman  <pfeldman@google.com>
+
+        Web Inspector: remove disconnectFromBackend from the protocol.
+        https://bugs.webkit.org/show_bug.cgi?id=73127
+
+        Reviewed by Yury Semikhatsky.
+
+        * WebCoreSupport/WebInspectorClient.cpp:
+        (WebInspectorClient::inspectorDestroyed):
+        (WebInspectorClient::closeInspectorFrontend):
+        * WebCoreSupport/WebInspectorClient.h:
+
 2011-11-22  Pavel Feldman  <pfeldman@google.com>
 
         Web Inspector: remove Inspector::bringToFront from the protocol.
index f5e2f38..f1eaaec 100644 (file)
@@ -82,6 +82,7 @@ WebInspectorClient::~WebInspectorClient()
 
 void WebInspectorClient::inspectorDestroyed()
 {
+    closeInspectorFrontend();
     delete this;
 }
 
@@ -178,6 +179,12 @@ void WebInspectorClient::openInspectorFrontend(InspectorController* inspectorCon
     m_frontendHwnd = frontendHwnd;
 }
 
+void WebInspectorClient::closeInspectorFrontend()
+{
+    if (m_frontendClient)
+        m_frontendClient->destroyInspectorView(false);
+}
+
 void WebInspectorClient::bringFrontendToFront()
 {
     m_frontendClient->bringToFront();
@@ -271,11 +278,6 @@ void WebInspectorFrontendClient::closeWindow()
     destroyInspectorView(true);
 }
 
-void WebInspectorFrontendClient::disconnectFromBackend()
-{
-    destroyInspectorView(false);
-}
-
 void WebInspectorFrontendClient::attachWindow()
 {
     if (m_attached)
index 0b9c1a4..a43fbeb 100644 (file)
@@ -58,6 +58,7 @@ public:
     virtual void inspectorDestroyed();
 
     virtual void openInspectorFrontend(WebCore::InspectorController*);
+    virtual void closeInspectorFrontend();
     virtual void bringFrontendToFront();
 
     virtual void highlight();
@@ -113,12 +114,12 @@ public:
     virtual void setAttachedWindowHeight(unsigned height);
     virtual void inspectedURLChanged(const WTF::String& newURL);
 
+    void destroyInspectorView(bool notifyInspectorController);
+
 private:
     void closeWindowWithoutNotifications();
     void showWindowWithoutNotifications();
 
-    void destroyInspectorView(bool notifyInspectorController);
-
     void updateWindowTitle();
 
     LRESULT onGetMinMaxInfo(WPARAM, LPARAM);
index dc7acc7..5bb34ef 100644 (file)
@@ -50,6 +50,11 @@ void InspectorClientWinCE::openInspectorFrontend(InspectorController* controller
     notImplemented();
 }
 
+void InspectorClientWinCE::closeInspectorFrontend()
+{
+    notImplemented();
+}
+
 void InspectorClientWinCE::bringFrontendToFront()
 {
     notImplemented();
index a6080ae..dfd8230 100644 (file)
@@ -39,6 +39,7 @@ public:
     virtual void inspectorDestroyed();
 
     virtual void openInspectorFrontend(WebCore::InspectorController*);
+    virtual void closeInspectorFrontend();
     virtual void bringFrontendToFront();
 
     virtual void highlight();
index e3c4dbc..8a4e792 100644 (file)
@@ -52,6 +52,11 @@ void InspectorClientWx::openInspectorFrontend(WebCore::InspectorController*)
     notImplemented();
 }
 
+void InspectorClientWx::closeInspectorFrontend()
+{
+    notImplemented();
+}
+
 void InspectorClientWx::bringFrontendToFront()
 {
     notImplemented();
index 029c216..e10e67b 100644 (file)
@@ -41,6 +41,7 @@ public:
     virtual void inspectorDestroyed();
 
     virtual void openInspectorFrontend(WebCore::InspectorController*);
+    virtual void closeInspectorFrontend();
     virtual void bringFrontendToFront();
 
     virtual void highlight();
index 3872404..9e45a06 100644 (file)
@@ -1,3 +1,15 @@
+2011-11-26  Pavel Feldman  <pfeldman@google.com>
+
+        Web Inspector: remove disconnectFromBackend from the protocol.
+        https://bugs.webkit.org/show_bug.cgi?id=73127
+
+        Reviewed by Yury Semikhatsky.
+
+        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
+        (WebKit::WebInspectorClient::inspectorDestroyed):
+        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
+        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
+
 2011-11-25  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
 
         [Qt] [WK2] Remove WebContext related code from QtWebPageProxy
index 491ee57..54b477e 100644 (file)
@@ -39,6 +39,7 @@ namespace WebKit {
 
 void WebInspectorClient::inspectorDestroyed()
 {
+    closeInspectorFrontend();
     delete this;
 }
 
@@ -48,6 +49,11 @@ void WebInspectorClient::openInspectorFrontend(InspectorController*)
     ASSERT_UNUSED(inspectorPage, inspectorPage);
 }
 
+void WebInspectorClient::closeInspectorFrontend()
+{
+    m_page->inspector()->didClose();
+}
+
 void WebInspectorClient::bringFrontendToFront()
 {
     m_page->inspector()->bringToFront();
index 849ad22..3970030 100644 (file)
@@ -53,6 +53,7 @@ private:
     virtual void inspectorDestroyed() OVERRIDE;
 
     virtual void openInspectorFrontend(WebCore::InspectorController*) OVERRIDE;
+    virtual void closeInspectorFrontend() OVERRIDE;
     virtual void bringFrontendToFront() OVERRIDE;
 
     virtual void highlight() OVERRIDE;
index 8a98195..09e1d37 100644 (file)
@@ -74,11 +74,6 @@ void WebInspectorFrontendClient::closeWindow()
     m_page->inspector()->didClose();
 }
 
-void WebInspectorFrontendClient::disconnectFromBackend()
-{
-    m_page->inspector()->didClose();
-}
-
 void WebInspectorFrontendClient::attachWindow()
 {
     m_page->inspector()->attach();
index d8b17bd..3183ab0 100644 (file)
@@ -46,7 +46,6 @@ private:
 
     virtual void bringToFront() OVERRIDE;
     virtual void closeWindow() OVERRIDE;
-    virtual void disconnectFromBackend() OVERRIDE;
 
     virtual void attachWindow() OVERRIDE;
     virtual void detachWindow() OVERRIDE;