Changeset 80204 in webkit


Ignore:
Timestamp:
Mar 2, 2011 9:43:34 PM (13 years ago)
Author:
yurys@chromium.org
Message:

2011-03-02 Yury Semikhatsky <yurys@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: break down InspectorFrontend into domain-specific classes
https://bugs.webkit.org/show_bug.cgi?id=55584

  • inspector/elements/elements-panel-search.html:

2011-03-02 Yury Semikhatsky <yurys@chromium.org>

Reviewed by Pavel Feldman.

Web Inspector: break down InspectorFrontend into domain-specific classes
https://bugs.webkit.org/show_bug.cgi?id=55584

  • inspector/CodeGeneratorInspector.pm: InspectorFrontend now contains nested classes for all domains that have event notifications.
  • inspector/ConsoleMessage.cpp: (WebCore::ConsoleMessage::addToFrontend): (WebCore::ConsoleMessage::updateRepeatCountInConsole):
  • inspector/ConsoleMessage.h:
  • inspector/InjectedScriptHost.cpp: (WebCore::InjectedScriptHost::inspectImpl):
  • inspector/Inspector.idl:
  • inspector/InspectorAgent.cpp: (WebCore::InspectorAgent::inspectedPageDestroyed): (WebCore::InspectorAgent::restoreInspectorStateFromCookie): (WebCore::InspectorAgent::setFrontend): (WebCore::InspectorAgent::disconnectFrontend): (WebCore::InspectorAgent::populateScriptObjects): (WebCore::InspectorAgent::pushDataCollectedOffline): (WebCore::InspectorAgent::didCommitLoad): (WebCore::InspectorAgent::domContentLoadedEventFired): (WebCore::InspectorAgent::loadEventFired): (WebCore::InspectorAgent::postWorkerNotificationToFrontend): (WebCore::InspectorAgent::evaluateForTestInFrontend): (WebCore::InspectorAgent::showPanel):
  • inspector/InspectorApplicationCacheAgent.cpp: (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
  • inspector/InspectorApplicationCacheAgent.h:
  • inspector/InspectorConsoleAgent.cpp: (WebCore::InspectorConsoleAgent::setFrontend):
  • inspector/InspectorConsoleAgent.h:
  • inspector/InspectorController.cpp: (WebCore::InspectorController::show): (WebCore::InspectorController::close):
  • inspector/InspectorDOMAgent.cpp: (WebCore::InspectorDOMAgent::setFrontend):
  • inspector/InspectorDOMAgent.h:
  • inspector/InspectorDOMStorageResource.cpp: (WebCore::InspectorDOMStorageResource::bind):
  • inspector/InspectorDOMStorageResource.h:
  • inspector/InspectorDatabaseAgent.cpp: (WebCore::InspectorDatabaseAgent::FrontendProvider::frontend): (WebCore::InspectorDatabaseAgent::FrontendProvider::FrontendProvider): (WebCore::InspectorDatabaseAgent::setFrontend):
  • inspector/InspectorDatabaseResource.cpp: (WebCore::InspectorDatabaseResource::bind):
  • inspector/InspectorDatabaseResource.h:
  • inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::setFrontend):
  • inspector/InspectorDebuggerAgent.h:
  • inspector/InspectorProfilerAgent.cpp:
  • inspector/InspectorProfilerAgent.h: (WebCore::InspectorProfilerAgent::setFrontend): (WebCore::InspectorProfilerAgent::clearFrontend):
  • inspector/InspectorResourceAgent.cpp: (WebCore::InspectorResourceAgent::InspectorResourceAgent):
  • inspector/InspectorResourceAgent.h:
  • inspector/InspectorTimelineAgent.cpp: (WebCore::InspectorTimelineAgent::setFrontend):
  • inspector/InspectorTimelineAgent.h:
  • inspector/front-end/DOMAgent.js: (WebInspector.DOMDispatcher.prototype.inspectElementRequested): (WebInspector.DOMDispatcher.prototype.addNodesToSearchResult):
  • inspector/front-end/inspector.js:
