Changeset 64951 in webkit
- Timestamp:
- Aug 8, 2010 9:47:39 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r64950 r64951 1 2010-08-08 Ilya Tikhonovsky <loislo@chromium.org> 2 3 Reviewed by Pavel Feldman. 4 5 WebInspector: remove hand written InspectorFrontend from almost all places. 6 https://bugs.webkit.org/show_bug.cgi?id=43630 7 8 * inspector/ConsoleMessage.cpp: 9 * inspector/InjectedScriptHost.cpp: 10 (WebCore::InjectedScriptHost::pushNodePathToFrontend): 11 * inspector/InjectedScriptHost.h: 12 * inspector/Inspector.idl: 13 * inspector/InspectorBackend.cpp: 14 * inspector/InspectorController.cpp: 15 (WebCore::InspectorController::inspectedPageDestroyed): 16 (WebCore::InspectorController::inspect): 17 (WebCore::InspectorController::focusNode): 18 (WebCore::InspectorController::windowVisible): 19 (WebCore::InspectorController::addConsoleMessage): 20 (WebCore::InspectorController::inspectedWindowScriptObjectCleared): 21 (WebCore::InspectorController::setSearchingForNode): 22 (WebCore::InspectorController::setMonitoringXHR): 23 (WebCore::InspectorController::connectFrontend): 24 (WebCore::InspectorController::show): 25 (WebCore::InspectorController::showPanel): 26 (WebCore::InspectorController::close): 27 (WebCore::InspectorController::disconnectFrontend): 28 (WebCore::InspectorController::populateScriptObjects): 29 (WebCore::InspectorController::didCommitLoad): 30 (WebCore::InspectorController::enableResourceTracking): 31 (WebCore::InspectorController::disableResourceTracking): 32 (WebCore::InspectorController::startTimelineProfiler): 33 (WebCore::InspectorController::stopTimelineProfiler): 34 (WebCore::InspectorController::postWorkerNotificationToFrontend): 35 (WebCore::InspectorController::didCreateWorker): 36 (WebCore::InspectorController::didDestroyWorker): 37 (WebCore::InspectorController::toggleRecordButton): 38 (WebCore::InspectorController::enableProfiler): 39 (WebCore::InspectorController::disableProfiler): 40 (WebCore::InspectorController::enableDebuggerFromFrontend): 41 (WebCore::InspectorController::enableDebugger): 42 (WebCore::InspectorController::disableDebugger): 43 (WebCore::InspectorController::evaluateForTestInFrontend): 44 * inspector/InspectorFrontend.cpp: 45 * inspector/InspectorFrontend.h: 46 * inspector/InspectorFrontendClientLocal.cpp: 47 * inspector/TimelineRecordFactory.cpp: 48 1 49 2010-08-08 Dan Bernstein <mitz@apple.com> 2 50 -
trunk/WebCore/inspector/ConsoleMessage.cpp
r64722 r64951 34 34 #include "InjectedScript.h" 35 35 #include "InjectedScriptHost.h" 36 #include "InspectorFrontend.h"37 36 #include "InspectorValues.h" 38 37 #include "ScriptCallStack.h" -
trunk/WebCore/inspector/InjectedScriptHost.cpp
r64653 r64951 43 43 #include "InspectorController.h" 44 44 #include "InspectorDOMAgent.h" 45 #include "InspectorFrontend.h"46 45 #include "InspectorResource.h" 47 46 #include "Pasteboard.h" … … 100 99 long InjectedScriptHost::pushNodePathToFrontend(Node* node, bool withChildren, bool selectInUI) 101 100 { 102 InspectorFrontend* frontend = inspectorFrontend();101 RemoteInspectorFrontend* frontend = remoteFrontend(); 103 102 InspectorDOMAgent* domAgent = inspectorDOMAgent(); 104 103 if (!domAgent || !frontend) … … 180 179 } 181 180 182 InspectorFrontend* InjectedScriptHost::inspectorFrontend()183 {184 if (!m_inspectorController)185 return 0;186 return m_inspectorController->m_frontend.get();187 }188 189 181 RemoteInspectorFrontend* InjectedScriptHost::remoteFrontend() 190 182 { -
trunk/WebCore/inspector/InjectedScriptHost.h
r64653 r64951 44 44 class InjectedScript; 45 45 class InspectorDOMAgent; 46 class InspectorFrontend;47 46 class Node; 48 47 class RemoteInspectorFrontend; … … 96 95 InjectedScriptHost(InspectorController* inspectorController); 97 96 InspectorDOMAgent* inspectorDOMAgent(); 98 InspectorFrontend* inspectorFrontend();99 97 RemoteInspectorFrontend* remoteFrontend(); 100 98 ScriptObject createInjectedScript(const String& source, ScriptState* scriptState, long id); -
trunk/WebCore/inspector/Inspector.idl
r64846 r64951 37 37 [notify] void addNodesToSearchResult(out Array nodeIds); 38 38 [notify] void attributesUpdated(out long id, out Array attributes); 39 [notify] void bringToFront(); 39 40 [notify] void childNodeCountUpdated(out long id, out int newValue); 40 41 [notify] void childNodeInserted(out long parentId, out long prevId, out Object node); 41 42 [notify] void childNodeRemoved(out long parentId, out long id); 43 [notify] void close(); 44 [notify] void didCommitLoad(); 45 [notify] void evaluateForTestInFrontend(out long testCallId, out String script); 46 [notify] void inspectedPageDestroyed(); 47 [notify] void inspectedURLChanged(out String url); 48 [notify] void monitoringXHRWasEnabled(); 49 [notify] void monitoringXHRWasDisabled(); 50 [notify] void populateApplicationSettings(out String settings); 51 [notify] void populateInterface(); 52 [notify] void populateSessionSettings(out String settings); 53 [notify] void removeResource(out unsigned long identifier); 54 [notify] void reset(); 55 [notify] void resetProfilesPanel(); 56 [notify] void resourceTrackingWasEnabled(); 57 [notify] void resourceTrackingWasDisabled(); 58 [notify] void searchingForNodeWasEnabled(); 59 [notify] void searchingForNodeWasDisabled(); 42 60 [notify] void setChildNodes(out long parentId, out Array nodes); 43 61 [notify] void setDetachedRoot(out Object root); 44 62 [notify] void setDocument(out Value root); 63 [notify] void timelineProfilerWasStarted(); 64 [notify] void timelineProfilerWasStopped(); 45 65 [notify] void updateConsoleMessageExpiredCount(out unsigned long count); 46 66 [notify] void updateConsoleMessageRepeatCount(out unsigned long count); 67 [notify] void updateFocusedNode(out long nodeId); 47 68 [notify] void updateResource(out Value resource); 48 [notify] void removeResource(out unsigned long resourceId); 69 49 70 #if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER 71 [notify] void addProfileHeader(out Object header); 72 [notify] void attachDebuggerWhenShown(); 73 [notify] void debuggerWasEnabled(); 74 [notify] void debuggerWasDisabled(); 75 [notify] void failedToParseScriptSource(out String url, out String data, out int firstLine, out int errorLine, out String errorMessage); 50 76 [notify] void parsedScriptSource(out String sourceID, out String url, out String data, out int firstLine, out int scriptWorldType); 51 [notify] void failedToParseScriptSource(out String url, out String data, out int firstLine, out int errorLine, out String errorMessage);52 77 [notify] void pausedScript(out Value callFrames); 78 [notify] void profilerWasEnabled(); 79 [notify] void profilerWasDisabled(); 80 [notify] void restoredBreakpoint(out String sourceID, out String url, out int line, out boolean enabled, out String condition); 53 81 [notify] void resumedScript(); 54 [notify] void restoredBreakpoint(out String sourceID, out String url, out int line, out boolean enabled, out String condition);82 [notify] void setRecordingProfile(out boolean isProfiling); 55 83 [notify] void updatePauseOnExceptionsState(out long state); 56 [notify] void addProfileHeader(out Object header);57 84 #endif 58 85 #if defined(ENABLE_DATABASE) && ENABLE_DATABASE … … 68 95 [notify] void updateApplicationCacheStatus(out int status); 69 96 [notify] void updateNetworkState(out boolean isNowOnline); 97 #endif 98 #if defined(ENABLE_WORKERS) && ENABLE_WORKERS 99 [notify] void didCreateWorker(out long id, out String url, out boolean isShared); 100 [notify] void didDestroyWorker(out long id); 70 101 #endif 71 102 -
trunk/WebCore/inspector/InspectorBackend.cpp
r64770 r64951 41 41 #include "InspectorController.h" 42 42 #include "InspectorDOMAgent.h" 43 #include "InspectorFrontend.h"44 43 #include "RemoteInspectorFrontend.h" 45 44 #include "ScriptBreakpoint.h" -
trunk/WebCore/inspector/InspectorController.cpp
r64846 r64951 196 196 void InspectorController::inspectedPageDestroyed() 197 197 { 198 if (m_ frontend)199 m_ frontend->inspectedPageDestroyed();198 if (m_remoteFrontend) 199 m_remoteFrontend->inspectedPageDestroyed(); 200 200 201 201 hideHighlight(); … … 257 257 m_nodeToFocus = node; 258 258 259 if (!m_ frontend) {259 if (!m_remoteFrontend) { 260 260 m_showAfterVisible = ElementsPanel; 261 261 return; … … 270 270 return; 271 271 272 ASSERT(m_ frontend);272 ASSERT(m_remoteFrontend); 273 273 ASSERT(m_nodeToFocus); 274 274 275 275 long id = m_domAgent->pushNodePathToFrontend(m_nodeToFocus.get()); 276 m_ frontend->updateFocusedNode(id);276 m_remoteFrontend->updateFocusedNode(id); 277 277 m_nodeToFocus = 0; 278 278 } … … 304 304 bool InspectorController::windowVisible() 305 305 { 306 return m_ frontend;306 return m_remoteFrontend; 307 307 } 308 308 … … 331 331 if (m_previousMessage && m_previousMessage->isEqual(scriptState, consoleMessage.get())) { 332 332 m_previousMessage->incrementCount(); 333 if (m_ frontend)333 if (m_remoteFrontend) 334 334 m_previousMessage->updateRepeatCountInConsole(m_remoteFrontend.get()); 335 335 } else { 336 336 m_previousMessage = consoleMessage.get(); 337 337 m_consoleMessages.append(consoleMessage); 338 if (m_ frontend)338 if (m_remoteFrontend) 339 339 m_previousMessage->addToFrontend(m_remoteFrontend.get(), m_injectedScriptHost.get()); 340 340 } 341 341 342 if (!m_ frontend && m_consoleMessages.size() >= maximumConsoleMessages) {342 if (!m_remoteFrontend && m_consoleMessages.size() >= maximumConsoleMessages) { 343 343 m_expiredConsoleMessageCount += expireConsoleMessagesStep; 344 344 m_consoleMessages.remove(0, expireConsoleMessagesStep); … … 425 425 426 426 if (enabled()) { 427 if (m_ frontend && frame == m_inspectedPage->mainFrame())427 if (m_remoteFrontend && frame == m_inspectedPage->mainFrame()) 428 428 m_injectedScriptHost->discardInjectedScripts(); 429 429 if (m_scriptsToEvaluateOnLoad.size()) { … … 446 446 if (!m_searchingForNode) 447 447 hideHighlight(); 448 if (m_ frontend) {448 if (m_remoteFrontend) { 449 449 if (enabled) 450 m_ frontend->searchingForNodeWasEnabled();450 m_remoteFrontend->searchingForNodeWasEnabled(); 451 451 else 452 m_ frontend->searchingForNodeWasDisabled();452 m_remoteFrontend->searchingForNodeWasDisabled(); 453 453 } 454 454 } … … 460 460 m_monitoringXHR = enabled; 461 461 setSetting(monitoringXHRSettingName, enabled ? "true" : "false"); 462 if (m_ frontend) {462 if (m_remoteFrontend) { 463 463 if (enabled) 464 m_ frontend->monitoringXHRWasEnabled();464 m_remoteFrontend->monitoringXHRWasEnabled(); 465 465 else 466 m_ frontend->monitoringXHRWasDisabled();466 m_remoteFrontend->monitoringXHRWasDisabled(); 467 467 } 468 468 } … … 479 479 480 480 // Initialize Web Inspector title. 481 m_ frontend->inspectedURLChanged(m_inspectedPage->mainFrame()->loader()->url().string());481 m_remoteFrontend->inspectedURLChanged(m_inspectedPage->mainFrame()->loader()->url().string()); 482 482 483 483 populateScriptObjects(); … … 524 524 return; 525 525 526 if (m_ frontend)527 m_ frontend->bringToFront();526 if (m_remoteFrontend) 527 m_remoteFrontend->bringToFront(); 528 528 else { 529 529 m_openingFrontend = true; … … 539 539 show(); 540 540 541 if (!m_ frontend) {541 if (!m_remoteFrontend) { 542 542 m_showAfterVisible = panel; 543 543 return; … … 552 552 void InspectorController::close() 553 553 { 554 if (!m_ frontend)554 if (!m_remoteFrontend) 555 555 return; 556 556 m_frontend->close(); … … 559 559 void InspectorController::disconnectFrontend() 560 560 { 561 if (!m_ frontend)561 if (!m_remoteFrontend) 562 562 return; 563 563 m_frontend.clear(); … … 607 607 void InspectorController::populateScriptObjects() 608 608 { 609 ASSERT(m_ frontend);610 if (!m_ frontend)611 return; 612 613 m_ frontend->populateApplicationSettings(setting(frontendSettingsSettingName()));609 ASSERT(m_remoteFrontend); 610 if (!m_remoteFrontend) 611 return; 612 613 m_remoteFrontend->populateApplicationSettings(setting(frontendSettingsSettingName())); 614 614 615 615 if (m_resourceTrackingEnabled) 616 m_ frontend->resourceTrackingWasEnabled();616 m_remoteFrontend->resourceTrackingWasEnabled(); 617 617 618 618 if (m_searchingForNode) 619 m_ frontend->searchingForNodeWasEnabled();619 m_remoteFrontend->searchingForNodeWasEnabled(); 620 620 621 621 if (m_monitoringXHR) 622 m_ frontend->monitoringXHRWasEnabled();622 m_remoteFrontend->monitoringXHRWasEnabled(); 623 623 624 624 #if ENABLE(JAVASCRIPT_DEBUGGER) 625 625 if (m_profilerEnabled) 626 m_ frontend->profilerWasEnabled();626 m_remoteFrontend->profilerWasEnabled(); 627 627 #endif 628 628 … … 641 641 #if ENABLE(JAVASCRIPT_DEBUGGER) 642 642 if (debuggerEnabled()) 643 m_ frontend->updatePauseOnExceptionsState(ScriptDebugServer::shared().pauseOnExceptionsState());643 m_remoteFrontend->updatePauseOnExceptionsState(ScriptDebugServer::shared().pauseOnExceptionsState()); 644 644 #endif 645 645 #if ENABLE(DATABASE) … … 655 655 #if ENABLE(WORKERS) 656 656 WorkersMap::iterator workersEnd = m_workers.end(); 657 for (WorkersMap::iterator it = m_workers.begin(); it != workersEnd; ++it) 658 m_frontend->didCreateWorker(*it->second); 659 #endif 660 661 m_frontend->populateSessionSettings(m_sessionSettings->toJSONString()); 662 m_frontend->populateInterface(); 657 for (WorkersMap::iterator it = m_workers.begin(); it != workersEnd; ++it) { 658 InspectorWorkerResource* worker = it->second.get(); 659 m_remoteFrontend->didCreateWorker(worker->id(), worker->url(), worker->isSharedWorker()); 660 } 661 #endif 662 663 m_remoteFrontend->populateSessionSettings(m_sessionSettings->toJSONString()); 664 m_remoteFrontend->populateInterface(); 663 665 664 666 // Dispatch pending frontend commands 665 667 for (Vector<pair<long, String> >::iterator it = m_pendingEvaluateTestCommands.begin(); it != m_pendingEvaluateTestCommands.end(); ++it) 666 m_ frontend->evaluateForTestInFrontend((*it).first, (*it).second);668 m_remoteFrontend->evaluateForTestInFrontend((*it).first, (*it).second); 667 669 m_pendingEvaluateTestCommands.clear(); 668 670 } … … 715 717 716 718 if (loader->frame() == m_inspectedPage->mainFrame()) { 717 if (m_ frontend)718 m_ frontend->inspectedURLChanged(loader->url().string());719 if (m_remoteFrontend) 720 m_remoteFrontend->inspectedURLChanged(loader->url().string()); 719 721 720 722 m_injectedScriptHost->discardInjectedScripts(); … … 731 733 m_currentUserInitiatedProfileNumber = 1; 732 734 m_nextUserInitiatedProfileNumber = 1; 733 if (m_ frontend)734 m_ frontend->resetProfilesPanel();735 if (m_remoteFrontend) 736 m_remoteFrontend->resetProfilesPanel(); 735 737 #endif 736 738 // unbindAllResources should be called before database and DOM storage … … 740 742 m_cssStore->reset(); 741 743 m_sessionSettings = InspectorObject::create(); 742 if (m_ frontend) {743 m_ frontend->reset();744 if (m_remoteFrontend) { 745 m_remoteFrontend->reset(); 744 746 m_domAgent->reset(); 745 747 } … … 754 756 #endif 755 757 756 if (m_ frontend) {758 if (m_remoteFrontend) { 757 759 if (!loader->frameLoader()->isLoadingFromCachedPage()) { 758 760 ASSERT(m_mainResource && m_mainResource->isSameLoader(loader)); … … 768 770 m_mainResource = 0; 769 771 } 770 m_ frontend->didCommitLoad();772 m_remoteFrontend->didCommitLoad(); 771 773 m_domAgent->setDocument(m_inspectedPage->mainFrame()->document()); 772 774 } … … 1101 1103 ASSERT(m_inspectedPage); 1102 1104 m_resourceTrackingEnabled = true; 1103 if (m_ frontend)1104 m_ frontend->resourceTrackingWasEnabled();1105 if (m_remoteFrontend) 1106 m_remoteFrontend->resourceTrackingWasEnabled(); 1105 1107 m_client->resourceTrackingWasEnabled(); 1106 1108 … … 1119 1121 ASSERT(m_inspectedPage); 1120 1122 m_resourceTrackingEnabled = false; 1121 if (m_ frontend)1122 m_ frontend->resourceTrackingWasDisabled();1123 if (m_remoteFrontend) 1124 m_remoteFrontend->resourceTrackingWasDisabled(); 1123 1125 m_client->resourceTrackingWasDisabled(); 1124 1126 } … … 1149 1151 1150 1152 m_timelineAgent = new InspectorTimelineAgent(m_remoteFrontend.get()); 1151 if (m_ frontend)1152 m_ frontend->timelineProfilerWasStarted();1153 if (m_remoteFrontend) 1154 m_remoteFrontend->timelineProfilerWasStarted(); 1153 1155 m_client->timelineProfilerWasStarted(); 1154 1156 } … … 1163 1165 1164 1166 m_timelineAgent = 0; 1165 if (m_ frontend)1166 m_ frontend->timelineProfilerWasStopped();1167 if (m_remoteFrontend) 1168 m_remoteFrontend->timelineProfilerWasStopped(); 1167 1169 m_client->timelineProfilerWasStopped(); 1168 1170 } … … 1196 1198 void InspectorController::postWorkerNotificationToFrontend(const InspectorWorkerResource& worker, InspectorController::WorkerAction action) 1197 1199 { 1198 if (!m_ frontend)1200 if (!m_remoteFrontend) 1199 1201 return; 1200 1202 switch (action) { 1201 1203 case InspectorController::WorkerCreated: 1202 m_ frontend->didCreateWorker(worker);1204 m_remoteFrontend->didCreateWorker(worker.id(), worker.url(), worker.isSharedWorker()); 1203 1205 break; 1204 1206 case InspectorController::WorkerDestroyed: 1205 m_ frontend->didDestroyWorker(worker);1207 m_remoteFrontend->didDestroyWorker(worker.id()); 1206 1208 break; 1207 1209 } … … 1215 1217 RefPtr<InspectorWorkerResource> workerResource(InspectorWorkerResource::create(id, url, isSharedWorker)); 1216 1218 m_workers.set(id, workerResource); 1217 if (m_inspectedPage && m_ frontend)1219 if (m_inspectedPage && m_remoteFrontend) 1218 1220 m_inspectedPage->mainFrame()->document()->postTask(PostWorkerNotificationToFrontendTask::create(workerResource, InspectorController::WorkerCreated)); 1219 1221 } … … 1227 1229 if (workerResource == m_workers.end()) 1228 1230 return; 1229 if (m_inspectedPage && m_ frontend)1231 if (m_inspectedPage && m_remoteFrontend) 1230 1232 m_inspectedPage->mainFrame()->document()->postTask(PostWorkerNotificationToFrontendTask::create(workerResource->second, InspectorController::WorkerDestroyed)); 1231 1233 m_workers.remove(workerResource); … … 1575 1577 void InspectorController::toggleRecordButton(bool isProfiling) 1576 1578 { 1577 if (!m_ frontend)1578 return; 1579 m_ frontend->setRecordingProfile(isProfiling);1579 if (!m_remoteFrontend) 1580 return; 1581 m_remoteFrontend->setRecordingProfile(isProfiling); 1580 1582 } 1581 1583 … … 1593 1595 ScriptDebugServer::shared().recompileAllJSFunctionsSoon(); 1594 1596 1595 if (m_ frontend)1596 m_ frontend->profilerWasEnabled();1597 if (m_remoteFrontend) 1598 m_remoteFrontend->profilerWasEnabled(); 1597 1599 } 1598 1600 … … 1609 1611 ScriptDebugServer::shared().recompileAllJSFunctionsSoon(); 1610 1612 1611 if (m_ frontend)1612 m_ frontend->profilerWasDisabled();1613 if (m_remoteFrontend) 1614 m_remoteFrontend->profilerWasDisabled(); 1613 1615 } 1614 1616 #endif … … 1625 1627 m_debuggerAgent = InspectorDebuggerAgent::create(this); 1626 1628 1627 m_ frontend->debuggerWasEnabled();1629 m_remoteFrontend->debuggerWasEnabled(); 1628 1630 } 1629 1631 … … 1636 1638 return; 1637 1639 1638 if (!m_ frontend)1640 if (!m_remoteFrontend) 1639 1641 m_attachDebuggerWhenShown = true; 1640 1642 else { 1641 m_ frontend->attachDebuggerWhenShown();1643 m_remoteFrontend->attachDebuggerWhenShown(); 1642 1644 m_attachDebuggerWhenShown = false; 1643 1645 } … … 1658 1660 m_attachDebuggerWhenShown = false; 1659 1661 1660 if (m_ frontend)1661 m_ frontend->debuggerWasDisabled();1662 if (m_remoteFrontend) 1663 m_remoteFrontend->debuggerWasDisabled(); 1662 1664 } 1663 1665 … … 1667 1669 m_debuggerAgent->resume(); 1668 1670 } 1671 // JavaScriptDebugListener functions 1672 1669 1673 #endif 1670 1674 1671 1675 void InspectorController::evaluateForTestInFrontend(long callId, const String& script) 1672 1676 { 1673 if (m_ frontend)1674 m_ frontend->evaluateForTestInFrontend(callId, script);1677 if (m_remoteFrontend) 1678 m_remoteFrontend->evaluateForTestInFrontend(callId, script); 1675 1679 else 1676 1680 m_pendingEvaluateTestCommands.append(pair<long, String>(callId, script)); -
trunk/WebCore/inspector/InspectorFrontend.cpp
r64846 r64951 58 58 } 59 59 60 void InspectorFrontend::inspectedPageDestroyed()61 {62 ScriptFunctionCall function(m_webInspector, "inspectedPageDestroyed");63 function.call();64 }65 66 void InspectorFrontend::didCommitLoad()67 {68 callSimpleFunction("didCommitLoad");69 }70 71 void InspectorFrontend::populateApplicationSettings(const String& settings)72 {73 ScriptFunctionCall function(m_webInspector, "dispatch");74 function.appendArgument("populateApplicationSettings");75 function.appendArgument(settings);76 function.call();77 }78 79 void InspectorFrontend::populateSessionSettings(const String& settings)80 {81 ScriptFunctionCall function(m_webInspector, "dispatch");82 function.appendArgument("populateSessionSettings");83 function.appendArgument(settings);84 function.call();85 }86 87 void InspectorFrontend::updateFocusedNode(long nodeId)88 {89 ScriptFunctionCall function(m_webInspector, "dispatch");90 function.appendArgument("updateFocusedNode");91 function.appendArgument(nodeId);92 function.call();93 }94 95 60 void InspectorFrontend::showPanel(int panel) 96 61 { … … 130 95 } 131 96 132 void InspectorFrontend::populateInterface()133 {134 callSimpleFunction("populateInterface");135 }136 137 void InspectorFrontend::reset()138 {139 callSimpleFunction("reset");140 }141 142 void InspectorFrontend::resetProfilesPanel()143 {144 callSimpleFunction("resetProfilesPanel");145 }146 147 void InspectorFrontend::bringToFront()148 {149 callSimpleFunction("bringToFront");150 }151 152 void InspectorFrontend::inspectedURLChanged(const String& url)153 {154 ScriptFunctionCall function(m_webInspector, "dispatch");155 function.appendArgument("inspectedURLChanged");156 function.appendArgument(url);157 function.call();158 }159 160 void InspectorFrontend::resourceTrackingWasEnabled()161 {162 callSimpleFunction("resourceTrackingWasEnabled");163 }164 165 void InspectorFrontend::resourceTrackingWasDisabled()166 {167 callSimpleFunction("resourceTrackingWasDisabled");168 }169 170 void InspectorFrontend::searchingForNodeWasEnabled()171 {172 callSimpleFunction("searchingForNodeWasEnabled");173 }174 175 void InspectorFrontend::searchingForNodeWasDisabled()176 {177 callSimpleFunction("searchingForNodeWasDisabled");178 }179 180 void InspectorFrontend::monitoringXHRWasEnabled()181 {182 callSimpleFunction("monitoringXHRWasEnabled");183 }184 185 void InspectorFrontend::monitoringXHRWasDisabled()186 {187 callSimpleFunction("monitoringXHRWasDisabled");188 }189 190 void InspectorFrontend::updatePauseOnExceptionsState(long state)191 {192 ScriptFunctionCall function(m_webInspector, "dispatch");193 function.appendArgument("updatePauseOnExceptionsState");194 function.appendArgument(state);195 function.call();196 }197 198 void InspectorFrontend::timelineProfilerWasStarted()199 {200 callSimpleFunction("timelineProfilerWasStarted");201 }202 203 void InspectorFrontend::timelineProfilerWasStopped()204 {205 callSimpleFunction("timelineProfilerWasStopped");206 }207 208 #if ENABLE(JAVASCRIPT_DEBUGGER)209 void InspectorFrontend::attachDebuggerWhenShown()210 {211 callSimpleFunction("attachDebuggerWhenShown");212 }213 214 void InspectorFrontend::debuggerWasEnabled()215 {216 callSimpleFunction("debuggerWasEnabled");217 }218 219 void InspectorFrontend::debuggerWasDisabled()220 {221 callSimpleFunction("debuggerWasDisabled");222 }223 224 void InspectorFrontend::profilerWasEnabled()225 {226 callSimpleFunction("profilerWasEnabled");227 }228 229 void InspectorFrontend::profilerWasDisabled()230 {231 callSimpleFunction("profilerWasDisabled");232 }233 234 void InspectorFrontend::setRecordingProfile(bool isProfiling)235 {236 ScriptFunctionCall function(m_webInspector, "dispatch");237 function.appendArgument("setRecordingProfile");238 function.appendArgument(isProfiling);239 function.call();240 }241 #endif242 243 void InspectorFrontend::didPushNodeByPathToFrontend(long callId, long nodeId)244 {245 ScriptFunctionCall function(m_webInspector, "dispatch");246 function.appendArgument("didPushNodeByPathToFrontend");247 function.appendArgument(callId);248 function.appendArgument(nodeId);249 function.call();250 }251 252 #if ENABLE(WORKERS)253 void InspectorFrontend::didCreateWorker(const InspectorWorkerResource& worker)254 {255 ScriptFunctionCall function(m_webInspector, "dispatch");256 function.appendArgument("didCreateWorker");257 function.appendArgument(worker.id());258 function.appendArgument(worker.url());259 function.appendArgument(worker.isSharedWorker());260 function.call();261 }262 263 void InspectorFrontend::didDestroyWorker(const InspectorWorkerResource& worker)264 {265 ScriptFunctionCall function(m_webInspector, "dispatch");266 function.appendArgument("didDestroyWorker");267 function.appendArgument(worker.id());268 function.call();269 }270 #endif // ENABLE(WORKERS)271 272 void InspectorFrontend::contextMenuItemSelected(int itemId)273 {274 ScriptFunctionCall function(m_webInspector, "dispatch");275 function.appendArgument("contextMenuItemSelected");276 function.appendArgument(itemId);277 function.call();278 }279 280 void InspectorFrontend::contextMenuCleared()281 {282 callSimpleFunction("contextMenuCleared");283 }284 285 void InspectorFrontend::evaluateForTestInFrontend(long callId, const String& script)286 {287 ScriptFunctionCall function(m_webInspector, "dispatch");288 function.appendArgument("evaluateForTestInFrontend");289 function.appendArgument(callId);290 function.appendArgument(script);291 function.call();292 }293 294 97 void InspectorFrontend::callSimpleFunction(const String& functionName) 295 98 { -
trunk/WebCore/inspector/InspectorFrontend.h
r64846 r64951 48 48 49 49 void close(); 50 void inspectedPageDestroyed();51 52 void didCommitLoad();53 54 void populateApplicationSettings(const String& settings);55 void populateSessionSettings(const String& settings);56 57 void updateFocusedNode(long nodeId);58 50 void showPanel(int panel); 59 void populateInterface();60 void reset();61 void resetProfilesPanel();62 63 void bringToFront();64 void inspectedURLChanged(const String&);65 66 void resourceTrackingWasEnabled();67 void resourceTrackingWasDisabled();68 69 void searchingForNodeWasEnabled();70 void searchingForNodeWasDisabled();71 72 void monitoringXHRWasEnabled();73 void monitoringXHRWasDisabled();74 75 void updatePauseOnExceptionsState(long state);76 77 #if ENABLE(JAVASCRIPT_DEBUGGER)78 void attachDebuggerWhenShown();79 void debuggerWasEnabled();80 void debuggerWasDisabled();81 82 void profilerWasEnabled();83 void profilerWasDisabled();84 void setRecordingProfile(bool isProfiling);85 #endif86 87 void didPushNodeByPathToFrontend(long callId, long nodeId);88 89 void timelineProfilerWasStarted();90 void timelineProfilerWasStopped();91 92 #if ENABLE(WORKERS)93 void didCreateWorker(const InspectorWorkerResource&);94 void didDestroyWorker(const InspectorWorkerResource&);95 #endif // ENABLE(WORKER)96 97 void contextMenuItemSelected(int itemId);98 void contextMenuCleared();99 100 51 ScriptState* scriptState() const { return m_webInspector.scriptState(); } 101 102 void evaluateForTestInFrontend(long callId, const String& script);103 104 52 private: 105 53 void callSimpleFunction(const String& functionName); -
trunk/WebCore/inspector/InspectorFrontendClientLocal.cpp
r64124 r64951 40 40 #include "InspectorBackendDispatcher.h" 41 41 #include "InspectorController.h" 42 #include "InspectorFrontend.h"43 42 #include "InspectorFrontendHost.h" 44 43 #include "Page.h" -
trunk/WebCore/inspector/TimelineRecordFactory.cpp
r64722 r64951 35 35 36 36 #include "Event.h" 37 #include "InspectorFrontend.h"38 37 #include "InspectorValues.h" 39 38 #include "IntRect.h"
Note: See TracChangeset
for help on using the changeset viewer.