Web Inspector: Remove InspectorFrontendHost load/saveSessionSetting
authorjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Aug 2011 19:09:34 +0000 (19:09 +0000)
committerjoepeck@webkit.org <joepeck@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Aug 2011 19:09:34 +0000 (19:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=65582

Reviewed by Pavel Feldman.

Source/WebCore:

Remove stale code. WebInspector.settings uses localStorage and
handles the "debuggerEnabled" state. So remove the only remaining
usage of load/saveSessionSetting.

* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendHost.cpp:
* inspector/InspectorFrontendHost.h:
* inspector/InspectorFrontendHost.idl:
* inspector/front-end/InspectorFrontendHostStub.js:
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel.prototype._debuggerWasDisabled):

Source/WebKit/cf:

* WebCoreSupport/WebInspectorClientCF.cpp:

Source/WebKit/mac:

* WebCoreSupport/WebInspectorClient.h:
* WebCoreSupport/WebInspectorClient.mm:

Source/WebKit/win:

* WebCoreSupport/WebInspectorClient.cpp:
* WebCoreSupport/WebInspectorClient.h:

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

15 files changed:
Source/WebCore/ChangeLog
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/ScriptsPanel.js
Source/WebKit/cf/ChangeLog
Source/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebInspectorClient.h
Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
Source/WebKit/win/WebCoreSupport/WebInspectorClient.h

index f3670bc..f6d9fa4 100644 (file)
@@ -1,3 +1,22 @@
+2011-08-03  Joseph Pecoraro  <joepeck@webkit.org>
+
+        Web Inspector: Remove InspectorFrontendHost load/saveSessionSetting
+        https://bugs.webkit.org/show_bug.cgi?id=65582
+
+        Reviewed by Pavel Feldman.
+
+        Remove stale code. WebInspector.settings uses localStorage and
+        handles the "debuggerEnabled" state. So remove the only remaining
+        usage of load/saveSessionSetting.
+
+        * inspector/InspectorFrontendClient.h:
+        * inspector/InspectorFrontendHost.cpp:
+        * inspector/InspectorFrontendHost.h:
+        * inspector/InspectorFrontendHost.idl:
+        * inspector/front-end/InspectorFrontendHostStub.js:
+        * inspector/front-end/ScriptsPanel.js:
+        (WebInspector.ScriptsPanel.prototype._debuggerWasDisabled):
+
 2011-08-03  Adam Barth  <abarth@webkit.org>
 
         Crash in DocumentWriter::endIfNotLoadingMainResource
index 9e72e55..bc8a135 100644 (file)
@@ -63,9 +63,6 @@ public:
     virtual void inspectedURLChanged(const String&) = 0;
 
     virtual void sendMessageToBackend(const String&) = 0;
-
-    virtual void saveSessionSetting(const String&, const String&) { }
-    virtual void loadSessionSetting(const String&, String*) { }
 };
 
 } // namespace WebCore
index ac9dcf7..d2a7033 100644 (file)
@@ -228,20 +228,6 @@ void InspectorFrontendHost::saveAs(const String& fileName, const String& content
         m_client->saveAs(fileName, content);
 }
 