Location:
trunk
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r80193 r80204  
     12011-03-02  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: break down InspectorFrontend into domain-specific classes
     6        https://bugs.webkit.org/show_bug.cgi?id=55584
     7
     8        * inspector/elements/elements-panel-search.html:
     9
    1102011-03-02  Mihai Parparita  <mihaip@chromium.org>
    211
  • trunk/LayoutTests/inspector/elements/elements-panel-search.html

    r78717 r80204  
    1919    }
    2020
    21     WebInspector.addNodesToSearchResult = function(nodeIds)
     21    WebInspector.panels.elements.addNodesToSearchResult = function(nodeIds)
    2222    {
    2323        for (var i = 0; i < nodeIds.length; ++i) {
  • trunk/Source/WebCore/ChangeLog

    r80203 r80204  
     12011-03-02  Yury Semikhatsky  <yurys@chromium.org>
     2
     3        Reviewed by Pavel Feldman.
     4
     5        Web Inspector: break down InspectorFrontend into domain-specific classes
     6        https://bugs.webkit.org/show_bug.cgi?id=55584
     7
     8        * inspector/CodeGeneratorInspector.pm: InspectorFrontend now contains nested classes for
     9        all domains that have event notifications.
     10        * inspector/ConsoleMessage.cpp:
     11        (WebCore::ConsoleMessage::addToFrontend):
     12        (WebCore::ConsoleMessage::updateRepeatCountInConsole):
     13        * inspector/ConsoleMessage.h:
     14        * inspector/InjectedScriptHost.cpp:
     15        (WebCore::InjectedScriptHost::inspectImpl):
     16        * inspector/Inspector.idl:
     17        * inspector/InspectorAgent.cpp:
     18        (WebCore::InspectorAgent::inspectedPageDestroyed):
     19        (WebCore::InspectorAgent::restoreInspectorStateFromCookie):
     20        (WebCore::InspectorAgent::setFrontend):
     21        (WebCore::InspectorAgent::disconnectFrontend):
     22        (WebCore::InspectorAgent::populateScriptObjects):
     23        (WebCore::InspectorAgent::pushDataCollectedOffline):
     24        (WebCore::InspectorAgent::didCommitLoad):
     25        (WebCore::InspectorAgent::domContentLoadedEventFired):
     26        (WebCore::InspectorAgent::loadEventFired):
     27        (WebCore::InspectorAgent::postWorkerNotificationToFrontend):
     28        (WebCore::InspectorAgent::evaluateForTestInFrontend):
     29        (WebCore::InspectorAgent::showPanel):
     30        * inspector/InspectorApplicationCacheAgent.cpp:
     31        (WebCore::InspectorApplicationCacheAgent::InspectorApplicationCacheAgent):
     32        * inspector/InspectorApplicationCacheAgent.h:
     33        * inspector/InspectorConsoleAgent.cpp:
     34        (WebCore::InspectorConsoleAgent::setFrontend):
     35        * inspector/InspectorConsoleAgent.h:
     36        * inspector/InspectorController.cpp:
     37        (WebCore::InspectorController::show):
     38        (WebCore::InspectorController::close):
     39        * inspector/InspectorDOMAgent.cpp:
     40        (WebCore::InspectorDOMAgent::setFrontend):
     41        * inspector/InspectorDOMAgent.h:
     42        * inspector/InspectorDOMStorageResource.cpp:
     43        (WebCore::InspectorDOMStorageResource::bind):
     44        * inspector/InspectorDOMStorageResource.h:
     45        * inspector/InspectorDatabaseAgent.cpp:
     46        (WebCore::InspectorDatabaseAgent::FrontendProvider::frontend):
     47        (WebCore::InspectorDatabaseAgent::FrontendProvider::FrontendProvider):
     48        (WebCore::InspectorDatabaseAgent::setFrontend):
     49        * inspector/InspectorDatabaseResource.cpp:
     50        (WebCore::InspectorDatabaseResource::bind):
     51        * inspector/InspectorDatabaseResource.h:
     52        * inspector/InspectorDebuggerAgent.cpp:
     53        (WebCore::InspectorDebuggerAgent::setFrontend):
     54        * inspector/InspectorDebuggerAgent.h:
     55        * inspector/InspectorProfilerAgent.cpp:
     56        * inspector/InspectorProfilerAgent.h:
     57        (WebCore::InspectorProfilerAgent::setFrontend):
     58        (WebCore::InspectorProfilerAgent::clearFrontend):
     59        * inspector/InspectorResourceAgent.cpp:
     60        (WebCore::InspectorResourceAgent::InspectorResourceAgent):
     61        * inspector/InspectorResourceAgent.h:
     62        * inspector/InspectorTimelineAgent.cpp:
     63        (WebCore::InspectorTimelineAgent::setFrontend):
     64        * inspector/InspectorTimelineAgent.h:
     65        * inspector/front-end/DOMAgent.js:
     66        (WebInspector.DOMDispatcher.prototype.inspectElementRequested):
     67        (WebInspector.DOMDispatcher.prototype.addNodesToSearchResult):
     68        * inspector/front-end/inspector.js:
     69
    1702011-03-02  Kent Tamura  <tkent@chromium.org>
    271
  • trunk/Source/WebCore/inspector/CodeGeneratorInspector.pm

    r79558 r80204  
    222222my %frontendTypes;
    223223my @frontendMethods;
     224my @frontendAgentFields;
    224225my @frontendMethodsImpl;
    225226my %frontendMethodSignatures;
     
    227228my @frontendConstantDeclarations;
    228229my @frontendConstantDefinitions;
    229 my $frontendFooter;
     230my @frontendFooter;
    230231
    231232my @documentationToc;
     
    258259    $namespace = $dataNode->module;
    259260    $namespace =~ s/core/WebCore/;
    260 }
    261 
    262 # Params: 'idlDocument' struct
    263 sub GenerateInterface
    264 {
    265     my $object = shift;
    266     my $interface = shift;
    267     my $defines = shift;
    268 
    269     my $className = $interface->name;
    270261
    271262    $frontendClassName = "InspectorFrontend";
    272     $frontendConstructor = "    ${frontendClassName}(InspectorClient* inspectorClient) : m_inspectorClient(inspectorClient) { }";
    273     $frontendFooter = "  private:\n    InspectorClient* m_inspectorClient;";
     263    $frontendConstructor = "    ${frontendClassName}(InspectorClient*);";
     264    push(@frontendFooter, "private:");
     265    push(@frontendFooter, "    InspectorClient* m_inspectorClient;");
    274266    $frontendTypes{"String"} = 1;
    275267    $frontendTypes{"InspectorClient"} = 1;
     
    289281    $backendTypes{"PassRefPtr"} = 1;
    290282    $backendTypes{"Object"} = 1;
    291 
    292     generateFunctions($interface);
     283}
     284
     285# Params: 'idlDocument' struct
     286sub GenerateInterface
     287{
     288    my $object = shift;
     289    my $interface = shift;
     290    my $defines = shift;
     291
     292    my %agent = (
     293        methodDeclarations => [],
     294        methodSignatures => {}
     295    );
     296    generateFunctions($interface, \%agent);
     297    if (@{%agent->{methodDeclarations}}) {
     298        generateAgentDeclaration($interface, \%agent);
     299    }
     300}
     301
     302sub generateAgentDeclaration
     303{
     304    my $interface = shift;
     305    my $agent = shift;
     306    my $agentName = $interface->name;
     307    push(@frontendMethods, "    class ${agentName} {");
     308    push(@frontendMethods, "    public:");
     309    push(@frontendMethods, "        ${agentName}(InspectorClient* inspectorClient) : m_inspectorClient(inspectorClient) { }");
     310    push(@frontendMethods, @{$agent->{methodDeclarations}});
     311    push(@frontendMethods, "    private:");
     312    push(@frontendMethods, "        InspectorClient* m_inspectorClient;");
     313    push(@frontendMethods, "    };");
     314    push(@frontendMethods, "");
     315
     316    my $getterName = lc($agentName);
     317    push(@frontendMethods, "    ${agentName}* ${getterName}() { return &m_${getterName}; }");
     318    push(@frontendMethods, "");
     319
     320    push(@frontendFooter, "    ${agentName} m_${getterName};");
     321
     322    push(@frontendAgentFields, "m_${getterName}");
     323}
     324
     325sub generateFrontendConstructorImpl
     326{
     327    my @frontendConstructorImpl;
     328    push(@frontendConstructorImpl, "${frontendClassName}::${frontendClassName}(InspectorClient* inspectorClient)");
     329    push(@frontendConstructorImpl, "    : m_inspectorClient(inspectorClient)");
     330    foreach my $agentField (@frontendAgentFields) {
     331        push(@frontendConstructorImpl, "    , ${agentField}(inspectorClient)");
     332    }
     333    push(@frontendConstructorImpl, "{");
     334    push(@frontendConstructorImpl, "}");
     335    return @frontendConstructorImpl;
    293336}
    294337
     
    296339{
    297340    my $interface = shift;
     341    my $agent = shift;
    298342
    299343    foreach my $function (@{$interface->functions}) {
    300344        if ($function->signature->extendedAttributes->{"event"}) {
    301             generateFrontendFunction($interface, $function);
     345            generateFrontendFunction($interface, $function, $agent);
    302346        } else {
    303347            generateBackendFunction($interface, $function);
     
    325369    my $interface = shift;
    326370    my $function = shift;
     371    my $agent = shift;
    327372
    328373    my $functionName = $function->signature->name;
     
    333378    my $arguments = join(", ", map(typeTraits($_->type, "param") . " " . $_->name, @argsFiltered)); # prepare arguments for function signature.
    334379
    335     my $signature = "    void ${functionName}(${arguments});";
    336     !$frontendMethodSignatures{${signature}} || die "Duplicate frontend function was detected for signature '$signature'.";
    337     $frontendMethodSignatures{${signature}} = 1;
    338     push(@frontendMethods, $signature);
     380    my $signature = "        void ${functionName}(${arguments});";
     381    !$agent->{methodSignatures}->{$signature} || die "Duplicate frontend function was detected for signature '$signature'.";
     382    $agent->{methodSignatures}->{$signature} = 1;
     383    push(@{$agent->{methodDeclarations}}, $signature);
    339384
    340385    my @function;
    341     push(@function, "void ${frontendClassName}::${functionName}(${arguments})");
     386    push(@function, "void ${frontendClassName}::${domain}::${functionName}(${arguments})");
    342387    push(@function, "{");
    343388    push(@function, "    RefPtr<InspectorObject> ${functionName}Message = InspectorObject::create();");
     
    350395    push(@function, "    ${functionName}Message->setObject(\"body\", bodyObject);");
    351396    push(@function, "    m_inspectorClient->sendMessageToFrontend(${functionName}Message->toJSONString());");
    352 
    353397    push(@function, "}");
    354398    push(@function, "");
     
    9751019    push(@backendMethodsImpl, generateBackendDispatcher());
    9761020    push(@backendMethodsImpl, generateBackendReportProtocolError());
     1021    unshift(@frontendMethodsImpl, generateFrontendConstructorImpl(), "");
    9771022
    9781023    open(my $SOURCE, ">$outputDir/$frontendClassName.cpp") || die "Couldn't open file $outputDir/$frontendClassName.cpp";
     
    9821027
    9831028    open(my $HEADER, ">$outputHeadersDir/$frontendClassName.h") || die "Couldn't open file $outputHeadersDir/$frontendClassName.h";
    984     print $HEADER generateHeader($frontendClassName, \%frontendTypes, $frontendConstructor, \@frontendConstantDeclarations, \@frontendMethods, $frontendFooter);
     1029    print $HEADER generateHeader($frontendClassName, \%frontendTypes, $frontendConstructor, \@frontendConstantDeclarations, \@frontendMethods, join("\n", @frontendFooter));
    9851030    close($HEADER);
    9861031    undef($HEADER);
  • trunk/Source/WebCore/inspector/ConsoleMessage.cpp

    r80141 r80204  
    8787}
    8888
    89 void ConsoleMessage::addToFrontend(InspectorFrontend* frontend, InjectedScriptHost* injectedScriptHost)
     89void ConsoleMessage::addToFrontend(InspectorFrontend::Console* frontend, InjectedScriptHost* injectedScriptHost)
    9090{
    9191    RefPtr<InspectorObject> jsonObj = InspectorObject::create();
     
    119119}
    120120
    121 void ConsoleMessage::updateRepeatCountInConsole(InspectorFrontend* frontend)
     121void ConsoleMessage::updateRepeatCountInConsole(InspectorFrontend::Console* frontend)
    122122{
    123123    frontend->updateConsoleMessageRepeatCount(m_repeatCount);
  • trunk/Source/WebCore/inspector/ConsoleMessage.h

    r76248 r80204  
    3333
    3434#include "Console.h"
     35#include "InspectorFrontend.h"
    3536#include "ScriptState.h"
    3637
     
    5556    ~ConsoleMessage();
    5657
    57     void addToFrontend(InspectorFrontend*, InjectedScriptHost*);
    58     void updateRepeatCountInConsole(InspectorFrontend* frontend);
     58    void addToFrontend(InspectorFrontend::Console*, InjectedScriptHost*);
     59    void updateRepeatCountInConsole(InspectorFrontend::Console*);
    5960    void incrementCount() { ++m_repeatCount; }
    6061    bool isEqual(ConsoleMessage* msg) const;
  • trunk/Source/WebCore/inspector/InjectedScriptHost.cpp

    r80141 r80204  
    8484{
    8585    if (InspectorFrontend* fe = frontend())
    86         fe->inspect(objectId->asObject(), hints->asObject());
     86        fe->inspector()->inspect(objectId->asObject(), hints->asObject());
    8787}
    8888
  • trunk/Source/WebCore/inspector/Inspector.idl

    r80141 r80204  
    4040        void setSearchingForNode(in boolean enabled, out boolean newState);
    4141        [event] void frontendReused();
    42         [event] void addNodesToSearchResult(out Array nodeIds);
    4342        [event] void bringToFront();
    4443        [event] void disconnectFromBackend();
     
    164163        void pushNodeToFrontend(in Object objectId, out long nodeId);
    165164
     165        [event] void addNodesToSearchResult(out Array nodeIds);
    166166        [event] void setDocument(out Value root); // FIXME: should be requested from the front-end as getDocument.
    167167        [event] void attributesUpdated(out long id, out Array attributes);
  • trunk/Source/WebCore/inspector/InspectorAgent.cpp

    r80116 r80204  
    172172{
    173173    if (m_frontend)
    174         m_frontend->disconnectFromBackend();
     174        m_frontend->inspector()->disconnectFromBackend();
    175175
    176176    ErrorString error;
     
    202202    m_state->loadFromCookie(inspectorStateCookie);
    203203
    204     m_frontend->frontendReused();
    205     m_frontend->inspectedURLChanged(inspectedURL().string());
     204    m_frontend->inspector()->frontendReused();
     205    m_frontend->inspector()->inspectedURLChanged(inspectedURL().string());
    206206    pushDataCollectedOffline();
    207207
     
    377377#endif
    378378    // Initialize Web Inspector title.
    379     m_frontend->inspectedURLChanged(inspectedURL().string());
     379    m_frontend->inspector()->inspectedURLChanged(inspectedURL().string());
    380380}
    381381
     
    401401
    402402#if ENABLE(JAVASCRIPT_DEBUGGER)
    403     m_profilerAgent->setFrontend(0);
     403    m_profilerAgent->clearFrontend();
    404404    m_profilerAgent->stopUserInitiatedProfiling(true);
    405405#endif
     
    452452#if ENABLE(JAVASCRIPT_DEBUGGER)
    453453    if (m_profilerAgent->enabled())
    454         m_frontend->profilerWasEnabled();
     454        m_frontend->profiler()->profilerWasEnabled();
    455455#endif
    456456
     
    461461
    462462    if (!m_showPanelAfterVisible.isEmpty()) {
    463         m_frontend->showPanel(m_showPanelAfterVisible);
     463        m_frontend->inspector()->showPanel(m_showPanelAfterVisible);
    464464        m_showPanelAfterVisible = "";
    465465    }
     
    472472    // Dispatch pending frontend commands
    473473    for (Vector<pair<long, String> >::iterator it = m_pendingEvaluateTestCommands.begin(); it != m_pendingEvaluateTestCommands.end(); ++it)
    474         m_frontend->evaluateForTestInFrontend((*it).first, (*it).second);
     474        m_frontend->inspector()->evaluateForTestInFrontend((*it).first, (*it).second);
    475475    m_pendingEvaluateTestCommands.clear();
    476476}
     
    484484    for (WorkersMap::iterator it = m_workers.begin(); it != workersEnd; ++it) {
    485485        InspectorWorkerResource* worker = it->second.get();
    486         m_frontend->didCreateWorker(worker->id(), worker->url(), worker->isSharedWorker());
     486        m_frontend->debugger()->didCreateWorker(worker->id(), worker->url(), worker->isSharedWorker());
    487487    }
    488488#endif
     
    515515    if (loader->frame() == m_inspectedPage->mainFrame()) {
    516516        if (m_frontend)
    517             m_frontend->inspectedURLChanged(loader->url().string());
     517            m_frontend->inspector()->inspectedURLChanged(loader->url().string());
    518518
    519519        m_injectedScriptHost->discardInjectedScripts();
     
    543543
    544544        if (m_frontend) {
    545             m_frontend->reset();
     545            m_frontend->inspector()->reset();
    546546            m_domAgent->reset();
    547547            m_cssAgent->reset();
     
    571571        timelineAgent->didMarkDOMContentEvent();
    572572    if (m_frontend)
    573         m_frontend->domContentEventFired(currentTime());
     573        m_frontend->inspector()->domContentEventFired(currentTime());
    574574}
    575575
     
    588588        timelineAgent->didMarkLoadEvent();
    589589    if (m_frontend)
    590         m_frontend->loadEventFired(currentTime());
     590        m_frontend->inspector()->loadEventFired(currentTime());
    591591}
    592592
     
    642642    switch (action) {
    643643    case InspectorAgent::WorkerCreated:
    644         m_frontend->didCreateWorker(worker.id(), worker.url(), worker.isSharedWorker());
     644        m_frontend->debugger()->didCreateWorker(worker.id(), worker.url(), worker.isSharedWorker());
    645645        break;
    646646    case InspectorAgent::WorkerDestroyed:
    647         m_frontend->didDestroyWorker(worker.id());
     647        m_frontend->debugger()->didDestroyWorker(worker.id());
    648648        break;
    649649    }
     
    842842{
    843843    if (m_frontend)
    844         m_frontend->evaluateForTestInFrontend(callId, script);
     844        m_frontend->inspector()->evaluateForTestInFrontend(callId, script);
    845845    else
    846846        m_pendingEvaluateTestCommands.append(pair<long, String>(callId, script));
     
    11691169        return;
    11701170    }
    1171     m_frontend->showPanel(panel);
     1171    m_frontend->inspector()->showPanel(panel);
    11721172}
    11731173
  • trunk/Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp

    r79539 r80204  
    4444InspectorApplicationCacheAgent::InspectorApplicationCacheAgent(DocumentLoader* documentLoader, InspectorFrontend* frontend)
    4545    : m_documentLoader(documentLoader)
    46     , m_frontend(frontend)
     46    , m_frontend(frontend->applicationcache())
    4747{
    4848}
  • trunk/Source/WebCore/inspector/InspectorApplicationCacheAgent.h

    r79539 r80204  
    2929
    3030#include "ApplicationCacheHost.h"
     31#include "InspectorFrontend.h"
    3132#include <wtf/Noncopyable.h>
    3233#include <wtf/PassRefPtr.h>
     
    6667
    6768    DocumentLoader* m_documentLoader;
    68     InspectorFrontend* m_frontend;
     69    InspectorFrontend::ApplicationCache* m_frontend;
    6970};
    7071
  • trunk/Source/WebCore/inspector/InspectorConsoleAgent.cpp

    r79539 r80204  
    107107void InspectorConsoleAgent::setFrontend(InspectorFrontend* frontend)
    108108{
    109     m_frontend = frontend;
     109    m_frontend = frontend->console();
    110110}
    111111
  • trunk/Source/WebCore/inspector/InspectorConsoleAgent.h

    r79539 r80204  
    2727
    2828#include "Console.h"
     29#include "InspectorFrontend.h"
    2930#include <wtf/Forward.h>
    3031#include <wtf/HashMap.h>
     
    8990    InjectedScriptHost* m_injectedScriptHost;
    9091    InspectorDOMAgent* m_inspectorDOMAgent;
    91     InspectorFrontend* m_frontend;
     92    InspectorFrontend::Console* m_frontend;
    9293    ConsoleMessage* m_previousMessage;
    9394    Vector<OwnPtr<ConsoleMessage> > m_consoleMessages;
  • trunk/Source/WebCore/inspector/InspectorController.cpp

    r79858 r80204  
    132132
    133133    if (m_inspectorFrontend)
    134         m_inspectorFrontend->bringToFront();
     134        m_inspectorFrontend->inspector()->bringToFront();
    135135    else {
    136136        m_openingFrontend = true;
     
    143143    if (!m_inspectorFrontend)
    144144        return;
    145     m_inspectorFrontend->disconnectFromBackend();
     145    m_inspectorFrontend->inspector()->disconnectFromBackend();
    146146    disconnectFrontend();
    147147}
  • trunk/Source/WebCore/inspector/InspectorDOMAgent.cpp

    r80141 r80204  
    262262{
    263263    ASSERT(!m_frontend);
    264     m_frontend = frontend;
     264    m_frontend = frontend->dom();
    265265    m_instrumentingAgents->setInspectorDOMAgent(this);
    266266}
  • trunk/Source/WebCore/inspector/InspectorDOMAgent.h

    r80141 r80204  
    3333#include "InjectedScript.h"
    3434#include "InjectedScriptHost.h"
     35#include "InspectorFrontend.h"
    3536#include "InspectorValues.h"
    3637#include "Timer.h"
     
    185186    InstrumentingAgents* m_instrumentingAgents;
    186187    InjectedScriptHost* m_injectedScriptHost;
    187     InspectorFrontend* m_frontend;
     188    InspectorFrontend::DOM* m_frontend;
    188189    DOMListener* m_domListener;
    189190    NodeToIdMap m_documentNodeToIdMap;
  • trunk/Source/WebCore/inspector/InspectorDOMStorageResource.cpp

    r79556 r80204  
    6868{
    6969    ASSERT(!m_frontend);
    70     m_frontend = frontend;
     70    m_frontend = frontend->domstorage();
    7171
    7272    RefPtr<InspectorObject> jsonObject = InspectorObject::create();
     
    7474    jsonObject->setBoolean("isLocalStorage", m_isLocalStorage);
    7575    jsonObject->setNumber("id", m_id);
    76     frontend->addDOMStorage(jsonObject);
     76    m_frontend->addDOMStorage(jsonObject);
    7777}
    7878
  • trunk/Source/WebCore/inspector/InspectorDOMStorageResource.h

    r79556 r80204  
    3535
    3636#include "EventListener.h"
     37#include "InspectorFrontend.h"
    3738
    3839#include <wtf/PassRefPtr.h>
     
    7677        bool m_isLocalStorage;
    7778        RefPtr<Frame> m_frame;
    78         InspectorFrontend* m_frontend;
     79        InspectorFrontend::DOMStorage* m_frontend;
    7980        long m_id;
    8081        bool m_reportingChangesToFrontend;
  • trunk/Source/WebCore/inspector/InspectorDatabaseAgent.cpp

    r79556 r80204  
    6262    virtual ~FrontendProvider() { }
    6363
    64     InspectorFrontend* frontend() { return m_inspectorFrontend; }
     64    InspectorFrontend::Database* frontend() { return m_inspectorFrontend; }
    6565    void clearFrontend() { m_inspectorFrontend = 0; }
    6666private:
    67     FrontendProvider(InspectorFrontend* inspectorFrontend) : m_inspectorFrontend(inspectorFrontend) { }
    68     InspectorFrontend* m_inspectorFrontend;
     67    FrontendProvider(InspectorFrontend* inspectorFrontend) : m_inspectorFrontend(inspectorFrontend->database()) { }
     68    InspectorFrontend::Database* m_inspectorFrontend;
    6969};
    7070
     
    7373long lastTransactionId = 0;
    7474
    75 void reportTransactionFailed(InspectorFrontend* frontend, long transactionId, SQLError* error)
     75void reportTransactionFailed(InspectorFrontend::Database* frontend, long transactionId, SQLError* error)
    7676{
    7777    if (!frontend)
     
    251251    DatabaseResourcesMap::iterator databasesEnd = m_resources.end();
    252252    for (DatabaseResourcesMap::iterator it = m_resources.begin(); it != databasesEnd; ++it)
    253         it->second->bind(frontend);
     253        it->second->bind(m_frontendProvider->frontend());
    254254}
    255255
  • trunk/Source/WebCore/inspector/InspectorDatabaseResource.cpp

    r79556 r80204  
    5555}
    5656
    57 void InspectorDatabaseResource::bind(InspectorFrontend* frontend)
     57void InspectorDatabaseResource::bind(InspectorFrontend::Database* frontend)
    5858{
    5959    RefPtr<InspectorObject> jsonObject = InspectorObject::create();
  • trunk/Source/WebCore/inspector/InspectorDatabaseResource.h

    r79556 r80204  
    3333
    3434#if ENABLE(DATABASE)
     35#include "InspectorFrontend.h"
    3536#include "PlatformString.h"
    3637#include <wtf/PassRefPtr.h>
     
    4647    static PassRefPtr<InspectorDatabaseResource> create(PassRefPtr<Database> database, const String& domain, const String& name, const String& version);
    4748
    48     void bind(InspectorFrontend* frontend);
     49    void bind(InspectorFrontend::Database*);
    4950    Database* database() { return m_database.get(); }
    5051    long id() const { return m_id; }
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp

    r79887 r80204  
    128128void InspectorDebuggerAgent::setFrontend(InspectorFrontend* frontend)
    129129{
    130     m_frontend = frontend;
     130    m_frontend = frontend->debugger();
    131131}
    132132
  • trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h

    r79887 r80204  
    3333#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR)
    3434#include "InjectedScript.h"
     35#include "InspectorFrontend.h"
    3536#include "ScriptBreakpoint.h"
    3637#include "ScriptDebugListener.h"
     
    156157    Page* m_inspectedPage;
    157158    InjectedScriptHost* m_injectedScriptHost;
    158     InspectorFrontend* m_frontend;
     159    InspectorFrontend::Debugger* m_frontend;
    159160    ScriptState* m_pausedScriptState;
    160161    ScriptsMap m_scripts;
  • trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp

    r80135 r80204  
    176176class OutputStream : public ScriptHeapSnapshot::OutputStream {
    177177public:
    178     OutputStream(InspectorFrontend* frontend, unsigned long uid)
     178    OutputStream(InspectorFrontend::Profiler* frontend, unsigned long uid)
    179179        : m_frontend(frontend), m_uid(uid) { }
    180180    void Write(const String& chunk) { m_frontend->addHeapSnapshotChunk(m_uid, chunk); }
    181181    void Close() { m_frontend->finishHeapSnapshot(m_uid); }
    182182private:
    183     InspectorFrontend* m_frontend;
     183    InspectorFrontend::Profiler* m_frontend;
    184184    unsigned long m_uid;
    185185};
     
    284284class HeapSnapshotProgress: public ScriptProfiler::HeapSnapshotProgress {
    285285public:
    286     explicit HeapSnapshotProgress(InspectorFrontend* frontend)
     286    explicit HeapSnapshotProgress(InspectorFrontend::Profiler* frontend)
    287287        : m_frontend(frontend) { }
    288288    void Start(int totalWork)
     
    298298    bool isCanceled() { return false; }
    299299private:
    300     InspectorFrontend* m_frontend;
     300    InspectorFrontend::Profiler* m_frontend;
    301301    int m_totalWork;
    302302};
  • trunk/Source/WebCore/inspector/InspectorProfilerAgent.h

    r80135 r80204  
    3333#if ENABLE(JAVASCRIPT_DEBUGGER) && ENABLE(INSPECTOR)
    3434
     35#include "InspectorFrontend.h"
    3536#include "PlatformString.h"
    3637#include <wtf/Forward.h>
     
    7172    void resetState();
    7273    void resetFrontendProfiles();
    73     void setFrontend(InspectorFrontend* frontend) { m_frontend = frontend; }
     74    void setFrontend(InspectorFrontend* frontend) { m_frontend = frontend->profiler(); }
     75    void clearFrontend() { m_frontend = 0; }
    7476    void startUserInitiatedProfiling();
    7577    void stopUserInitiatedProfiling(bool ignoreProfile = false);
     
    8688
    8789    InspectorAgent* m_inspectorAgent;
    88     InspectorFrontend* m_frontend;
     90    InspectorFrontend::Profiler* m_frontend;
    8991    bool m_enabled;
    9092    bool m_recordingUserInitiatedProfile;
  • trunk/Source/WebCore/inspector/InspectorResourceAgent.cpp

    r79542 r80204  
    520520    : m_page(page)
    521521    , m_state(state)
    522     , m_frontend(frontend)
     522    , m_frontend(frontend->network())
    523523{
    524524    m_state->setBoolean(ResourceAgentState::resourceAgentEnabled, true);
  • trunk/Source/WebCore/inspector/InspectorResourceAgent.h

    r79556 r80204  
    3232#define InspectorResourceAgent_h
    3333
     34#include "InspectorFrontend.h"
    3435#include "PlatformString.h"
    3536
     
    114115    Page* m_page;
    115116    InspectorState* m_state;
    116     InspectorFrontend* m_frontend;
     117    InspectorFrontend::Network* m_frontend;
    117118};
    118119
  • trunk/Source/WebCore/inspector/InspectorTimelineAgent.cpp

    r79539 r80204  
    7878void InspectorTimelineAgent::setFrontend(InspectorFrontend* frontend)
    7979{
    80     m_frontend = frontend;
     80    m_frontend = frontend->timeline();
    8181}
    8282
  • trunk/Source/WebCore/inspector/InspectorTimelineAgent.h

    r79539 r80204  
    3434#if ENABLE(INSPECTOR)
    3535
     36#include "InspectorFrontend.h"
    3637#include "InspectorValues.h"
    3738#include "ScriptGCEvent.h"
     
    173174    InstrumentingAgents* m_instrumentingAgents;
    174175    InspectorState* m_state;
    175     InspectorFrontend* m_frontend;
     176    InspectorFrontend::Timeline* m_frontend;
    176177
    177178    Vector<TimelineRecordEntry> m_recordStack;
  • trunk/Source/WebCore/inspector/front-end/DOMAgent.js

    r79345 r80204  
    501501    {
    502502        WebInspector.updateFocusedNode(nodeId);
     503    },
     504
     505    addNodesToSearchResult: function(nodeIds)
     506    {
     507        WebInspector.panels.elements.addNodesToSearchResult(nodeIds);
    503508    }
    504509}
  • trunk/Source/WebCore/inspector/front-end/inspector.js

    r80135 r80204  
    14091409    this.networkManager.reset();
    14101410    this.reset();
    1411 }
    1412 
    1413 WebInspector.addNodesToSearchResult = function(nodeIds)
    1414 {
    1415     WebInspector.panels.elements.addNodesToSearchResult(nodeIds);
    14161411}
    14171412
Note: See TracChangeset for help on using the changeset viewer.