Changeset 64951 in webkit


Ignore:
Timestamp:
Aug 8, 2010 9:47:39 AM (14 years ago)
Author:
loislo@chromium.org
Message:

2010-08-08 Ilya Tikhonovsky <loislo@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:
Location:
trunk/WebCore
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r64950 r64951  
     12010-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
    1492010-08-08  Dan Bernstein  <mitz@apple.com>
    250
  • trunk/WebCore/inspector/ConsoleMessage.cpp

    r64722 r64951  
    3434#include "InjectedScript.h"
    3535#include "InjectedScriptHost.h"
    36 #include "InspectorFrontend.h"
    3736#include "InspectorValues.h"
    3837#include "ScriptCallStack.h"
  • trunk/WebCore/inspector/InjectedScriptHost.cpp

    r64653 r64951  
    4343#include "InspectorController.h"
    4444#include "InspectorDOMAgent.h"
    45 #include "InspectorFrontend.h"
    4645#include "InspectorResource.h"
    4746#include "Pasteboard.h"
     
    10099long InjectedScriptHost::pushNodePathToFrontend(Node* node, bool withChildren, bool selectInUI)
    101100{
    102     InspectorFrontend* frontend = inspectorFrontend();
     101    RemoteInspectorFrontend* frontend = remoteFrontend();
    103102    InspectorDOMAgent* domAgent = inspectorDOMAgent();
    104103    if (!domAgent || !frontend)
     
    180179}
    181180
    182 InspectorFrontend* InjectedScriptHost::inspectorFrontend()
    183 {
    184     if (!m_inspectorController)
    185         return 0;
    186     return m_inspectorController->m_frontend.get();
    187 }
    188 
    189181RemoteInspectorFrontend* InjectedScriptHost::remoteFrontend()
    190182{
  • trunk/WebCore/inspector/InjectedScriptHost.h

    r64653 r64951  
    4444class InjectedScript;
    4545class InspectorDOMAgent;
    46 class InspectorFrontend;
    4746class Node;
    4847class RemoteInspectorFrontend;
     
    9695    InjectedScriptHost(InspectorController* inspectorController);
    9796    InspectorDOMAgent* inspectorDOMAgent();
    98     InspectorFrontend* inspectorFrontend();
    9997    RemoteInspectorFrontend* remoteFrontend();
    10098    ScriptObject createInjectedScript(const String& source, ScriptState* scriptState, long id);
  • trunk/WebCore/inspector/Inspector.idl

    r64846 r64951  
    3737        [notify] void addNodesToSearchResult(out Array nodeIds);
    3838        [notify] void attributesUpdated(out long id, out Array attributes);
     39        [notify] void bringToFront();
    3940        [notify] void childNodeCountUpdated(out long id, out int newValue);
    4041        [notify] void childNodeInserted(out long parentId, out long prevId, out Object node);
    4142        [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();
    4260        [notify] void setChildNodes(out long parentId, out Array nodes);
    4361        [notify] void setDetachedRoot(out Object root);
    4462        [notify] void setDocument(out Value root);
     63        [notify] void timelineProfilerWasStarted();
     64        [notify] void timelineProfilerWasStopped();
    4565        [notify] void updateConsoleMessageExpiredCount(out unsigned long count);
    4666        [notify] void updateConsoleMessageRepeatCount(out unsigned long count);
     67        [notify] void updateFocusedNode(out long nodeId);
    4768        [notify] void updateResource(out Value resource);
    48         [notify] void removeResource(out unsigned long resourceId);
     69
    4970#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);
    5076        [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);
    5277        [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);
    5381        [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);
    5583        [notify] void updatePauseOnExceptionsState(out long state);
    56         [notify] void addProfileHeader(out Object header);
    5784#endif
    5885#if defined(ENABLE_DATABASE) && ENABLE_DATABASE
     
    6895        [notify] void updateApplicationCacheStatus(out int status);
    6996        [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);
    70101#endif
    71102
  • trunk/WebCore/inspector/InspectorBackend.cpp

    r64770 r64951  
    4141#include "InspectorController.h"
    4242#include "InspectorDOMAgent.h"
    43 #include "InspectorFrontend.h"
    4443#include "RemoteInspectorFrontend.h"
    4544#include "ScriptBreakpoint.h"
  • trunk/WebCore/inspector/InspectorController.cpp

    r64846 r64951  
    196196void InspectorController::inspectedPageDestroyed()
    197197{
    198     if (m_frontend)
    199         m_frontend->inspectedPageDestroyed();
     198    if (m_remoteFrontend)
     199        m_remoteFrontend->inspectedPageDestroyed();
    200200
    201201    hideHighlight();
     
    257257    m_nodeToFocus = node;
    258258
    259     if (!m_frontend) {
     259    if (!m_remoteFrontend) {
    260260        m_showAfterVisible = ElementsPanel;
    261261        return;
     
    270270        return;
    271271
    272     ASSERT(m_frontend);
     272    ASSERT(m_remoteFrontend);
    273273    ASSERT(m_nodeToFocus);
    274274
    275275    long id = m_domAgent->pushNodePathToFrontend(m_nodeToFocus.get());
    276     m_frontend->updateFocusedNode(id);
     276    m_remoteFrontend->updateFocusedNode(id);
    277277    m_nodeToFocus = 0;
    278278}
     
    304304bool InspectorController::windowVisible()
    305305{
    306     return m_frontend;
     306    return m_remoteFrontend;
    307307}
    308308
     
    331331    if (m_previousMessage && m_previousMessage->isEqual(scriptState, consoleMessage.get())) {
    332332        m_previousMessage->incrementCount();
    333         if (m_frontend)
     333        if (m_remoteFrontend)
    334334            m_previousMessage->updateRepeatCountInConsole(m_remoteFrontend.get());
    335335    } else {
    336336        m_previousMessage = consoleMessage.get();
    337337        m_consoleMessages.append(consoleMessage);
    338         if (m_frontend)
     338        if (m_remoteFrontend)
    339339            m_previousMessage->addToFrontend(m_remoteFrontend.get(), m_injectedScriptHost.get());
    340340    }
    341341
    342     if (!m_frontend && m_consoleMessages.size() >= maximumConsoleMessages) {
     342    if (!m_remoteFrontend && m_consoleMessages.size() >= maximumConsoleMessages) {
    343343        m_expiredConsoleMessageCount += expireConsoleMessagesStep;
    344344        m_consoleMessages.remove(0, expireConsoleMessagesStep);
     
    425425
    426426    if (enabled()) {
    427         if (m_frontend && frame == m_inspectedPage->mainFrame())
     427        if (m_remoteFrontend && frame == m_inspectedPage->mainFrame())
    428428            m_injectedScriptHost->discardInjectedScripts();
    429429        if (m_scriptsToEvaluateOnLoad.size()) {
     
    446446    if (!m_searchingForNode)
    447447        hideHighlight();
    448     if (m_frontend) {
     448    if (m_remoteFrontend) {
    449449        if (enabled)
    450             m_frontend->searchingForNodeWasEnabled();
     450            m_remoteFrontend->searchingForNodeWasEnabled();
    451451        else
    452             m_frontend->searchingForNodeWasDisabled();
     452            m_remoteFrontend->searchingForNodeWasDisabled();
    453453    }
    454454}
     
    460460    m_monitoringXHR = enabled;
    461461    setSetting(monitoringXHRSettingName, enabled ? "true" : "false");
    462     if (m_frontend) {
     462    if (m_remoteFrontend) {
    463463        if (enabled)
    464             m_frontend->monitoringXHRWasEnabled();
     464            m_remoteFrontend->monitoringXHRWasEnabled();
    465465        else
    466             m_frontend->monitoringXHRWasDisabled();
     466            m_remoteFrontend->monitoringXHRWasDisabled();
    467467    }
    468468}
     
    479479
    480480    // Initialize Web Inspector title.
    481     m_frontend->inspectedURLChanged(m_inspectedPage->mainFrame()->loader()->url().string());
     481    m_remoteFrontend->inspectedURLChanged(m_inspectedPage->mainFrame()->loader()->url().string());
    482482
    483483    populateScriptObjects();
     
    524524        return;
    525525
    526     if (m_frontend)
    527         m_frontend->bringToFront();
     526    if (m_remoteFrontend)
     527        m_remoteFrontend->bringToFront();
    528528    else {
    529529        m_openingFrontend = true;
     
    539539    show();
    540540
    541     if (!m_frontend) {
     541    if (!m_remoteFrontend) {
    542542        m_showAfterVisible = panel;
    543543        return;
     
    552552void InspectorController::close()
    553553{
    554     if (!m_frontend)
     554    if (!m_remoteFrontend)
    555555        return;
    556556    m_frontend->close();
     
    559559void InspectorController::disconnectFrontend()
    560560{
    561     if (!m_frontend)
     561    if (!m_remoteFrontend)
    562562        return;
    563563    m_frontend.clear();
     
    607607void InspectorController::populateScriptObjects()
    608608{
    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()));
    614614
    615615    if (m_resourceTrackingEnabled)
    616         m_frontend->resourceTrackingWasEnabled();
     616        m_remoteFrontend->resourceTrackingWasEnabled();
    617617
    618618    if (m_searchingForNode)
    619         m_frontend->searchingForNodeWasEnabled();
     619        m_remoteFrontend->searchingForNodeWasEnabled();
    620620
    621621    if (m_monitoringXHR)
    622         m_frontend->monitoringXHRWasEnabled();
     622        m_remoteFrontend->monitoringXHRWasEnabled();
    623623
    624624#if ENABLE(JAVASCRIPT_DEBUGGER)
    625625    if (m_profilerEnabled)
    626         m_frontend->profilerWasEnabled();
     626        m_remoteFrontend->profilerWasEnabled();
    627627#endif
    628628
     
    641641#if ENABLE(JAVASCRIPT_DEBUGGER)
    642642    if (debuggerEnabled())
    643         m_frontend->updatePauseOnExceptionsState(ScriptDebugServer::shared().pauseOnExceptionsState());
     643        m_remoteFrontend->updatePauseOnExceptionsState(ScriptDebugServer::shared().pauseOnExceptionsState());
    644644#endif
    645645#if ENABLE(DATABASE)
     
    655655#if ENABLE(WORKERS)
    656656    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();
    663665
    664666    // Dispatch pending frontend commands
    665667    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);
    667669    m_pendingEvaluateTestCommands.clear();
    668670}
     
    715717
    716718    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());
    719721
    720722        m_injectedScriptHost->discardInjectedScripts();
     
    731733        m_currentUserInitiatedProfileNumber = 1;
    732734        m_nextUserInitiatedProfileNumber = 1;
    733         if (m_frontend)
    734             m_frontend->resetProfilesPanel();
     735        if (m_remoteFrontend)
     736            m_remoteFrontend->resetProfilesPanel();
    735737#endif
    736738        // unbindAllResources should be called before database and DOM storage
     
    740742        m_cssStore->reset();
    741743        m_sessionSettings = InspectorObject::create();
    742         if (m_frontend) {
    743             m_frontend->reset();
     744        if (m_remoteFrontend) {
     745            m_remoteFrontend->reset();
    744746            m_domAgent->reset();
    745747        }
     
    754756#endif
    755757
    756         if (m_frontend) {
     758        if (m_remoteFrontend) {
    757759            if (!loader->frameLoader()->isLoadingFromCachedPage()) {
    758760                ASSERT(m_mainResource && m_mainResource->isSameLoader(loader));
     
    768770                m_mainResource = 0;
    769771            }
    770             m_frontend->didCommitLoad();
     772            m_remoteFrontend->didCommitLoad();
    771773            m_domAgent->setDocument(m_inspectedPage->mainFrame()->document());
    772774        }
     
    11011103    ASSERT(m_inspectedPage);
    11021104    m_resourceTrackingEnabled = true;
    1103     if (m_frontend)
    1104         m_frontend->resourceTrackingWasEnabled();
     1105    if (m_remoteFrontend)
     1106        m_remoteFrontend->resourceTrackingWasEnabled();
    11051107    m_client->resourceTrackingWasEnabled();
    11061108
     
    11191121    ASSERT(m_inspectedPage);
    11201122    m_resourceTrackingEnabled = false;
    1121     if (m_frontend)
    1122         m_frontend->resourceTrackingWasDisabled();
     1123    if (m_remoteFrontend)
     1124        m_remoteFrontend->resourceTrackingWasDisabled();
    11231125    m_client->resourceTrackingWasDisabled();
    11241126}
     
    11491151
    11501152    m_timelineAgent = new InspectorTimelineAgent(m_remoteFrontend.get());
    1151     if (m_frontend)
    1152         m_frontend->timelineProfilerWasStarted();
     1153    if (m_remoteFrontend)
     1154        m_remoteFrontend->timelineProfilerWasStarted();
    11531155    m_client->timelineProfilerWasStarted();
    11541156}
     
    11631165
    11641166    m_timelineAgent = 0;
    1165     if (m_frontend)
    1166         m_frontend->timelineProfilerWasStopped();
     1167    if (m_remoteFrontend)
     1168        m_remoteFrontend->timelineProfilerWasStopped();
    11671169    m_client->timelineProfilerWasStopped();
    11681170}
     
    11961198void InspectorController::postWorkerNotificationToFrontend(const InspectorWorkerResource& worker, InspectorController::WorkerAction action)
    11971199{
    1198     if (!m_frontend)
     1200    if (!m_remoteFrontend)
    11991201        return;
    12001202    switch (action) {
    12011203    case InspectorController::WorkerCreated:
    1202         m_frontend->didCreateWorker(worker);
     1204        m_remoteFrontend->didCreateWorker(worker.id(), worker.url(), worker.isSharedWorker());
    12031205        break;
    12041206    case InspectorController::WorkerDestroyed:
    1205         m_frontend->didDestroyWorker(worker);
     1207        m_remoteFrontend->didDestroyWorker(worker.id());
    12061208        break;
    12071209    }
     
    12151217    RefPtr<InspectorWorkerResource> workerResource(InspectorWorkerResource::create(id, url, isSharedWorker));
    12161218    m_workers.set(id, workerResource);
    1217     if (m_inspectedPage && m_frontend)
     1219    if (m_inspectedPage && m_remoteFrontend)
    12181220        m_inspectedPage->mainFrame()->document()->postTask(PostWorkerNotificationToFrontendTask::create(workerResource, InspectorController::WorkerCreated));
    12191221}
     
    12271229    if (workerResource == m_workers.end())
    12281230        return;
    1229     if (m_inspectedPage && m_frontend)
     1231    if (m_inspectedPage && m_remoteFrontend)
    12301232        m_inspectedPage->mainFrame()->document()->postTask(PostWorkerNotificationToFrontendTask::create(workerResource->second, InspectorController::WorkerDestroyed));
    12311233    m_workers.remove(workerResource);
     
    15751577void InspectorController::toggleRecordButton(bool isProfiling)
    15761578{
    1577     if (!m_frontend)
    1578         return;
    1579     m_frontend->setRecordingProfile(isProfiling);
     1579    if (!m_remoteFrontend)
     1580        return;
     1581    m_remoteFrontend->setRecordingProfile(isProfiling);
    15801582}
    15811583
     
    15931595        ScriptDebugServer::shared().recompileAllJSFunctionsSoon();
    15941596
    1595     if (m_frontend)
    1596         m_frontend->profilerWasEnabled();
     1597    if (m_remoteFrontend)
     1598        m_remoteFrontend->profilerWasEnabled();
    15971599}
    15981600
     
    16091611    ScriptDebugServer::shared().recompileAllJSFunctionsSoon();
    16101612
    1611     if (m_frontend)
    1612         m_frontend->profilerWasDisabled();
     1613    if (m_remoteFrontend)
     1614        m_remoteFrontend->profilerWasDisabled();
    16131615}
    16141616#endif
     
    16251627    m_debuggerAgent = InspectorDebuggerAgent::create(this);
    16261628
    1627     m_frontend->debuggerWasEnabled();
     1629    m_remoteFrontend->debuggerWasEnabled();
    16281630}
    16291631
     
    16361638        return;
    16371639
    1638     if (!m_frontend)
     1640    if (!m_remoteFrontend)
    16391641        m_attachDebuggerWhenShown = true;
    16401642    else {
    1641         m_frontend->attachDebuggerWhenShown();
     1643        m_remoteFrontend->attachDebuggerWhenShown();
    16421644        m_attachDebuggerWhenShown = false;
    16431645    }
     
    16581660    m_attachDebuggerWhenShown = false;
    16591661
    1660     if (m_frontend)
    1661         m_frontend->debuggerWasDisabled();
     1662    if (m_remoteFrontend)
     1663        m_remoteFrontend->debuggerWasDisabled();
    16621664}
    16631665
     
    16671669        m_debuggerAgent->resume();
    16681670}
     1671// JavaScriptDebugListener functions
     1672
    16691673#endif
    16701674
    16711675void InspectorController::evaluateForTestInFrontend(long callId, const String& script)
    16721676{
    1673     if (m_frontend)
    1674         m_frontend->evaluateForTestInFrontend(callId, script);
     1677    if (m_remoteFrontend)
     1678        m_remoteFrontend->evaluateForTestInFrontend(callId, script);
    16751679    else
    16761680        m_pendingEvaluateTestCommands.append(pair<long, String>(callId, script));
  • trunk/WebCore/inspector/InspectorFrontend.cpp

    r64846 r64951  
    5858}
    5959
    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 
    9560void InspectorFrontend::showPanel(int panel)
    9661{
     
    13095}
    13196
    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 #endif
    242 
    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 
    29497void InspectorFrontend::callSimpleFunction(const String& functionName)
    29598{
  • trunk/WebCore/inspector/InspectorFrontend.h

    r64846 r64951  
    4848
    4949        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);
    5850        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 #endif
    86 
    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 
    10051        ScriptState* scriptState() const { return m_webInspector.scriptState(); }
    101 
    102         void evaluateForTestInFrontend(long callId, const String& script);
    103 
    10452    private:
    10553        void callSimpleFunction(const String& functionName);
  • trunk/WebCore/inspector/InspectorFrontendClientLocal.cpp

    r64124 r64951  
    4040#include "InspectorBackendDispatcher.h"
    4141#include "InspectorController.h"
    42 #include "InspectorFrontend.h"
    4342#include "InspectorFrontendHost.h"
    4443#include "Page.h"
  • trunk/WebCore/inspector/TimelineRecordFactory.cpp

    r64722 r64951  
    3535
    3636#include "Event.h"
    37 #include "InspectorFrontend.h"
    3837#include "InspectorValues.h"
    3938#include "IntRect.h"
Note: See TracChangeset for help on using the changeset viewer.