Changeset 73898 in webkit


Ignore:
Timestamp:
Dec 13, 2010 3:21:05 AM (13 years ago)
Author:
loislo@chromium.org
Message:

2010-12-13 Ilya Tikhonovsky <loislo@chromium.org>

Reviewed by Yury Semikhatsky.

Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.

Debugger and Resources related notification functions of Inspector.idl were
marked as such with help of "domain" attribute. The other changes in js files
are reflecting this change. Some wrappers in WebInspector namespace were dropped,
the others were moved to DebuggerModel class.

https://bugs.webkit.org/show_bug.cgi?id=50906

  • inspector/Inspector.idl:
  • inspector/InspectorDebuggerAgent.cpp: (WebCore::InspectorDebuggerAgent::didParseSource):
  • inspector/InspectorProfilerAgent.cpp: (WebCore::InspectorProfilerAgent::resetState):
  • inspector/front-end/DOMAgent.js: (WebInspector.DOMAgent.prototype.didCommitLoad):
  • inspector/front-end/DebuggerModel.js: (WebInspector.DebuggerModel): (WebInspector.DebuggerModel.prototype.pausedScript): (WebInspector.DebuggerModel.prototype.resumedScript): (WebInspector.DebuggerModel.prototype.attachDebuggerWhenShown): (WebInspector.DebuggerModel.prototype.debuggerWasEnabled): (WebInspector.DebuggerModel.prototype.debuggerWasDisabled): (WebInspector.DebuggerModel.prototype.parsedScriptSource): (WebInspector.DebuggerModel.prototype.failedToParseScriptSource):
  • inspector/front-end/ProfilesPanel.js: (WebInspector.ProfilesPanel): (WebInspector.ProfilesPanel.prototype.addHeapSnapshots): (WebInspector.ProfilesPanel.prototype.updateMainViewWidth): (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
  • inspector/front-end/ResourceManager.js: (WebInspector.ResourceManager): (WebInspector.ResourceManager.prototype._unbindResourceURL): (WebInspector.ResourceManager.prototype.updateDOMStorage): (WebInspector.ResourceManager.prototype.updateApplicationCacheStatus): (WebInspector.ResourceManager.prototype.didGetFileSystemPath): (WebInspector.ResourceManager.prototype.didGetFileSystemError): (WebInspector.ResourceManager.prototype.didGetFileSystemDisabled): (WebInspector.ResourceManager.prototype.updateNetworkState): (WebInspector.ResourceManager.prototype.addDatabase): (WebInspector.ResourceManager.prototype.addDOMStorage):
  • inspector/front-end/inspector.js:

2010-12-13 Ilya Tikhonovsky <loislo@chromium.org>

Reviewed by Yury Semikhatsky.

Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.

Debugger and Resources related notification functions of Inspector.idl were
marked as such with help of "domain" attribute. The other changes in js files
are reflecting this change. Some wrappers in WebInspector namespace were dropped,
the others were moved to DebuggerModel class.

https://bugs.webkit.org/show_bug.cgi?id=50906

  • src/js/Tests.js: (.TestSuite.prototype._waitForScriptPause):

2010-12-13 Ilya Tikhonovsky <loislo@chromium.org>

Reviewed by Yury Semikhatsky.

Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.

Debugger and Resources related notification functions of Inspector.idl were
marked as such with help of "domain" attribute. The other changes in js files
are reflecting this change. Some wrappers in WebInspector namespace were dropped,
the others were moved to DebuggerModel class.

https://bugs.webkit.org/show_bug.cgi?id=50906

  • http/tests/inspector/debugger-test2.js: (initialize_DebuggerTest.InspectorTest.startDebuggerTest.startTest): (initialize_DebuggerTest.InspectorTest.startDebuggerTest): (initialize_DebuggerTest.InspectorTest.completeDebuggerTest.disableDebugger): (initialize_DebuggerTest.InspectorTest.showScriptSource):
  • platform/chromium/test_expectations.txt:
Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r73897 r73898  
     12010-12-13  Ilya Tikhonovsky  <loislo@chromium.org>
     2
     3        Reviewed by Yury Semikhatsky.
     4
     5        Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.
     6
     7        Debugger and Resources related notification functions of Inspector.idl were
     8        marked as such with help of "domain" attribute. The other changes in js files
     9        are reflecting this change. Some wrappers in WebInspector namespace were dropped,
     10        the others were moved to DebuggerModel class.
     11
     12        https://bugs.webkit.org/show_bug.cgi?id=50906
     13
     14        * http/tests/inspector/debugger-test2.js:
     15        (initialize_DebuggerTest.InspectorTest.startDebuggerTest.startTest):
     16        (initialize_DebuggerTest.InspectorTest.startDebuggerTest):
     17        (initialize_DebuggerTest.InspectorTest.completeDebuggerTest.disableDebugger):
     18        (initialize_DebuggerTest.InspectorTest.showScriptSource):
     19        * platform/chromium/test_expectations.txt:
     20
    1212010-12-13  Pavel Feldman  <pfeldman@chromium.org>
    222
  • trunk/LayoutTests/http/tests/inspector/debugger-test2.js

    r66730 r73898  
    88        startTest();
    99    else {
    10         InspectorTest._addSniffer(WebInspector, "debuggerWasEnabled", startTest);
     10        InspectorTest._addSniffer(WebInspector.debuggerModel, "debuggerWasEnabled", startTest);
    1111        WebInspector.panels.scripts._toggleDebugging(false);
    1212    }
     
    1515    {
    1616        InspectorTest.addResult("Debugger was enabled.");
    17         InspectorTest._addSniffer(WebInspector, "pausedScript", InspectorTest._pausedScript, true);
    18         InspectorTest._addSniffer(WebInspector, "resumedScript", InspectorTest._resumedScript, true);
     17        InspectorTest._addSniffer(WebInspector.debuggerModel, "pausedScript", InspectorTest._pausedScript, true);
     18        InspectorTest._addSniffer(WebInspector.debuggerModel, "resumedScript", InspectorTest._resumedScript, true);
    1919        callback();
    2020    }
     
    3535            completeTest();
    3636        else {
    37             InspectorTest._addSniffer(WebInspector, "debuggerWasDisabled", completeTest);
     37            InspectorTest._addSniffer(WebInspector.debuggerModel, "debuggerWasDisabled", completeTest);
    3838            scriptsPanel._toggleDebugging(false);
    3939        }
     
    117117        InspectorTest._showScriptSource(scriptName, callback);
    118118    else
    119         InspectorTest._addSniffer(WebInspector, "parsedScriptSource", InspectorTest.showScriptSource.bind(InspectorTest, scriptName, callback));
     119        InspectorTest._addSniffer(WebInspector.debuggerModel, "parsedScriptSource", InspectorTest.showScriptSource.bind(InspectorTest, scriptName, callback));
    120120};
    121121
  • trunk/WebCore/ChangeLog

    r73894 r73898  
     12010-12-13  Ilya Tikhonovsky  <loislo@chromium.org>
     2
     3        Reviewed by Yury Semikhatsky.
     4
     5        Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.
     6
     7        Debugger and Resources related notification functions of Inspector.idl were
     8        marked as such with help of "domain" attribute. The other changes in js files
     9        are reflecting this change. Some wrappers in WebInspector namespace were dropped,
     10        the others were moved to DebuggerModel class.
     11
     12        https://bugs.webkit.org/show_bug.cgi?id=50906
     13
     14        * inspector/Inspector.idl:
     15        * inspector/InspectorDebuggerAgent.cpp:
     16        (WebCore::InspectorDebuggerAgent::didParseSource):
     17        * inspector/InspectorProfilerAgent.cpp:
     18        (WebCore::InspectorProfilerAgent::resetState):
     19        * inspector/front-end/DOMAgent.js:
     20        (WebInspector.DOMAgent.prototype.didCommitLoad):
     21        * inspector/front-end/DebuggerModel.js:
     22        (WebInspector.DebuggerModel):
     23        (WebInspector.DebuggerModel.prototype.pausedScript):
     24        (WebInspector.DebuggerModel.prototype.resumedScript):
     25        (WebInspector.DebuggerModel.prototype.attachDebuggerWhenShown):
     26        (WebInspector.DebuggerModel.prototype.debuggerWasEnabled):
     27        (WebInspector.DebuggerModel.prototype.debuggerWasDisabled):
     28        (WebInspector.DebuggerModel.prototype.parsedScriptSource):
     29        (WebInspector.DebuggerModel.prototype.failedToParseScriptSource):
     30        * inspector/front-end/ProfilesPanel.js:
     31        (WebInspector.ProfilesPanel):
     32        (WebInspector.ProfilesPanel.prototype.addHeapSnapshots):
     33        (WebInspector.ProfilesPanel.prototype.updateMainViewWidth):
     34        (WebInspector.ProfilesPanel.prototype.setRecordingProfile):
     35        * inspector/front-end/ResourceManager.js:
     36        (WebInspector.ResourceManager):
     37        (WebInspector.ResourceManager.prototype._unbindResourceURL):
     38        (WebInspector.ResourceManager.prototype.updateDOMStorage):
     39        (WebInspector.ResourceManager.prototype.updateApplicationCacheStatus):
     40        (WebInspector.ResourceManager.prototype.didGetFileSystemPath):
     41        (WebInspector.ResourceManager.prototype.didGetFileSystemError):
     42        (WebInspector.ResourceManager.prototype.didGetFileSystemDisabled):
     43        (WebInspector.ResourceManager.prototype.updateNetworkState):
     44        (WebInspector.ResourceManager.prototype.addDatabase):
     45        (WebInspector.ResourceManager.prototype.addDOMStorage):
     46        * inspector/front-end/inspector.js:
     47
    1482010-12-13  Zoltan Herczeg  <zherczeg@webkit.org>
    249
  • trunk/WebCore/inspector/Inspector.idl

    r73726 r73898  
    3434    interface [Conditional=INSPECTOR] Inspector {
    3535        [notify, domain=Timeline] void addRecordToTimeline(out Object record);
    36         [notify] void addNodesToSearchResult(out Array nodeIds);
     36        [notify, domain=Inspector] void addNodesToSearchResult(out Array nodeIds);
    3737        [notify, domain=DOM] void attributesUpdated(out long id, out Array attributes);
    38         [notify] void bringToFront();
     38        [notify, domain=Inspector] void bringToFront();
    3939        [notify, domain=DOM] void characterDataModified(out long id, out String newValue);
    4040        [notify, domain=DOM] void childNodeCountUpdated(out long id, out int newValue);
    4141        [notify, domain=DOM] void childNodeInserted(out long parentId, out long prevId, out Object node);
    4242        [notify, domain=DOM] void childNodeRemoved(out long parentId, out long id);
    43         [notify] void didCommitLoad();
    44         [notify] void evaluateForTestInFrontend(out long testCallId, out String script);
    45         [notify] void disconnectFromBackend();
    46         [notify] void domContentEventFired(out double time);
    47         [notify] void inspectedURLChanged(out String url);
    48         [notify] void loadEventFired(out double time);
    49         [notify] void reset();
    50         [notify] void resetProfilesPanel();
     43        [notify, domain=DOM] void didCommitLoad();
     44        [notify, domain=Inspector] void evaluateForTestInFrontend(out long testCallId, out String script);
     45        [notify, domain=Inspector] void disconnectFromBackend();
     46        [notify, domain=Inspector] void domContentEventFired(out double time);
     47        [notify, domain=Inspector] void inspectedURLChanged(out String url);
     48        [notify, domain=Inspector] void loadEventFired(out double time);
     49        [notify, domain=Inspector] void reset();
     50        [notify, domain=Profiler] void resetProfiles();
    5151        [notify, domain=DOM] void setChildNodes(out long parentId, out Array nodes);
    5252        [notify, domain=DOM] void setDetachedRoot(out Object root);
    5353        [notify, domain=DOM] void setDocument(out Value root);
    54         [notify] void showPanel(out String panel);
     54        [notify, domain=Inspector] void showPanel(out String panel);
    5555        [notify, domain=Timeline] void timelineProfilerWasStarted();
    5656        [notify, domain=Timeline] void timelineProfilerWasStopped();
     
    5858
    5959#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
    60         [notify] void addProfileHeader(out Object header);
    61         [notify] void addHeapSnapshotChunk(out unsigned long uid, out String chunk);
    62         [notify] void attachDebuggerWhenShown();
    63         [notify] void debuggerWasEnabled();
    64         [notify] void debuggerWasDisabled();
    65         [notify] void failedToParseScriptSource(out String url, out String data, out int firstLine, out int errorLine, out String errorMessage);
    66         [notify] void finishHeapSnapshot(out unsigned long uid);
    67         [notify] void parsedScriptSource(out String sourceID, out String url, out String data, out int firstLine, out int scriptWorldType);
    68         [notify] void pausedScript(out Object details);
    69         [notify] void profilerWasEnabled();
    70         [notify] void profilerWasDisabled();
    71         [notify] void restoredBreakpoint(out String sourceID, out String url, out int line, out boolean enabled, out String condition);
    72         [notify] void resumedScript();
    73         [notify] void setRecordingProfile(out boolean isProfiling);
     60        [notify, domain=Profiler] void addProfileHeader(out Object header);
     61        [notify, domain=Profiler] void addHeapSnapshotChunk(out unsigned long uid, out String chunk);
     62        [notify, domain=Debugger] void attachDebuggerWhenShown();
     63        [notify, domain=Debugger] void debuggerWasEnabled();
     64        [notify, domain=Debugger] void debuggerWasDisabled();
     65        [notify, domain=Debugger] void failedToParseScriptSource(out String url, out String data, out int firstLine, out int errorLine, out String errorMessage);
     66        [notify, domain=Profiler] void finishHeapSnapshot(out unsigned long uid);
     67        [notify, domain=Debugger] void parsedScriptSource(out String sourceID, out String url, out String data, out int firstLine, out int scriptWorldType);
     68        [notify, domain=Debugger] void pausedScript(out Object details);
     69        [notify, domain=Profiler] void profilerWasEnabled();
     70        [notify, domain=Profiler] void profilerWasDisabled();
     71        [notify, domain=Debugger] void breakpointRestored(out String sourceID, out String url, out int line, out boolean enabled, out String condition);
     72        [notify, domain=Debugger] void resumedScript();
     73        [notify, domain=Profiler] void setRecordingProfile(out boolean isProfiling);
    7474        [notify] void updatePauseOnExceptionsState(out long state);
    7575#endif
     
    7979#endif
    8080#if defined(ENABLE_DOM_STORAGE) && ENABLE_DOM_STORAGE
    81         [notify] void addDOMStorage(out Object storage);
    82         [notify] void updateDOMStorage(out int storageId);
    83         [notify] void selectDOMStorage(out int storageId);
     81        [notify, domain=Resources] void addDOMStorage(out Object storage);
     82        [notify, domain=Resources] void updateDOMStorage(out int storageId);
     83        [notify, domain=Resources] void selectDOMStorage(out int storageId);
    8484#endif
    8585#if defined(ENABLE_OFFLINE_WEB_APPLICATIONS) && ENABLE_OFFLINE_WEB_APPLICATIONS
     
    108108        [domain=Resources] void cachedResources(out Object resources);
    109109        [domain=Resources] void resourceContent(in unsigned long frameId, in String url, in boolean base64Encode, out String content);
    110         [notify] void identifierForInitialRequest(out long identifier, out String url, out Object loader, out Value callStack);
    111         [notify] void willSendRequest(out long identifier, out double time, out Object request, out Object redirectResponse);
    112         [notify] void markResourceAsCached(out long identifier);
    113         [notify] void didReceiveResponse(out long identifier, out double time, out String resourceType, out Object response);
    114         [notify] void didReceiveContentLength(out long identifier, out double time, out long lengthReceived);
    115         [notify] void didFinishLoading(out long identifier, out double finishTime);
    116         [notify] void didFailLoading(out long identifier, out double time, out String localizedDescription);
    117         [notify] void didLoadResourceFromMemoryCache(out double time, out Object resource);
    118         [notify] void setInitialContent(out long identifier, out String sourceString, out String type);
    119         [notify] void didCommitLoadForFrame(out Object frame, out Object loader);
    120         [notify] void frameDetachedFromParent(out unsigned long frameId);
    121 
    122         [notify] void didCreateWebSocket(out unsigned long identifier, out String requestURL);
    123         [notify] void willSendWebSocketHandshakeRequest(out unsigned long identifier, out double time, out Object request);
    124         [notify] void didReceiveWebSocketHandshakeResponse(out unsigned long identifier, out double time, out Object response);
    125         [notify] void didCloseWebSocket(out unsigned long identifier, out double time);
     110        [notify, domain=Resources] void identifierForInitialRequest(out long identifier, out String url, out Object loader, out Value callStack);
     111        [notify, domain=Resources] void willSendRequest(out long identifier, out double time, out Object request, out Object redirectResponse);
     112        [notify, domain=Resources] void markResourceAsCached(out long identifier);
     113        [notify, domain=Resources] void didReceiveResponse(out long identifier, out double time, out String resourceType, out Object response);
     114        [notify, domain=Resources] void didReceiveContentLength(out long identifier, out double time, out long lengthReceived);
     115        [notify, domain=Resources] void didFinishLoading(out long identifier, out double finishTime);
     116        [notify, domain=Resources] void didFailLoading(out long identifier, out double time, out String localizedDescription);
     117        [notify, domain=Resources] void didLoadResourceFromMemoryCache(out double time, out Object resource);
     118        [notify, domain=Resources] void setInitialContent(out long identifier, out String sourceString, out String type);
     119        [notify, domain=Resources] void didCommitLoadForFrame(out Object frame, out Object loader);
     120        [notify, domain=Resources] void frameDetachedFromParent(out unsigned long frameId);
     121
     122        [notify, domain=Resources] void didCreateWebSocket(out unsigned long identifier, out String requestURL);
     123        [notify, domain=Resources] void willSendWebSocketHandshakeRequest(out unsigned long identifier, out double time, out Object request);
     124        [notify, domain=Resources] void didReceiveWebSocketHandshakeResponse(out unsigned long identifier, out double time, out Object response);
     125        [notify, domain=Resources] void didCloseWebSocket(out unsigned long identifier, out double time);
    126126
    127127#if defined(ENABLE_JAVASCRIPT_DEBUGGER) && ENABLE_JAVASCRIPT_DEBUGGER
  • trunk/WebCore/inspector/InspectorDebuggerAgent.cpp

    r72666 r73898  
    293293            if (!success)
    294294                continue;
    295             m_frontend->restoredBreakpoint(sourceID, url, actualLineNumber, breakpointIt->second.enabled, breakpointIt->second.condition);
     295            m_frontend->breakpointRestored(sourceID, url, actualLineNumber, breakpointIt->second.enabled, breakpointIt->second.condition);
    296296            String breakpointId = formatBreakpointId(sourceID, actualLineNumber);
    297297            m_breakpointsMapping.set(breakpointId, lineNumber);
  • trunk/WebCore/inspector/InspectorProfilerAgent.cpp

    r72843 r73898  
    212212    m_nextUserInitiatedHeapSnapshotNumber = 1;
    213213    if (m_frontend)
    214         m_frontend->resetProfilesPanel();
     214        m_frontend->resetProfiles();
    215215}
    216216
  • trunk/WebCore/inspector/front-end/DOMAgent.js

    r73511 r73898  
    374374    },
    375375
     376    didCommitLoad: function()
     377    {
     378        // Cleanup elements panel early on inspected page refresh.
     379        this.setDocument(null);
     380    },
     381
    376382    setDocument: function(payload)
    377383    {
  • trunk/WebCore/inspector/front-end/DebuggerModel.js

    r73730 r73898  
    3232{
    3333    this._breakpoints = {};
     34    InspectorBackend.registerDomainDispatcher("Debugger", this);
    3435}
    3536
     
    128129    },
    129130
    130     debuggerPaused: function(details)
     131    pausedScript: function(details)
    131132    {
    132133        this.dispatchEventToListeners("debugger-paused", details.callFrames);
     
    148149    },
    149150
    150     debuggerResumed: function()
     151    resumedScript: function()
    151152    {
    152153        this.dispatchEventToListeners("debugger-resumed");
     
    156157        this._lastHitBreakpoint.hit = false;
    157158        delete this._lastHitBreakpoint;
     159    },
     160
     161    attachDebuggerWhenShown: function()
     162    {
     163        WebInspector.panels.scripts.attachDebuggerWhenShown();
     164    },
     165
     166    debuggerWasEnabled: function()
     167    {
     168        WebInspector.panels.scripts.debuggerWasEnabled();
     169    },
     170
     171    debuggerWasDisabled: function()
     172    {
     173        WebInspector.panels.scripts.debuggerWasDisabled();
     174    },
     175
     176    parsedScriptSource: function(sourceID, sourceURL, source, startingLine, scriptWorldType)
     177    {
     178        WebInspector.panels.scripts.addScript(sourceID, sourceURL, source, startingLine, undefined, undefined, scriptWorldType);
     179    },
     180
     181    failedToParseScriptSource: function(sourceURL, source, startingLine, errorLine, errorMessage)
     182    {
     183        WebInspector.panels.scripts.addScript(null, sourceURL, source, startingLine, errorLine, errorMessage);
    158184    }
    159185}
  • trunk/WebCore/inspector/front-end/ProfilesPanel.js

    r73229 r73898  
    125125    this._profilerEnabled = Preferences.profilerAlwaysEnabled;
    126126    this._reset();
     127    InspectorBackend.registerDomainDispatcher("Profiler", this);
    127128}
    128129
     
    598599            for (var i = 0; i < profileHeadersLength; ++i)
    599600                if (!this.hasProfile(profileHeaders[i]))
    600                     WebInspector.addProfileHeader(profileHeaders[i]);
     601                    WebInspector.panels.profiles.addProfileHeader(profileHeaders[i]);
    601602        }
    602603
     
    612613        this.profileViewStatusBarItemsContainer.style.left = Math.max(155, width) + "px";
    613614        this.resize();
     615    },
     616
     617    setRecordingProfile: function(isProfiling)
     618    {
     619        this.getProfileType(WebInspector.CPUProfileType.TypeId).setRecordingProfile(isProfiling);
     620        if (this.hasTemporaryProfile(WebInspector.CPUProfileType.TypeId) !== isProfiling) {
     621            if (!this._temporaryRecordingProfile) {
     622                this._temporaryRecordingProfile = {
     623                    typeId: WebInspector.CPUProfileType.TypeId,
     624                    title: WebInspector.UIString("Recording"),
     625                    uid: -1,
     626                    isTemporary: true
     627                };
     628            }
     629            if (isProfiling)
     630                this.addProfileHeader(this._temporaryRecordingProfile);
     631            else
     632                this.removeProfileHeader(this._temporaryRecordingProfile);
     633        }
     634        this.updateProfileTypeButtons();
    614635    }
    615636}
  • trunk/WebCore/inspector/front-end/ResourceManager.js

    r73607 r73898  
    3131WebInspector.ResourceManager = function()
    3232{
    33     this._registerNotifyHandlers(
    34         "identifierForInitialRequest",
    35         "willSendRequest",
    36         "markResourceAsCached",
    37         "didReceiveResponse",
    38         "didReceiveContentLength",
    39         "didFinishLoading",
    40         "didFailLoading",
    41         "didLoadResourceFromMemoryCache",
    42         "setInitialContent",
    43         "didCommitLoadForFrame",
    44         "frameDetachedFromParent",
    45         "didCreateWebSocket",
    46         "willSendWebSocketHandshakeRequest",
    47         "didReceiveWebSocketHandshakeResponse",
    48         "didCloseWebSocket");
    49 
    5033    this._resourcesById = {};
    5134    this._resourcesByURL = {};
    5235    this._resourceTreeModel = new WebInspector.ResourceTreeModel();
    5336    InspectorBackend.cachedResources(this._processCachedResources.bind(this));
     37    InspectorBackend.registerDomainDispatcher("Resources", this);
    5438}
    5539
    5640WebInspector.ResourceManager.prototype = {
    57     _registerNotifyHandlers: function()
    58     {
    59         for (var i = 0; i < arguments.length; ++i)
    60             WebInspector[arguments[i]] = this[arguments[i]].bind(this);
    61     },
    62 
    6341    identifierForInitialRequest: function(identifier, url, loader, callStack)
    6442    {
     
    429407
    430408        delete this._resourcesByURL[resource.url];
     409    },
     410
     411    updateDOMStorage: function(storageId)
     412    {
     413        WebInspector.panels.resources.updateDOMStorage(storageId);
     414    },
     415
     416    updateApplicationCacheStatus: function(status)
     417    {
     418        WebInspector.panels.resources.updateApplicationCacheStatus(status);
     419    },
     420
     421    didGetFileSystemPath: function(root, type, origin)
     422    {
     423        WebInspector.panels.resources.updateFileSystemPath(root, type, origin);
     424    },
     425
     426    didGetFileSystemError: function(type, origin)
     427    {
     428        WebInspector.panels.resources.updateFileSystemError(type, origin);
     429    },
     430
     431    didGetFileSystemDisabled: function()
     432    {
     433        WebInspector.panels.resources.setFileSystemDisabled();
     434    },
     435
     436    updateNetworkState: function(isNowOnline)
     437    {
     438        WebInspector.panels.resources.updateNetworkState(isNowOnline);
     439    },
     440
     441    addDatabase: function(payload)
     442    {
     443        if (!WebInspector.panels.resources)
     444            return;
     445        var database = new WebInspector.Database(
     446            payload.id,
     447            payload.domain,
     448            payload.name,
     449            payload.version);
     450        WebInspector.panels.resources.addDatabase(database);
     451    },
     452
     453    addDOMStorage: function(payload)
     454    {
     455        if (!WebInspector.panels.resources)
     456            return;
     457        var domStorage = new WebInspector.DOMStorage(
     458            payload.id,
     459            payload.host,
     460            payload.isLocalStorage);
     461        WebInspector.panels.resources.addDOMStorage(domStorage);
    431462    }
    432463}
  • trunk/WebCore/inspector/front-end/inspector.js

    r73607 r73898  
    12091209}
    12101210
    1211 WebInspector.addDatabase = function(payload)
    1212 {
    1213     if (!this.panels.resources)
    1214         return;
    1215     var database = new WebInspector.Database(
    1216         payload.id,
    1217         payload.domain,
    1218         payload.name,
    1219         payload.version);
    1220     this.panels.resources.addDatabase(database);
    1221 }
    1222 
    1223 WebInspector.addDOMStorage = function(payload)
    1224 {
    1225     if (!this.panels.resources)
    1226         return;
    1227     var domStorage = new WebInspector.DOMStorage(
    1228         payload.id,
    1229         payload.host,
    1230         payload.isLocalStorage);
    1231     this.panels.resources.addDOMStorage(domStorage);
    1232 }
    1233 
    1234 WebInspector.updateDOMStorage = function(storageId)
    1235 {
    1236     this.panels.resources.updateDOMStorage(storageId);
    1237 }
    1238 
    1239 WebInspector.updateApplicationCacheStatus = function(status)
    1240 {
    1241     this.panels.resources.updateApplicationCacheStatus(status);
    1242 }
    1243 
    1244 WebInspector.didGetFileSystemPath = function(root, type, origin)
    1245 {
    1246     this.panels.resources.updateFileSystemPath(root, type, origin);
    1247 }
    1248 
    1249 WebInspector.didGetFileSystemError = function(type, origin)
    1250 {
    1251     this.panels.resources.updateFileSystemError(type, origin);
    1252 }
    1253 
    1254 WebInspector.didGetFileSystemDisabled = function()
    1255 {
    1256     this.panels.resources.setFileSystemDisabled();
    1257 }
    1258 
    1259 WebInspector.updateNetworkState = function(isNowOnline)
    1260 {
    1261     this.panels.resources.updateNetworkState(isNowOnline);
    1262 }
    1263 
    12641211WebInspector.searchingForNodeWasEnabled = function()
    12651212{
     
    12701217{
    12711218    this.panels.elements.searchingForNodeWasDisabled();
    1272 }
    1273 
    1274 WebInspector.attachDebuggerWhenShown = function()
    1275 {
    1276     this.panels.scripts.attachDebuggerWhenShown();
    1277 }
    1278 
    1279 WebInspector.debuggerWasEnabled = function()
    1280 {
    1281     this.panels.scripts.debuggerWasEnabled();
    1282 }
    1283 
    1284 WebInspector.debuggerWasDisabled = function()
    1285 {
    1286     this.panels.scripts.debuggerWasDisabled();
    1287 }
    1288 
    1289 WebInspector.profilerWasEnabled = function()
    1290 {
    1291     this.panels.profiles.profilerWasEnabled();
    1292 }
    1293 
    1294 WebInspector.profilerWasDisabled = function()
    1295 {
    1296     this.panels.profiles.profilerWasDisabled();
    1297 }
    1298 
    1299 WebInspector.parsedScriptSource = function(sourceID, sourceURL, source, startingLine, scriptWorldType)
    1300 {
    1301     this.panels.scripts.addScript(sourceID, sourceURL, source, startingLine, undefined, undefined, scriptWorldType);
    1302 }
    1303 
    1304 WebInspector.restoredBreakpoint = function(sourceID, sourceURL, line, enabled, condition)
    1305 {
    1306     this.debuggerModel.breakpointRestored(sourceID, sourceURL, line, enabled, condition);
    1307 }
    1308 
    1309 WebInspector.failedToParseScriptSource = function(sourceURL, source, startingLine, errorLine, errorMessage)
    1310 {
    1311     this.panels.scripts.addScript(null, sourceURL, source, startingLine, errorLine, errorMessage);
    1312 }
    1313 
    1314 WebInspector.pausedScript = function(details)
    1315 {
    1316     this.debuggerModel.debuggerPaused(details);
    1317 }
    1318 
    1319 WebInspector.resumedScript = function()
    1320 {
    1321     this.debuggerModel.debuggerResumed();
    13221219}
    13231220
     
    13401237
    13411238    this.breakpointManager.restoreBreakpoints();
    1342 }
    1343 
    1344 WebInspector.resetProfilesPanel = function()
    1345 {
    1346     if (WebInspector.panels.profiles)
    1347         WebInspector.panels.profiles.resetProfiles();
    13481239}
    13491240
     
    13621253        this._breakpointsRestored = true;
    13631254    }
    1364 }
    1365 
    1366 WebInspector.didCommitLoad = function()
    1367 {
    1368     // Cleanup elements panel early on inspected page refresh.
    1369     WebInspector.domAgent.setDocument(null);
    13701255}
    13711256
     
    14801365    // log the message
    14811366    logMessage(message);
    1482 }
    1483 
    1484 WebInspector.addProfileHeader = function(profile)
    1485 {
    1486     this.panels.profiles.addProfileHeader(profile);
    1487 }
    1488 
    1489 WebInspector.setRecordingProfile = function(isProfiling)
    1490 {
    1491     this.panels.profiles.getProfileType(WebInspector.CPUProfileType.TypeId).setRecordingProfile(isProfiling);
    1492     if (this.panels.profiles.hasTemporaryProfile(WebInspector.CPUProfileType.TypeId) !== isProfiling) {
    1493         if (!this._temporaryRecordingProfile) {
    1494             this._temporaryRecordingProfile = {
    1495                 typeId: WebInspector.CPUProfileType.TypeId,
    1496                 title: WebInspector.UIString("Recording…"),
    1497                 uid: -1,
    1498                 isTemporary: true
    1499             };
    1500         }
    1501         if (isProfiling)
    1502             this.panels.profiles.addProfileHeader(this._temporaryRecordingProfile);
    1503         else
    1504             this.panels.profiles.removeProfileHeader(this._temporaryRecordingProfile);
    1505     }
    1506     this.panels.profiles.updateProfileTypeButtons();
    1507 }
    1508 
    1509 WebInspector.addHeapSnapshotChunk = function(uid, chunk)
    1510 {
    1511     this.panels.profiles.addHeapSnapshotChunk(uid, chunk);
    1512 }
    1513 
    1514 WebInspector.finishHeapSnapshot = function(uid)
    1515 {
    1516     this.panels.profiles.finishHeapSnapshot(uid);
    15171367}
    15181368
  • trunk/WebKit/chromium/ChangeLog

    r73886 r73898  
     12010-12-13  Ilya Tikhonovsky  <loislo@chromium.org>
     2
     3        Reviewed by Yury Semikhatsky.
     4
     5        Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.
     6
     7        Debugger and Resources related notification functions of Inspector.idl were
     8        marked as such with help of "domain" attribute. The other changes in js files
     9        are reflecting this change. Some wrappers in WebInspector namespace were dropped,
     10        the others were moved to DebuggerModel class.
     11
     12        https://bugs.webkit.org/show_bug.cgi?id=50906
     13
     14        * src/js/Tests.js:
     15        (.TestSuite.prototype._waitForScriptPause):
     16
    1172010-10-28  MORITA Hajime  <morrita@google.com>
    218
  • trunk/WebKit/chromium/src/js/Tests.js

    r70879 r73898  
    731731    // Wait until script is paused.
    732732    test.addSniffer(
    733         WebInspector,
     733        WebInspector.debuggerModel,
    734734        "pausedScript",
    735735        function(details) {
     
    853853    devtools.tools.evaluateJavaScript("fib(10)");
    854854
    855     this.addSniffer(WebInspector, "pausedScript",
     855    this.addSniffer(WebInspector.debuggerModel, "pausedScript",
    856856        function() {
    857857            test.releaseControl();
Note: See TracChangeset for help on using the changeset viewer.