-void InspectorFrontendHost::saveSessionSetting(const String& key, const String& value)
-{
-    if (m_client)
-        m_client->saveSessionSetting(key, value);
-}
-
-String InspectorFrontendHost::loadSessionSetting(const String& key)
-{
-    String value;
-    if (m_client)
-        m_client->loadSessionSetting(key, &value);
-    return value;
-}
-
 void InspectorFrontendHost::sendMessageToBackend(const String& message)
 {
     if (m_client)
index b678bed..decfe9a 100644 (file)
@@ -75,9 +75,6 @@ public:
     void copyText(const String& text);
     void saveAs(const String& fileName, const String& content);
 
-    void saveSessionSetting(const String& key, const String& value);
-    String loadSessionSetting(const String& key);
-
     // Called from [Custom] implementations.
     void showContextMenu(Event*, const Vector<ContextMenuItem*>& items);
     void sendMessageToBackend(const String& message);
index ed04ab8..e989e93 100644 (file)
@@ -50,9 +50,6 @@ module core {
         DOMString localizedStringsURL();
         DOMString hiddenPanels();
 
-        void saveSessionSetting(in DOMString key, in DOMString value);
-        DOMString loadSessionSetting(in DOMString key);
-
         void copyText(in DOMString text);
         void saveAs(in DOMString fileName, in DOMString content);
 
index baf7cc7..84ec3d7 100644 (file)
@@ -138,14 +138,6 @@ WebInspector.InspectorFrontendHostStub.prototype = {
     {
     },
 
-    saveSessionSetting: function(key, value)
-    {
-    },
-
-    loadSessionSetting: function(key)
-    {
-    },
-
     recordActionTaken: function(actionCode)
     {
     },
index 03c3590..a56326d 100644 (file)
@@ -167,7 +167,7 @@ WebInspector.ScriptsPanel = function()
     this._presentationModel.addEventListener(WebInspector.DebuggerPresentationModel.Events.CallFrameSelected, this._callFrameSelected, this);
 
     var enableDebugger = Preferences.debuggerAlwaysEnabled || WebInspector.settings.debuggerEnabled.get();
-    if (enableDebugger || InspectorFrontendHost.loadSessionSetting("debugger-enabled") === "true")
+    if (enableDebugger)
         WebInspector.debuggerModel.enableDebugger();
 }
 
@@ -478,7 +478,6 @@ WebInspector.ScriptsPanel.prototype = {
         if (this._debuggerEnabled)
             return;
 
-        InspectorFrontendHost.saveSessionSetting("debugger-enabled", "true");
         this._debuggerEnabled = true;
         this.reset(true);
     },
@@ -488,7 +487,6 @@ WebInspector.ScriptsPanel.prototype = {
         if (!this._debuggerEnabled)
             return;
 
-        InspectorFrontendHost.saveSessionSetting("debugger-enabled", "false");
         this._debuggerEnabled = false;
         this.reset(true);
     },
index abcc065..4a43c5b 100644 (file)
@@ -1,3 +1,12 @@
+2011-08-03  Joseph Pecoraro  <joepeck@webkit.org>
+
+        Web Inspector: Remove InspectorFrontendHost load/saveSessionSetting
+        https://bugs.webkit.org/show_bug.cgi?id=65582
+
+        Reviewed by Pavel Feldman.
+
+        * WebCoreSupport/WebInspectorClientCF.cpp:
+
 2011-03-15  Kevin Ollivier  <kevino@theolliviers.com>
 
         Reviewed by Darin Adler.
index 0362dac..847c784 100644 (file)
@@ -131,18 +131,6 @@ void WebInspectorClient::releaseFrontendPage()
     m_frontendPage = 0;
 }
 
-void WebInspectorClient::saveSessionSetting(const String& key, const String& value)
-{
-    if (!key.isEmpty())
-        m_sessionSettings.set(key, value);
-}
-
-void WebInspectorClient::loadSessionSetting(const String& key, String* value)
-{
-    if (!key.isEmpty())
-        *value = m_sessionSettings.get(key);
-}
-
 WTF::PassOwnPtr<WebCore::InspectorFrontendClientLocal::Settings> WebInspectorClient::createFrontendSettings()
 {
     class InspectorFrontendSettingsCF : public WebCore::InspectorFrontendClientLocal::Settings {
index 280dc0b..a0768ff 100644 (file)
@@ -1,3 +1,13 @@
+2011-08-03  Joseph Pecoraro  <joepeck@webkit.org>
+
+        Web Inspector: Remove InspectorFrontendHost load/saveSessionSetting
+        https://bugs.webkit.org/show_bug.cgi?id=65582
+
+        Reviewed by Pavel Feldman.
+
+        * WebCoreSupport/WebInspectorClient.h:
+        * WebCoreSupport/WebInspectorClient.mm:
+
 2011-08-03  Pavel Feldman  <pfeldman@google.com>
 
         Web Inspector: [Timeline] Hover on paint events and see rect outline around that area.
index f9cee65..b85d573 100644 (file)
@@ -69,17 +69,12 @@ public:
 
     void releaseFrontendPage();
 
-    void saveSessionSetting(const String& key, const String& value);
-    void loadSessionSetting(const String& key, String* value);
-
 private:
     WTF::PassOwnPtr<WebCore::InspectorFrontendClientLocal::Settings> createFrontendSettings();
 
     WebView *m_webView;
     RetainPtr<WebNodeHighlighter> m_highlighter;
     WebCore::Page* m_frontendPage;
-
-    WTF::HashMap<WTF::String, WTF::String> m_sessionSettings;
 };
 
 
@@ -102,9 +97,6 @@ public:
     virtual void setAttachedWindowHeight(unsigned height);
     virtual void inspectedURLChanged(const WTF::String& newURL);
 
-    virtual void saveSessionSetting(const String& key, const String& value);
-    virtual void loadSessionSetting(const String& key, String* value);
-
 private:
     void updateWindowTitle() const;
 
index 20a1b1b..f4d86ae 100644 (file)
@@ -190,20 +190,6 @@ void WebInspectorFrontendClient::inspectedURLChanged(const String& newURL)
     updateWindowTitle();
 }
 
-void WebInspectorFrontendClient::saveSessionSetting(const String& key, const String& value)
-{
-    WebInspectorClient* client = [m_windowController.get() inspectorClient];
-    if (client)
-        client->saveSessionSetting(key, value);
-}
-
-void WebInspectorFrontendClient::loadSessionSetting(const String& key, String* value)
-{
-    WebInspectorClient* client = [m_windowController.get() inspectorClient];
-    if (client)
-        client->loadSessionSetting(key, value);
-}
-
 void WebInspectorFrontendClient::updateWindowTitle() const
 {
     NSString *title = [NSString stringWithFormat:UI_STRING_INTERNAL("Web Inspector — %@", "Web Inspector window title"), (NSString *)m_inspectedURL];
index 42ab7b3..f4adb95 100644 (file)
@@ -1,3 +1,13 @@
+2011-08-03  Joseph Pecoraro  <joepeck@webkit.org>
+
+        Web Inspector: Remove InspectorFrontendHost load/saveSessionSetting
+        https://bugs.webkit.org/show_bug.cgi?id=65582
+
+        Reviewed by Pavel Feldman.
+
+        * WebCoreSupport/WebInspectorClient.cpp:
+        * WebCoreSupport/WebInspectorClient.h:
+
 2011-08-03  Adam Roben  <aroben@apple.com>
 
         Windows nightly build fix after r91777
index 12a1087..4f8e033 100644 (file)
@@ -319,16 +319,6 @@ void WebInspectorFrontendClient::inspectedURLChanged(const String& newURL)
     updateWindowTitle();
 }
 
-void WebInspectorFrontendClient::saveSessionSetting(const String& key, const String& value)
-{
-    m_inspectorClient->saveSessionSetting(key, value);
-}
-
-void WebInspectorFrontendClient::loadSessionSetting(const String& key, String* value)
-{
-    m_inspectorClient->loadSessionSetting(key, value);
-}
-
 void WebInspectorFrontendClient::closeWindowWithoutNotifications()
 {
     if (!m_frontendHwnd)
index 60daeb5..6e64f2c 100644 (file)
@@ -75,9 +75,6 @@ public:
         releaseFrontendPage();
     }
 
-    void saveSessionSetting(const WTF::String& key, const WTF::String& value);
-    void loadSessionSetting(const WTF::String& key, WTF::String* value);
-
 private:
     virtual ~WebInspectorClient();
     WTF::PassOwnPtr<WebCore::InspectorFrontendClientLocal::Settings> createFrontendSettings();
@@ -88,8 +85,6 @@ private:
     HWND m_frontendHwnd;
 
     OwnPtr<WebNodeHighlight> m_highlight;
-
-    WTF::HashMap<WTF::String, WTF::String> m_sessionSettings;
 };
 
 class WebInspectorFrontendClient : public WebCore::InspectorFrontendClientLocal, WebCore::WindowMessageListener {
@@ -112,9 +107,6 @@ public:
     virtual void setAttachedWindowHeight(unsigned height);
     virtual void inspectedURLChanged(const WTF::String& newURL);
 
-    virtual void saveSessionSetting(const WTF::String& key, const WTF::String& value);
-    virtual void loadSessionSetting(const WTF::String& key, WTF::String* value);
-
 private:
     void closeWindowWithoutNotifications();
     void showWindowWithoutNotifications();