[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

loislo at chromium.org loislo at chromium.org
Wed Dec 22 11:49:33 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit f2f6283448dbac3ce324e70bc687371bd4864d00
Author: loislo at chromium.org <loislo at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Aug 8 16:47:39 2010 +0000

    2010-08-08  Ilya Tikhonovsky  <loislo at chromium.org>
    
            Reviewed by Pavel Feldman.
    
            WebInspector: remove hand written InspectorFrontend from almost all places.
            https://bugs.webkit.org/show_bug.cgi?id=43630
    
            * inspector/ConsoleMessage.cpp:
            * inspector/InjectedScriptHost.cpp:
            (WebCore::InjectedScriptHost::pushNodePathToFrontend):
            * inspector/InjectedScriptHost.h:
            * inspector/Inspector.idl:
            * inspector/InspectorBackend.cpp:
            * inspector/InspectorController.cpp:
            (WebCore::InspectorController::inspectedPageDestroyed):
            (WebCore::InspectorController::inspect):
            (WebCore::InspectorController::focusNode):
            (WebCore::InspectorController::windowVisible):
            (WebCore::InspectorController::addConsoleMessage):
            (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
            (WebCore::InspectorController::setSearchingForNode):
            (WebCore::InspectorController::setMonitoringXHR):
            (WebCore::InspectorController::connectFrontend):
            (WebCore::InspectorController::show):
            (WebCore::InspectorController::showPanel):
            (WebCore::InspectorController::close):
            (WebCore::InspectorController::disconnectFrontend):
            (WebCore::InspectorController::populateScriptObjects):
            (WebCore::InspectorController::didCommitLoad):
            (WebCore::InspectorController::enableResourceTracking):
            (WebCore::InspectorController::disableResourceTracking):
            (WebCore::InspectorController::startTimelineProfiler):
            (WebCore::InspectorController::stopTimelineProfiler):
            (WebCore::InspectorController::postWorkerNotificationToFrontend):
            (WebCore::InspectorController::didCreateWorker):
            (WebCore::InspectorController::didDestroyWorker):
            (WebCore::InspectorController::toggleRecordButton):
            (WebCore::InspectorController::enableProfiler):
            (WebCore::InspectorController::disableProfiler):
            (WebCore::InspectorController::enableDebuggerFromFrontend):
            (WebCore::InspectorController::enableDebugger):
            (WebCore::InspectorController::disableDebugger):
            (WebCore::InspectorController::evaluateForTestInFrontend):
            * inspector/InspectorFrontend.cpp:
            * inspector/InspectorFrontend.h:
            * inspector/InspectorFrontendClientLocal.cpp:
            * inspector/TimelineRecordFactory.cpp:
    
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64951 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 25d58b2..927d106 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,51 @@
+2010-08-08  Ilya Tikhonovsky  <loislo at chromium.org>
+
+        Reviewed by Pavel Feldman.
+
+        WebInspector: remove hand written InspectorFrontend from almost all places.
+        https://bugs.webkit.org/show_bug.cgi?id=43630
+
+        * inspector/ConsoleMessage.cpp:
+        * inspector/InjectedScriptHost.cpp:
+        (WebCore::InjectedScriptHost::pushNodePathToFrontend):
+        * inspector/InjectedScriptHost.h:
+        * inspector/Inspector.idl:
+        * inspector/InspectorBackend.cpp:
+        * inspector/InspectorController.cpp:
+        (WebCore::InspectorController::inspectedPageDestroyed):
+        (WebCore::InspectorController::inspect):
+        (WebCore::InspectorController::focusNode):
+        (WebCore::InspectorController::windowVisible):
+        (WebCore::InspectorController::addConsoleMessage):
+        (WebCore::InspectorController::inspectedWindowScriptObjectCleared):
+        (WebCore::InspectorController::setSearchingForNode):
+        (WebCore::InspectorController::setMonitoringXHR):
+        (WebCore::InspectorController::connectFrontend):
+        (WebCore::InspectorController::show):
+        (WebCore::InspectorController::showPanel):
+        (WebCore::InspectorController::close):
+        (WebCore::InspectorController::disconnectFrontend):
+        (WebCore::InspectorController::populateScriptObjects):
+        (WebCore::InspectorController::didCommitLoad):
+        (WebCore::InspectorController::enableResourceTracking):
+        (WebCore::InspectorController::disableResourceTracking):
+        (WebCore::InspectorController::startTimelineProfiler):
+        (WebCore::InspectorController::stopTimelineProfiler):
+        (WebCore::InspectorController::postWorkerNotificationToFrontend):
+        (WebCore::InspectorController::didCreateWorker):
+        (WebCore::InspectorController::didDestroyWorker):
+        (WebCore::InspectorController::toggleRecordButton):
+        (WebCore::InspectorController::enableProfiler):
+        (WebCore::InspectorController::disableProfiler):
+        (WebCore::InspectorController::enableDebuggerFromFrontend):
+        (WebCore::InspectorController::enableDebugger):
+        (WebCore::InspectorController::disableDebugger):
+        (WebCore::InspectorController::evaluateForTestInFrontend):
+        * inspector/InspectorFrontend.cpp:
+        * inspector/InspectorFrontend.h:
+        * inspector/InspectorFrontendClientLocal.cpp:
+        * inspector/TimelineRecordFactory.cpp:
+
 2010-08-08  Dan Bernstein  <mitz at apple.com>
 
         Try to fix the Chromium Mac build after r64915.
diff --git a/WebCore/inspector/ConsoleMessage.cpp b/WebCore/inspector/ConsoleMessage.cpp
index 8985cb7..059dea4 100644
--- a/WebCore/inspector/ConsoleMessage.cpp
+++ b/WebCore/inspector/ConsoleMessage.cpp
@@ -33,7 +33,6 @@
 
 #include "InjectedScript.h"
 #include "InjectedScriptHost.h"
-#include "InspectorFrontend.h"
 #include "InspectorValues.h"
 #include "ScriptCallStack.h"
 #include "ScriptValue.h"
diff --git a/WebCore/inspector/InjectedScriptHost.cpp b/WebCore/inspector/InjectedScriptHost.cpp
index fa2e2cb..5c05c73 100644
--- a/WebCore/inspector/InjectedScriptHost.cpp
+++ b/WebCore/inspector/InjectedScriptHost.cpp
@@ -42,7 +42,6 @@
 #include "InspectorClient.h"
 #include "InspectorController.h"
 #include "InspectorDOMAgent.h"
-#include "InspectorFrontend.h"
 #include "InspectorResource.h"
 #include "Pasteboard.h"
 #include "RemoteInspectorFrontend.h"
@@ -99,7 +98,7 @@ Node* InjectedScriptHost::nodeForId(long nodeId)
 
 long InjectedScriptHost::pushNodePathToFrontend(Node* node, bool withChildren, bool selectInUI)
 {
-    InspectorFrontend* frontend = inspectorFrontend();
+    RemoteInspectorFrontend* frontend = remoteFrontend();
     InspectorDOMAgent* domAgent = inspectorDOMAgent();
     if (!domAgent || !frontend)
         return 0;
@@ -179,13 +178,6 @@ InspectorDOMAgent* InjectedScriptHost::inspectorDOMAgent()
     return m_inspectorController->domAgent();
 }
 
-InspectorFrontend* InjectedScriptHost::inspectorFrontend()
-{
-    if (!m_inspectorController)
-        return 0;
-    return m_inspectorController->m_frontend.get();
-}
-
 RemoteInspectorFrontend* InjectedScriptHost::remoteFrontend()
 {
     if (!m_inspectorController)
diff --git a/WebCore/inspector/InjectedScriptHost.h b/WebCore/inspector/InjectedScriptHost.h
index f5061fb..3bd3311 100644
--- a/WebCore/inspector/InjectedScriptHost.h
+++ b/WebCore/inspector/InjectedScriptHost.h
@@ -43,7 +43,6 @@ namespace WebCore {
 class Database;
 class InjectedScript;
 class InspectorDOMAgent;
-class InspectorFrontend;
 class Node;
 class RemoteInspectorFrontend;
 class Storage;
@@ -95,7 +94,6 @@ public:
 private:
     InjectedScriptHost(InspectorController* inspectorController);
     InspectorDOMAgent* inspectorDOMAgent();
-    InspectorFrontend* inspectorFrontend();
     RemoteInspectorFrontend* remoteFrontend();
     ScriptObject createInjectedScript(const String& source, ScriptState* scriptState, long id);
 
diff --git a/WebCore/inspector/Inspector.idl b/WebCore/inspector/Inspector.idl
index 1dbf56b..8d110ad 100644
--- a/WebCore/inspector/Inspector.idl
+++ b/WebCore/inspector/Inspector.idl
@@ -36,24 +36,51 @@ module core {
         [notify] void addRecordToTimeline(out Object record);
         [notify] void addNodesToSearchResult(out Array nodeIds);
         [notify] void attributesUpdated(out long id, out Array attributes);
+        [notify] void bringToFront();
         [notify] void childNodeCountUpdated(out long id, out int newValue);
         [notify] void childNodeInserted(out long parentId, out long prevId, out Object node);
         [notify] void childNodeRemoved(out long parentId, out long id);
+        [notify] void close();
+        [notify] void didCommitLoad();
+        [notify] void evaluateForTestInFrontend(out long testCallId, out String script);
+        [notify] void inspectedPageDestroyed();
+        [notify] void inspectedURLChanged(out String url);
+        [notify] void monitoringXHRWasEnabled();
+        [notify] void monitoringXHRWasDisabled();
+        [notify] void populateApplicationSettings(out String settings);
+        [notify] void populateInterface();
+        [notify] void populateSessionSettings(out String settings);
+        [notify] void removeResource(out unsigned long identifier);
+        [notify] void reset();
+        [notify] void resetProfilesPanel();
+        [notify] void resourceTrackingWasEnabled();
+        [notify] void resourceTrackingWasDisabled();
+        [notify] void searchingForNodeWasEnabled();
+        [notify] void searchingForNodeWasDisabled();
         [notify] void setChildNodes(out long parentId, out Array nodes);
         [notify] void setDetachedRoot(out Object root);
         [notify] void setDocument(out Value root);
+        [notify] void timelineProfilerWasStarted();
+        [notify] void timelineProfilerWasStopped();
         [notify] void updateConsoleMessageExpiredCount(out unsigned long count);
         [notify] void updateConsoleMessageRepeatCount(out unsigned long count);
+        [notify] void updateFocusedNode(out long nodeId);
         [notify] void updateResource(out Value resource);
-        [notify] void removeResource(out unsigned long resourceId);
+
 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
-        [notify] void parsedScriptSource(out String sourceID, out String url, out String data, out int firstLine, out int scriptWorldType);
+        [notify] void addProfileHeader(out Object header);
+        [notify] void attachDebuggerWhenShown();
+        [notify] void debuggerWasEnabled();
+        [notify] void debuggerWasDisabled();
         [notify] void failedToParseScriptSource(out String url, out String data, out int firstLine, out int errorLine, out String errorMessage);
+        [notify] void parsedScriptSource(out String sourceID, out String url, out String data, out int firstLine, out int scriptWorldType);
         [notify] void pausedScript(out Value callFrames);
-        [notify] void resumedScript();
+        [notify] void profilerWasEnabled();
+        [notify] void profilerWasDisabled();
         [notify] void restoredBreakpoint(out String sourceID, out String url, out int line, out boolean enabled, out String condition);
+        [notify] void resumedScript();
+        [notify] void setRecordingProfile(out boolean isProfiling);
         [notify] void updatePauseOnExceptionsState(out long state);
-        [notify] void addProfileHeader(out Object header);
 #endif
 #if defined(ENABLE_DATABASE) && ENABLE_DATABASE
         [notify] void addDatabase(out Object database);
@@ -68,6 +95,10 @@ module core {
         [notify] void updateApplicationCacheStatus(out int status);
         [notify] void updateNetworkState(out boolean isNowOnline);
 #endif
+#if defined(ENABLE_WORKERS) && ENABLE_WORKERS
+        [notify] void didCreateWorker(out long id, out String url, out boolean isShared);
+        [notify] void didDestroyWorker(out long id);
+#endif
 
         [handler=Controller] void storeLastActivePanel(in String panelName);
 
diff --git a/WebCore/inspector/InspectorBackend.cpp b/WebCore/inspector/InspectorBackend.cpp
index 403f1dd..f0a1638 100644
--- a/WebCore/inspector/InspectorBackend.cpp
+++ b/WebCore/inspector/InspectorBackend.cpp
@@ -40,7 +40,6 @@
 #include "InjectedScriptHost.h"
 #include "InspectorController.h"
 #include "InspectorDOMAgent.h"
-#include "InspectorFrontend.h"
 #include "RemoteInspectorFrontend.h"
 #include "ScriptBreakpoint.h"
 #include "ScriptProfiler.h"
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index d21aedd..68fcaec 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -195,8 +195,8 @@ InspectorController::~InspectorController()
 
 void InspectorController::inspectedPageDestroyed()
 {
-    if (m_frontend)
-        m_frontend->inspectedPageDestroyed();
+    if (m_remoteFrontend)
+        m_remoteFrontend->inspectedPageDestroyed();
 
     hideHighlight();
 
@@ -256,7 +256,7 @@ void InspectorController::inspect(Node* node)
         node = node->parentNode();
     m_nodeToFocus = node;
 
-    if (!m_frontend) {
+    if (!m_remoteFrontend) {
         m_showAfterVisible = ElementsPanel;
         return;
     }
@@ -269,11 +269,11 @@ void InspectorController::focusNode()
     if (!enabled())
         return;
 
-    ASSERT(m_frontend);
+    ASSERT(m_remoteFrontend);
     ASSERT(m_nodeToFocus);
 
     long id = m_domAgent->pushNodePathToFrontend(m_nodeToFocus.get());
-    m_frontend->updateFocusedNode(id);
+    m_remoteFrontend->updateFocusedNode(id);
     m_nodeToFocus = 0;
 }
 
@@ -303,7 +303,7 @@ void InspectorController::hideHighlight()
 
 bool InspectorController::windowVisible()
 {
-    return m_frontend;
+    return m_remoteFrontend;
 }
 
 void InspectorController::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, ScriptCallStack* callStack, const String& message)
@@ -330,16 +330,16 @@ void InspectorController::addConsoleMessage(ScriptState* scriptState, PassOwnPtr
 
     if (m_previousMessage && m_previousMessage->isEqual(scriptState, consoleMessage.get())) {
         m_previousMessage->incrementCount();
-        if (m_frontend)
+        if (m_remoteFrontend)
             m_previousMessage->updateRepeatCountInConsole(m_remoteFrontend.get());
     } else {
         m_previousMessage = consoleMessage.get();
         m_consoleMessages.append(consoleMessage);
-        if (m_frontend)
+        if (m_remoteFrontend)
             m_previousMessage->addToFrontend(m_remoteFrontend.get(), m_injectedScriptHost.get());
     }
 
-    if (!m_frontend && m_consoleMessages.size() >= maximumConsoleMessages) {
+    if (!m_remoteFrontend && m_consoleMessages.size() >= maximumConsoleMessages) {
         m_expiredConsoleMessageCount += expireConsoleMessagesStep;
         m_consoleMessages.remove(0, expireConsoleMessagesStep);
     }
@@ -424,7 +424,7 @@ void InspectorController::inspectedWindowScriptObjectCleared(Frame* frame)
         m_inspectorFrontendClient->windowObjectCleared();
 
     if (enabled()) {
-        if (m_frontend && frame == m_inspectedPage->mainFrame())
+        if (m_remoteFrontend && frame == m_inspectedPage->mainFrame())
             m_injectedScriptHost->discardInjectedScripts();
         if (m_scriptsToEvaluateOnLoad.size()) {
             ScriptState* scriptState = mainWorldScriptState(frame);
@@ -445,11 +445,11 @@ void InspectorController::setSearchingForNode(bool enabled)
     m_searchingForNode = enabled;
     if (!m_searchingForNode)
         hideHighlight();
-    if (m_frontend) {
+    if (m_remoteFrontend) {
         if (enabled)
-            m_frontend->searchingForNodeWasEnabled();
+            m_remoteFrontend->searchingForNodeWasEnabled();
         else
-            m_frontend->searchingForNodeWasDisabled();
+            m_remoteFrontend->searchingForNodeWasDisabled();
     }
 }
 
@@ -459,11 +459,11 @@ void InspectorController::setMonitoringXHR(bool enabled)
         return;
     m_monitoringXHR = enabled;
     setSetting(monitoringXHRSettingName, enabled ? "true" : "false");
-    if (m_frontend) {
+    if (m_remoteFrontend) {
         if (enabled)
-            m_frontend->monitoringXHRWasEnabled();
+            m_remoteFrontend->monitoringXHRWasEnabled();
         else
-            m_frontend->monitoringXHRWasDisabled();
+            m_remoteFrontend->monitoringXHRWasDisabled();
     }
 }
 
@@ -478,7 +478,7 @@ void InspectorController::connectFrontend(const ScriptObject& webInspector)
         m_timelineAgent->resetFrontendProxyObject(m_remoteFrontend.get());
 
     // Initialize Web Inspector title.
-    m_frontend->inspectedURLChanged(m_inspectedPage->mainFrame()->loader()->url().string());
+    m_remoteFrontend->inspectedURLChanged(m_inspectedPage->mainFrame()->loader()->url().string());
 
     populateScriptObjects();
 
@@ -523,8 +523,8 @@ void InspectorController::show()
     if (m_openingFrontend)
         return;
 
-    if (m_frontend)
-        m_frontend->bringToFront();
+    if (m_remoteFrontend)
+        m_remoteFrontend->bringToFront();
     else {
         m_openingFrontend = true;
         m_client->openInspectorFrontend(this);
@@ -538,7 +538,7 @@ void InspectorController::showPanel(SpecialPanels panel)
 
     show();
 
-    if (!m_frontend) {
+    if (!m_remoteFrontend) {
         m_showAfterVisible = panel;
         return;
     }
@@ -551,14 +551,14 @@ void InspectorController::showPanel(SpecialPanels panel)
 
 void InspectorController::close()
 {
-    if (!m_frontend)
+    if (!m_remoteFrontend)
         return;
     m_frontend->close();
 }
 
 void InspectorController::disconnectFrontend()
 {
-    if (!m_frontend)
+    if (!m_remoteFrontend)
         return;
     m_frontend.clear();
     m_remoteFrontend.clear();
@@ -606,24 +606,24 @@ void InspectorController::releaseFrontendLifetimeAgents()
 
 void InspectorController::populateScriptObjects()
 {
-    ASSERT(m_frontend);
-    if (!m_frontend)
+    ASSERT(m_remoteFrontend);
+    if (!m_remoteFrontend)
         return;
 
-    m_frontend->populateApplicationSettings(setting(frontendSettingsSettingName()));
+    m_remoteFrontend->populateApplicationSettings(setting(frontendSettingsSettingName()));
 
     if (m_resourceTrackingEnabled)
-        m_frontend->resourceTrackingWasEnabled();
+        m_remoteFrontend->resourceTrackingWasEnabled();
 
     if (m_searchingForNode)
-        m_frontend->searchingForNodeWasEnabled();
+        m_remoteFrontend->searchingForNodeWasEnabled();
 
     if (m_monitoringXHR)
-        m_frontend->monitoringXHRWasEnabled();
+        m_remoteFrontend->monitoringXHRWasEnabled();
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
     if (m_profilerEnabled)
-        m_frontend->profilerWasEnabled();
+        m_remoteFrontend->profilerWasEnabled();
 #endif
 
     ResourcesMap::iterator resourcesEnd = m_resources.end();
@@ -640,7 +640,7 @@ void InspectorController::populateScriptObjects()
 
 #if ENABLE(JAVASCRIPT_DEBUGGER)
     if (debuggerEnabled())
-        m_frontend->updatePauseOnExceptionsState(ScriptDebugServer::shared().pauseOnExceptionsState());
+        m_remoteFrontend->updatePauseOnExceptionsState(ScriptDebugServer::shared().pauseOnExceptionsState());
 #endif
 #if ENABLE(DATABASE)
     DatabaseResourcesMap::iterator databasesEnd = m_databaseResources.end();
@@ -654,16 +654,18 @@ void InspectorController::populateScriptObjects()
 #endif
 #if ENABLE(WORKERS)
     WorkersMap::iterator workersEnd = m_workers.end();
-    for (WorkersMap::iterator it = m_workers.begin(); it != workersEnd; ++it)
-        m_frontend->didCreateWorker(*it->second);
+    for (WorkersMap::iterator it = m_workers.begin(); it != workersEnd; ++it) {
+        InspectorWorkerResource* worker = it->second.get();
+        m_remoteFrontend->didCreateWorker(worker->id(), worker->url(), worker->isSharedWorker());
+    }
 #endif
 
-    m_frontend->populateSessionSettings(m_sessionSettings->toJSONString());
-    m_frontend->populateInterface();
+    m_remoteFrontend->populateSessionSettings(m_sessionSettings->toJSONString());
+    m_remoteFrontend->populateInterface();
 
     // Dispatch pending frontend commands
     for (Vector<pair<long, String> >::iterator it = m_pendingEvaluateTestCommands.begin(); it != m_pendingEvaluateTestCommands.end(); ++it)
-        m_frontend->evaluateForTestInFrontend((*it).first, (*it).second);
+        m_remoteFrontend->evaluateForTestInFrontend((*it).first, (*it).second);
     m_pendingEvaluateTestCommands.clear();
 }
 
@@ -714,8 +716,8 @@ void InspectorController::didCommitLoad(DocumentLoader* loader)
     ASSERT(m_inspectedPage);
 
     if (loader->frame() == m_inspectedPage->mainFrame()) {
-        if (m_frontend)
-            m_frontend->inspectedURLChanged(loader->url().string());
+        if (m_remoteFrontend)
+            m_remoteFrontend->inspectedURLChanged(loader->url().string());
 
         m_injectedScriptHost->discardInjectedScripts();
         clearConsoleMessages();
@@ -730,8 +732,8 @@ void InspectorController::didCommitLoad(DocumentLoader* loader)
         m_profiles.clear();
         m_currentUserInitiatedProfileNumber = 1;
         m_nextUserInitiatedProfileNumber = 1;
-        if (m_frontend)
-            m_frontend->resetProfilesPanel();
+        if (m_remoteFrontend)
+            m_remoteFrontend->resetProfilesPanel();
 #endif
         // unbindAllResources should be called before database and DOM storage
         // resources are cleared so that it has a chance to unbind them.
@@ -739,8 +741,8 @@ void InspectorController::didCommitLoad(DocumentLoader* loader)
 
         m_cssStore->reset();
         m_sessionSettings = InspectorObject::create();
-        if (m_frontend) {
-            m_frontend->reset();
+        if (m_remoteFrontend) {
+            m_remoteFrontend->reset();
             m_domAgent->reset();
         }
 #if ENABLE(WORKERS)
@@ -753,7 +755,7 @@ void InspectorController::didCommitLoad(DocumentLoader* loader)
         m_domStorageResources.clear();
 #endif
 
-        if (m_frontend) {
+        if (m_remoteFrontend) {
             if (!loader->frameLoader()->isLoadingFromCachedPage()) {
                 ASSERT(m_mainResource && m_mainResource->isSameLoader(loader));
                 // We don't add the main resource until its load is committed. This is
@@ -767,7 +769,7 @@ void InspectorController::didCommitLoad(DocumentLoader* loader)
                 // identifierForInitialRequest.
                 m_mainResource = 0;
             }
-            m_frontend->didCommitLoad();
+            m_remoteFrontend->didCommitLoad();
             m_domAgent->setDocument(m_inspectedPage->mainFrame()->document());
         }
     }
@@ -1100,8 +1102,8 @@ void InspectorController::enableResourceTracking(bool always, bool reload)
 
     ASSERT(m_inspectedPage);
     m_resourceTrackingEnabled = true;
-    if (m_frontend)
-        m_frontend->resourceTrackingWasEnabled();
+    if (m_remoteFrontend)
+        m_remoteFrontend->resourceTrackingWasEnabled();
     m_client->resourceTrackingWasEnabled();
 
     if (reload)
@@ -1118,8 +1120,8 @@ void InspectorController::disableResourceTracking(bool always)
 
     ASSERT(m_inspectedPage);
     m_resourceTrackingEnabled = false;
-    if (m_frontend)
-        m_frontend->resourceTrackingWasDisabled();
+    if (m_remoteFrontend)
+        m_remoteFrontend->resourceTrackingWasDisabled();
     m_client->resourceTrackingWasDisabled();
 }
 
@@ -1148,8 +1150,8 @@ void InspectorController::startTimelineProfiler()
         return;
 
     m_timelineAgent = new InspectorTimelineAgent(m_remoteFrontend.get());
-    if (m_frontend)
-        m_frontend->timelineProfilerWasStarted();
+    if (m_remoteFrontend)
+        m_remoteFrontend->timelineProfilerWasStarted();
     m_client->timelineProfilerWasStarted();
 }
 
@@ -1162,8 +1164,8 @@ void InspectorController::stopTimelineProfiler()
         return;
 
     m_timelineAgent = 0;
-    if (m_frontend)
-        m_frontend->timelineProfilerWasStopped();
+    if (m_remoteFrontend)
+        m_remoteFrontend->timelineProfilerWasStopped();
     m_client->timelineProfilerWasStopped();
 }
 
@@ -1195,14 +1197,14 @@ private:
 
 void InspectorController::postWorkerNotificationToFrontend(const InspectorWorkerResource& worker, InspectorController::WorkerAction action)
 {
-    if (!m_frontend)
+    if (!m_remoteFrontend)
         return;
     switch (action) {
     case InspectorController::WorkerCreated:
-        m_frontend->didCreateWorker(worker);
+        m_remoteFrontend->didCreateWorker(worker.id(), worker.url(), worker.isSharedWorker());
         break;
     case InspectorController::WorkerDestroyed:
-        m_frontend->didDestroyWorker(worker);
+        m_remoteFrontend->didDestroyWorker(worker.id());
         break;
     }
 }
@@ -1214,7 +1216,7 @@ void InspectorController::didCreateWorker(intptr_t id, const String& url, bool i
 
     RefPtr<InspectorWorkerResource> workerResource(InspectorWorkerResource::create(id, url, isSharedWorker));
     m_workers.set(id, workerResource);
-    if (m_inspectedPage && m_frontend)
+    if (m_inspectedPage && m_remoteFrontend)
         m_inspectedPage->mainFrame()->document()->postTask(PostWorkerNotificationToFrontendTask::create(workerResource, InspectorController::WorkerCreated));
 }
 
@@ -1226,7 +1228,7 @@ void InspectorController::didDestroyWorker(intptr_t id)
     WorkersMap::iterator workerResource = m_workers.find(id);
     if (workerResource == m_workers.end())
         return;
-    if (m_inspectedPage && m_frontend)
+    if (m_inspectedPage && m_remoteFrontend)
         m_inspectedPage->mainFrame()->document()->postTask(PostWorkerNotificationToFrontendTask::create(workerResource->second, InspectorController::WorkerDestroyed));
     m_workers.remove(workerResource);
 }
@@ -1574,9 +1576,9 @@ void InspectorController::stopUserInitiatedProfiling()
 
 void InspectorController::toggleRecordButton(bool isProfiling)
 {
-    if (!m_frontend)
+    if (!m_remoteFrontend)
         return;
-    m_frontend->setRecordingProfile(isProfiling);
+    m_remoteFrontend->setRecordingProfile(isProfiling);
 }
 
 void InspectorController::enableProfiler(bool always, bool skipRecompile)
@@ -1592,8 +1594,8 @@ void InspectorController::enableProfiler(bool always, bool skipRecompile)
     if (!skipRecompile)
         ScriptDebugServer::shared().recompileAllJSFunctionsSoon();
 
-    if (m_frontend)
-        m_frontend->profilerWasEnabled();
+    if (m_remoteFrontend)
+        m_remoteFrontend->profilerWasEnabled();
 }
 
 void InspectorController::disableProfiler(bool always)
@@ -1608,8 +1610,8 @@ void InspectorController::disableProfiler(bool always)
 
     ScriptDebugServer::shared().recompileAllJSFunctionsSoon();
 
-    if (m_frontend)
-        m_frontend->profilerWasDisabled();
+    if (m_remoteFrontend)
+        m_remoteFrontend->profilerWasDisabled();
 }
 #endif
 
@@ -1624,7 +1626,7 @@ void InspectorController::enableDebuggerFromFrontend(bool always)
 
     m_debuggerAgent = InspectorDebuggerAgent::create(this);
 
-    m_frontend->debuggerWasEnabled();
+    m_remoteFrontend->debuggerWasEnabled();
 }
 
 void InspectorController::enableDebugger()
@@ -1635,10 +1637,10 @@ void InspectorController::enableDebugger()
     if (debuggerEnabled())
         return;
 
-    if (!m_frontend)
+    if (!m_remoteFrontend)
         m_attachDebuggerWhenShown = true;
     else {
-        m_frontend->attachDebuggerWhenShown();
+        m_remoteFrontend->attachDebuggerWhenShown();
         m_attachDebuggerWhenShown = false;
     }
 }
@@ -1657,8 +1659,8 @@ void InspectorController::disableDebugger(bool always)
 
     m_attachDebuggerWhenShown = false;
 
-    if (m_frontend)
-        m_frontend->debuggerWasDisabled();
+    if (m_remoteFrontend)
+        m_remoteFrontend->debuggerWasDisabled();
 }
 
 void InspectorController::resume()
@@ -1666,12 +1668,14 @@ void InspectorController::resume()
     if (m_debuggerAgent)
         m_debuggerAgent->resume();
 }
+// JavaScriptDebugListener functions
+
 #endif
 
 void InspectorController::evaluateForTestInFrontend(long callId, const String& script)
 {
-    if (m_frontend)
-        m_frontend->evaluateForTestInFrontend(callId, script);
+    if (m_remoteFrontend)
+        m_remoteFrontend->evaluateForTestInFrontend(callId, script);
     else
         m_pendingEvaluateTestCommands.append(pair<long, String>(callId, script));
 }
diff --git a/WebCore/inspector/InspectorFrontend.cpp b/WebCore/inspector/InspectorFrontend.cpp
index 7f21440..bc105d0 100644
--- a/WebCore/inspector/InspectorFrontend.cpp
+++ b/WebCore/inspector/InspectorFrontend.cpp
@@ -57,41 +57,6 @@ void InspectorFrontend::close()
     function.call();
 }
 
-void InspectorFrontend::inspectedPageDestroyed()
-{
-    ScriptFunctionCall function(m_webInspector, "inspectedPageDestroyed");
-    function.call();
-}
-
-void InspectorFrontend::didCommitLoad()
-{
-    callSimpleFunction("didCommitLoad");
-}
-
-void InspectorFrontend::populateApplicationSettings(const String& settings)
-{
-    ScriptFunctionCall function(m_webInspector, "dispatch");
-    function.appendArgument("populateApplicationSettings");
-    function.appendArgument(settings);
-    function.call();
-}
-
-void InspectorFrontend::populateSessionSettings(const String& settings)
-{
-    ScriptFunctionCall function(m_webInspector, "dispatch");
-    function.appendArgument("populateSessionSettings");
-    function.appendArgument(settings);
-    function.call();
-}
-
-void InspectorFrontend::updateFocusedNode(long nodeId)
-{
-    ScriptFunctionCall function(m_webInspector, "dispatch"); 
-    function.appendArgument("updateFocusedNode");
-    function.appendArgument(nodeId);
-    function.call();
-}
-
 void InspectorFrontend::showPanel(int panel)
 {
     const char* showFunctionName;
@@ -129,168 +94,6 @@ void InspectorFrontend::showPanel(int panel)
         callSimpleFunction(showFunctionName);
 }
 
-void InspectorFrontend::populateInterface()
-{
-    callSimpleFunction("populateInterface");
-}
-
-void InspectorFrontend::reset()
-{
-    callSimpleFunction("reset");
-}
-
-void InspectorFrontend::resetProfilesPanel()
-{
-    callSimpleFunction("resetProfilesPanel");
-}
-
-void InspectorFrontend::bringToFront()
-{
-    callSimpleFunction("bringToFront");
-}
-
-void InspectorFrontend::inspectedURLChanged(const String& url)
-{
-    ScriptFunctionCall function(m_webInspector, "dispatch");
-    function.appendArgument("inspectedURLChanged");
-    function.appendArgument(url);
-    function.call();
-}
-
-void InspectorFrontend::resourceTrackingWasEnabled()
-{
-    callSimpleFunction("resourceTrackingWasEnabled");
-}
-
-void InspectorFrontend::resourceTrackingWasDisabled()
-{
-    callSimpleFunction("resourceTrackingWasDisabled");
-}
-
-void InspectorFrontend::searchingForNodeWasEnabled()
-{
-    callSimpleFunction("searchingForNodeWasEnabled");
-}
-
-void InspectorFrontend::searchingForNodeWasDisabled()
-{
-    callSimpleFunction("searchingForNodeWasDisabled");
-}
-
-void InspectorFrontend::monitoringXHRWasEnabled()
-{
-    callSimpleFunction("monitoringXHRWasEnabled");
-}
-
-void InspectorFrontend::monitoringXHRWasDisabled()
-{
-    callSimpleFunction("monitoringXHRWasDisabled");
-}
-
-void InspectorFrontend::updatePauseOnExceptionsState(long state)
-{
-    ScriptFunctionCall function(m_webInspector, "dispatch"); 
-    function.appendArgument("updatePauseOnExceptionsState");
-    function.appendArgument(state);
-    function.call();
-}
-
-void InspectorFrontend::timelineProfilerWasStarted()
-{
-    callSimpleFunction("timelineProfilerWasStarted");
-}
-
-void InspectorFrontend::timelineProfilerWasStopped()
-{
-    callSimpleFunction("timelineProfilerWasStopped");
-}
-
-#if ENABLE(JAVASCRIPT_DEBUGGER)
-void InspectorFrontend::attachDebuggerWhenShown()
-{
-    callSimpleFunction("attachDebuggerWhenShown");
-}
-
-void InspectorFrontend::debuggerWasEnabled()
-{
-    callSimpleFunction("debuggerWasEnabled");
-}
-
-void InspectorFrontend::debuggerWasDisabled()
-{
-    callSimpleFunction("debuggerWasDisabled");
-}
-
-void InspectorFrontend::profilerWasEnabled()
-{
-    callSimpleFunction("profilerWasEnabled");
-}
-
-void InspectorFrontend::profilerWasDisabled()
-{
-    callSimpleFunction("profilerWasDisabled");
-}
-
-void InspectorFrontend::setRecordingProfile(bool isProfiling)
-{
-    ScriptFunctionCall function(m_webInspector, "dispatch"); 
-    function.appendArgument("setRecordingProfile");
-    function.appendArgument(isProfiling);
-    function.call();
-}
-#endif
-
-void InspectorFrontend::didPushNodeByPathToFrontend(long callId, long nodeId)
-{
-    ScriptFunctionCall function(m_webInspector, "dispatch"); 
-    function.appendArgument("didPushNodeByPathToFrontend");
-    function.appendArgument(callId);
-    function.appendArgument(nodeId);
-    function.call();
-}
-
-#if ENABLE(WORKERS)
-void InspectorFrontend::didCreateWorker(const InspectorWorkerResource& worker)
-{
-    ScriptFunctionCall function(m_webInspector, "dispatch");
-    function.appendArgument("didCreateWorker");
-    function.appendArgument(worker.id());
-    function.appendArgument(worker.url());
-    function.appendArgument(worker.isSharedWorker());
-    function.call();
-}
-
-void InspectorFrontend::didDestroyWorker(const InspectorWorkerResource& worker)
-{
-    ScriptFunctionCall function(m_webInspector, "dispatch"); 
-    function.appendArgument("didDestroyWorker");
-    function.appendArgument(worker.id());
-    function.call();
-}
-#endif // ENABLE(WORKERS)
-
-void InspectorFrontend::contextMenuItemSelected(int itemId)
-{
-    ScriptFunctionCall function(m_webInspector, "dispatch");
-    function.appendArgument("contextMenuItemSelected");
-    function.appendArgument(itemId);
-    function.call();
-}
-
-void InspectorFrontend::contextMenuCleared()
-{
-    callSimpleFunction("contextMenuCleared");
-}
-
-void InspectorFrontend::evaluateForTestInFrontend(long callId, const String& script)
-{
-    ScriptFunctionCall function(m_webInspector, "dispatch"); 
-    function.appendArgument("evaluateForTestInFrontend");
-    function.appendArgument(callId);
-    function.appendArgument(script);
-    function.call();
-}
-
 void InspectorFrontend::callSimpleFunction(const String& functionName)
 {
     ScriptFunctionCall function(m_webInspector, "dispatch");
diff --git a/WebCore/inspector/InspectorFrontend.h b/WebCore/inspector/InspectorFrontend.h
index 6e0620a..215796e 100644
--- a/WebCore/inspector/InspectorFrontend.h
+++ b/WebCore/inspector/InspectorFrontend.h
@@ -47,60 +47,8 @@ namespace WebCore {
         ~InspectorFrontend();
 
         void close();
-        void inspectedPageDestroyed();
-
-        void didCommitLoad();
-
-        void populateApplicationSettings(const String& settings);
-        void populateSessionSettings(const String& settings);
-
-        void updateFocusedNode(long nodeId);
         void showPanel(int panel);
-        void populateInterface();
-        void reset();
-        void resetProfilesPanel();
-
-        void bringToFront();
-        void inspectedURLChanged(const String&);
-
-        void resourceTrackingWasEnabled();
-        void resourceTrackingWasDisabled();
-
-        void searchingForNodeWasEnabled();
-        void searchingForNodeWasDisabled();
-
-        void monitoringXHRWasEnabled();
-        void monitoringXHRWasDisabled();
-
-        void updatePauseOnExceptionsState(long state);
-
-#if ENABLE(JAVASCRIPT_DEBUGGER)
-        void attachDebuggerWhenShown();
-        void debuggerWasEnabled();
-        void debuggerWasDisabled();
-
-        void profilerWasEnabled();
-        void profilerWasDisabled();
-        void setRecordingProfile(bool isProfiling);
-#endif
-
-        void didPushNodeByPathToFrontend(long callId, long nodeId);
-
-        void timelineProfilerWasStarted();
-        void timelineProfilerWasStopped();
-
-#if ENABLE(WORKERS)
-        void didCreateWorker(const InspectorWorkerResource&);
-        void didDestroyWorker(const InspectorWorkerResource&);
-#endif // ENABLE(WORKER)
-
-        void contextMenuItemSelected(int itemId);
-        void contextMenuCleared();
-
         ScriptState* scriptState() const { return m_webInspector.scriptState(); }
-
-        void evaluateForTestInFrontend(long callId, const String& script);
-
     private:
         void callSimpleFunction(const String& functionName);
         ScriptObject m_webInspector;
diff --git a/WebCore/inspector/InspectorFrontendClientLocal.cpp b/WebCore/inspector/InspectorFrontendClientLocal.cpp
index f6f7811..baa9c8e 100644
--- a/WebCore/inspector/InspectorFrontendClientLocal.cpp
+++ b/WebCore/inspector/InspectorFrontendClientLocal.cpp
@@ -39,7 +39,6 @@
 #include "FrameView.h"
 #include "InspectorBackendDispatcher.h"
 #include "InspectorController.h"
-#include "InspectorFrontend.h"
 #include "InspectorFrontendHost.h"
 #include "Page.h"
 #include "PlatformString.h"
diff --git a/WebCore/inspector/TimelineRecordFactory.cpp b/WebCore/inspector/TimelineRecordFactory.cpp
index 87622ce..ad9fdec 100644
--- a/WebCore/inspector/TimelineRecordFactory.cpp
+++ b/WebCore/inspector/TimelineRecordFactory.cpp
@@ -34,7 +34,6 @@
 #if ENABLE(INSPECTOR)
 
 #include "Event.h"
-#include "InspectorFrontend.h"
 #include "InspectorValues.h"
 #include "IntRect.h"
 #include "ResourceRequest.h"

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list