2011-02-16 Ilya Tikhonovsky <loislo@chromium.org>
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Feb 2011 17:17:58 +0000 (17:17 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Feb 2011 17:17:58 +0000 (17:17 +0000)
        Reviewed by Yury Semikhatsky.

        Web Inspector: split all the functions of Inspector backend API by domain.
        https://bugs.webkit.org/show_bug.cgi?id=54558

        We have a number of functions from different domains in single instance of InspectorBackend.
        It'd be better to split the functions by their domains.
        As example 'evaluate' will be moved from InspectorBackend to RuntimeAgent container.

        * http/tests/inspector/console-xhr-logging.html:
        * http/tests/inspector/extensions-test.js:
        (initialize_ExtensionsTest.InspectorTest.runExtensionTests):
        * http/tests/inspector/inspector-test.js:
        (initialize_InspectorTest.InspectorTest.completeTest):
        (initialize_InspectorTest.InspectorTest.evaluateInPage):
        (initialize_InspectorTest.InspectorTest.reloadPage):
        * inspector/console/console-dir-global.html:
        * inspector/debugger/debugger-autocontinue-on-syntax-error.html:
        * inspector/debugger/debugger-pause-on-exception.html:
        * inspector/elements/elements-panel-search.html:
        * inspector/report-API-errors-expected.txt:
        * inspector/report-API-errors.html:
        * inspector/report-protocol-errors.html:
        * inspector/styles/styles-new-API.html:
        * inspector/styles/styles-source-offsets.html:
        * inspector/timeline/timeline-network-resource.html:
        * inspector/timeline/timeline-script-tag-1.html:
        * inspector/timeline/timeline-script-tag-2.html:
        * inspector/timeline/timeline-test.js:
        (initialize_Timeline.InspectorTest.performActionsAndPrint.step2):
        * inspector/timeline/timeline-trivial.html:
2011-02-16  Ilya Tikhonovsky  <loislo@chromium.org>

        Reviewed by Yury Semikhatsky.

        Web Inspector: split all the functions of Inspector backend API by domain.
        https://bugs.webkit.org/show_bug.cgi?id=54558

        We have a number of functions from different domains in single instance of InspectorBackend.
        It'd be better to split the functions by their domains.
        As example 'evaluate' will be moved from InspectorBackend to RuntimeAgent container.

        * inspector/CodeGeneratorInspector.pm:
        * inspector/front-end/AuditRules.js:
        (WebInspector.AuditRules.evaluateInTargetWindow):
        (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
        * inspector/front-end/AuditsPanel.js:
        (WebInspector.AuditsPanel.prototype._reloadResources):
        * inspector/front-end/BreakpointManager.js:
        (WebInspector.BreakpointManager.prototype._projectChanged):
        (WebInspector.BreakpointManager.prototype.restoreDOMBreakpoints):
        (WebInspector.BreakpointManager.prototype._saveBreakpoints):
        (WebInspector.DOMBreakpoint.prototype._enable):
        (WebInspector.DOMBreakpoint.prototype._disable):
        (WebInspector.EventListenerBreakpoint.prototype._enable):
        (WebInspector.EventListenerBreakpoint.prototype._disable):
        (WebInspector.XHRBreakpoint.prototype._enable):
        (WebInspector.XHRBreakpoint.prototype._disable):
        * inspector/front-end/CSSStyleModel.js:
        (WebInspector.CSSStyleModel.prototype.getStylesAsync):
        (WebInspector.CSSStyleModel.prototype.getComputedStyleAsync):
        (WebInspector.CSSStyleModel.prototype.getInlineStyleAsync):
        (WebInspector.CSSStyleModel.prototype.setRuleSelector.callback):
        (WebInspector.CSSStyleModel.prototype.setRuleSelector):
        (WebInspector.CSSStyleModel.prototype.addRule.callback):
        (WebInspector.CSSStyleModel.prototype.addRule):
        (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
        (WebInspector.CSSStyleModel.prototype._onRevert):
        (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
        (WebInspector.CSSProperty.prototype.setText):
        (WebInspector.CSSProperty.prototype.setDisabled):
        (WebInspector.CSSStyleSheet.createForId):
        (WebInspector.CSSStyleSheet.prototype.setText):
        * inspector/front-end/ConsoleView.js:
        (WebInspector.ConsoleView.prototype.requestClearMessages):
        (WebInspector.ConsoleView.prototype.completions):
        (WebInspector.ConsoleView.prototype._handleContextMenuEvent.itemAction):
        (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
        (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
        * inspector/front-end/CookieItemsView.js:
        (WebInspector.CookieItemsView.prototype._deleteCookie):
        * inspector/front-end/DOMAgent.js:
        (WebInspector.DOMAgent.prototype.getChildNodesAsync):
        (WebInspector.DOMAgent.prototype.setAttributeAsync):
        (WebInspector.DOMAgent.prototype.removeAttributeAsync):
        (WebInspector.DOMAgent.prototype.setTextNodeValueAsync):
        (WebInspector.ApplicationCacheDispatcher.getApplicationCachesAsync):
        (WebInspector.Cookies.getCookiesAsync):
        (WebInspector.EventListeners.getEventListenersForNodeAsync):
        * inspector/front-end/DOMStorage.js:
        (WebInspector.DOMStorage.prototype.getEntries):
        (WebInspector.DOMStorage.prototype.setItem):
        (WebInspector.DOMStorage.prototype.removeItem):
        * inspector/front-end/Database.js:
        (WebInspector.Database.prototype.getTableNames):
        (WebInspector.Database.prototype.executeSql):
        * inspector/front-end/DebuggerModel.js:
        (WebInspector.DebuggerModel.prototype.enableDebugger):
        (WebInspector.DebuggerModel.prototype.disableDebugger):
        (WebInspector.DebuggerModel.prototype.continueToLocation):
        (WebInspector.DebuggerModel.prototype.setBreakpoint):
        (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
        (WebInspector.DebuggerModel.prototype.removeBreakpoint):
        (WebInspector.DebuggerModel.prototype.editScriptSource):
        * inspector/front-end/ElementsPanel.js:
        (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
        (WebInspector.ElementsPanel):
        (WebInspector.ElementsPanel.prototype.setDocument):
        (WebInspector.ElementsPanel.prototype.searchCanceled):
        (WebInspector.ElementsPanel.prototype.performSearch):
        (WebInspector.ElementsPanel.prototype.handleCopyEvent):
        (WebInspector.ElementsPanel.prototype.setSearchingForNode):
        * inspector/front-end/ElementsTreeOutline.js:
        (WebInspector.ElementsTreeElement.prototype._createTooltipForNode):
        (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted):
        ():
        * inspector/front-end/ExtensionPanel.js:
        (WebInspector.ExtensionWatchSidebarPane.prototype.setExpression):
        * inspector/front-end/ExtensionServer.js:
        (WebInspector.ExtensionServer.prototype._onAddRequestHeaders):
        (WebInspector.ExtensionServer.prototype._onReload):
        (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
        * inspector/front-end/HeapSnapshotView.js:
        (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
        * inspector/front-end/NetworkManager.js:
        (WebInspector.NetworkManager):
        (WebInspector.NetworkManager.prototype.reset):
        (WebInspector.NetworkManager.prototype.requestContent):
        * inspector/front-end/NetworkPanel.js:
        (WebInspector.NetworkDataGridNode.prototype._openInNewTab):
        * inspector/front-end/ProfileView.js:
        (WebInspector.CPUProfileView):
        (WebInspector.CPUProfileType.prototype.buttonClicked):
        * inspector/front-end/ProfilesPanel.js:
        (WebInspector.ProfilesPanel.prototype._clearProfiles):
        (WebInspector.ProfilesPanel.prototype._removeProfileHeader):
        (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot):
        (WebInspector.ProfilesPanel.prototype._toggleProfiling):
        (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
        * inspector/front-end/PropertiesSidebarPane.js:
        (WebInspector.PropertiesSidebarPane.prototype.update):
        * inspector/front-end/RemoteObject.js:
        (WebInspector.RemoteObject.resolveNode):
        (WebInspector.RemoteObject.prototype.getProperties):
        (WebInspector.RemoteObject.prototype.setPropertyValue):
        (WebInspector.RemoteObject.prototype.pushNodeToFrontend):
        * inspector/front-end/ResourcesPanel.js:
        (WebInspector.FrameTreeElement.prototype.onselect):
        (WebInspector.FrameTreeElement.prototype.set hovered):
        (WebInspector.FrameResourceTreeElement.prototype.ondblclick):
        * inspector/front-end/Script.js:
        (WebInspector.Script.prototype.requestSource):
        * inspector/front-end/ScriptsPanel.js:
        (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
        (WebInspector.ScriptsPanel.prototype._setPauseOnExceptions):
        (WebInspector.ScriptsPanel.prototype._togglePause):
        (WebInspector.ScriptsPanel.prototype._stepOverClicked):
        (WebInspector.ScriptsPanel.prototype._stepIntoClicked):
        (WebInspector.ScriptsPanel.prototype._stepOutClicked):
        (WebInspector.ScriptsPanel.prototype.toggleBreakpointsClicked):
        * inspector/front-end/SourceFrame.js:
        (WebInspector.SourceFrame.prototype._hidePopup):
        * inspector/front-end/TestController.js:
        (WebInspector.TestController.prototype.notifyDone):
        * inspector/front-end/TimelinePanel.js:
        (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
        * inspector/front-end/WatchExpressionsSidebarPane.js:
        (WebInspector.WatchExpressionsSection.prototype.update):
        * inspector/front-end/WorkersSidebarPane.js:
        (WebInspector.WorkersSidebarPane.prototype.setInstrumentation):
        * inspector/front-end/inspector.js:
        (WebInspector.highlightDOMNode):
        (WebInspector.doLoadedDone):
        (WebInspector.openResource):
        (WebInspector.documentKeyDown):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@78717 268f45cc-cd09-0410-ab3c-d52691b4dbfc

50 files changed:
LayoutTests/ChangeLog
LayoutTests/http/tests/inspector/console-xhr-logging.html
LayoutTests/http/tests/inspector/extensions-test.js
LayoutTests/http/tests/inspector/inspector-test.js
LayoutTests/inspector/console/console-dir-global.html
LayoutTests/inspector/debugger/debugger-autocontinue-on-syntax-error.html
LayoutTests/inspector/debugger/debugger-pause-on-exception.html
LayoutTests/inspector/elements/elements-panel-search.html
LayoutTests/inspector/report-API-errors-expected.txt
LayoutTests/inspector/report-API-errors.html
LayoutTests/inspector/report-protocol-errors.html
LayoutTests/inspector/styles/styles-new-API.html
LayoutTests/inspector/styles/styles-source-offsets.html
LayoutTests/inspector/timeline/timeline-network-resource.html
LayoutTests/inspector/timeline/timeline-script-tag-1.html
LayoutTests/inspector/timeline/timeline-script-tag-2.html
LayoutTests/inspector/timeline/timeline-test.js
LayoutTests/inspector/timeline/timeline-trivial.html
Source/WebCore/ChangeLog
Source/WebCore/inspector/CodeGeneratorInspector.pm
Source/WebCore/inspector/front-end/AuditRules.js
Source/WebCore/inspector/front-end/AuditsPanel.js
Source/WebCore/inspector/front-end/BreakpointManager.js
Source/WebCore/inspector/front-end/CSSStyleModel.js
Source/WebCore/inspector/front-end/ConsoleView.js
Source/WebCore/inspector/front-end/CookieItemsView.js
Source/WebCore/inspector/front-end/DOMAgent.js
Source/WebCore/inspector/front-end/DOMStorage.js
Source/WebCore/inspector/front-end/Database.js
Source/WebCore/inspector/front-end/DebuggerModel.js
Source/WebCore/inspector/front-end/ElementsPanel.js
Source/WebCore/inspector/front-end/ElementsTreeOutline.js
Source/WebCore/inspector/front-end/ExtensionPanel.js
Source/WebCore/inspector/front-end/ExtensionServer.js
Source/WebCore/inspector/front-end/HeapSnapshotView.js
Source/WebCore/inspector/front-end/NetworkManager.js
Source/WebCore/inspector/front-end/NetworkPanel.js
Source/WebCore/inspector/front-end/ProfileView.js
Source/WebCore/inspector/front-end/ProfilesPanel.js
Source/WebCore/inspector/front-end/PropertiesSidebarPane.js
Source/WebCore/inspector/front-end/RemoteObject.js
Source/WebCore/inspector/front-end/ResourcesPanel.js
Source/WebCore/inspector/front-end/Script.js
Source/WebCore/inspector/front-end/ScriptsPanel.js
Source/WebCore/inspector/front-end/SourceFrame.js
Source/WebCore/inspector/front-end/TestController.js
Source/WebCore/inspector/front-end/TimelinePanel.js
Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
Source/WebCore/inspector/front-end/WorkersSidebarPane.js
Source/WebCore/inspector/front-end/inspector.js

index e49da0adfedcaa42977c02e792be75cc964f1464..b4e7206311a82ba35065ee8ad811356e0a088ac5 100644 (file)
@@ -1,3 +1,37 @@
+2011-02-16  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: split all the functions of Inspector backend API by domain.
+        https://bugs.webkit.org/show_bug.cgi?id=54558
+
+        We have a number of functions from different domains in single instance of InspectorBackend.
+        It'd be better to split the functions by their domains.
+        As example 'evaluate' will be moved from InspectorBackend to RuntimeAgent container.
+
+        * http/tests/inspector/console-xhr-logging.html:
+        * http/tests/inspector/extensions-test.js:
+        (initialize_ExtensionsTest.InspectorTest.runExtensionTests):
+        * http/tests/inspector/inspector-test.js:
+        (initialize_InspectorTest.InspectorTest.completeTest):
+        (initialize_InspectorTest.InspectorTest.evaluateInPage):
+        (initialize_InspectorTest.InspectorTest.reloadPage):
+        * inspector/console/console-dir-global.html:
+        * inspector/debugger/debugger-autocontinue-on-syntax-error.html:
+        * inspector/debugger/debugger-pause-on-exception.html:
+        * inspector/elements/elements-panel-search.html:
+        * inspector/report-API-errors-expected.txt:
+        * inspector/report-API-errors.html:
+        * inspector/report-protocol-errors.html:
+        * inspector/styles/styles-new-API.html:
+        * inspector/styles/styles-source-offsets.html:
+        * inspector/timeline/timeline-network-resource.html:
+        * inspector/timeline/timeline-script-tag-1.html:
+        * inspector/timeline/timeline-script-tag-2.html:
+        * inspector/timeline/timeline-test.js:
+        (initialize_Timeline.InspectorTest.performActionsAndPrint.step2):
+        * inspector/timeline/timeline-trivial.html:
+
 2011-02-16  Nikolas Zimmermann  <nzimmermann@rim.com>
 
         Not reviewed.
index 74d226a758f58804267e204ab58829cd069626d0..039aff588525fd380f9e054f6b511439c1bd2f61 100755 (executable)
@@ -33,7 +33,7 @@ function test()
         {
             InspectorTest.evaluateInPage("makeRequests()", step2);
         }
-        InspectorBackend.setMonitoringXHREnabled(true, callback);
+        ConsoleAgent.setMonitoringXHREnabled(true, callback);
     }
 
     function step2()
@@ -42,7 +42,7 @@ function test()
         {
             InspectorTest.evaluateInPage("makeRequests()", step3);
         }
-        InspectorBackend.setMonitoringXHREnabled(false, callback);
+        ConsoleAgent.setMonitoringXHREnabled(false, callback);
     }
 
     function step3()
index 39c4a5596122e0f1adc8f3fd92f0a90e32341583..fa229b5cf12036e47931af850416479fa51487d5 100644 (file)
@@ -34,7 +34,7 @@ InspectorTest.dispatchOnMessage = function(messageId, callback, recurring)
 
 InspectorTest.runExtensionTests = function()
 {
-    InspectorBackend.evaluate("location.href", "console", false, function(result) {
+    RuntimeAgent.evaluate("location.href", "console", false, function(result) {
         var pageURL = result.description;
         var extensionURL = (/^https?:/.test(pageURL) ?
             pageURL.replace(/^(https?:\/\/[^/]*\/).*$/,"$1") :
index 361621af406dd603175785f61ad17c7ce4db0aca..a925b118e8cada1b234f2b993250206fabe1a659 100644 (file)
@@ -5,7 +5,7 @@ var resultsSynchronized = false;
 
 InspectorTest.completeTest = function()
 {
-    InspectorBackend.didEvaluateForTestInFrontend(InspectorTest.completeTestCallId, "");
+    InspectorAgent.didEvaluateForTestInFrontend(InspectorTest.completeTestCallId, "");
 }
 
 InspectorTest.evaluateInConsole = function(code, callback)
@@ -40,7 +40,7 @@ InspectorTest.evaluateInPage = function(code, callback)
         if (callback)
             callback(WebInspector.RemoteObject.fromPayload(result));
     }
-    InspectorBackend.evaluate(code, "console", false, mycallback);
+    RuntimeAgent.evaluate(code, "console", false, mycallback);
 }
 
 InspectorTest.evaluateInPageWithTimeout = function(code, callback)
@@ -109,7 +109,7 @@ InspectorTest.reloadPage = function(callback)
 
     if (WebInspector.panels.network)
         WebInspector.panels.network._reset();
-    InspectorBackend.reloadPage(false);
+    InspectorAgent.reloadPage(false);
 }
 
 InspectorTest.pageReloaded = function()
index a615a6107c92f7fe8010465eabc146555a8439d6..7563093dbbf20f9843ccdc30f795aee27900cc32 100644 (file)
@@ -12,7 +12,7 @@ function doit()
 
 function test()
 {
-    InspectorBackend.evaluate("window", "console", false, evalCallback);
+    RuntimeAgent.evaluate("window", "console", false, evalCallback);
 
     function evalCallback(result)
     {
index eb1a0585a3c2f8055e054d3d06c356a14f80d412..d6a6c45f80f787eadf9b7fb717addd53c5c757cd 100644 (file)
@@ -12,7 +12,7 @@ function test()
 
     function startDebuggerTestCallback()
     {
-        InspectorBackend.setPauseOnExceptionsState(WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnUncaughtExceptions);
+        DebuggerAgent.setPauseOnExceptionsState(WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnUncaughtExceptions);
         InspectorTest.showScriptSource("debugger-autocontinue-on-syntax-error.html", reloadInspectedPage);
     }
 
index 23490c3d782df0f5ae7017463ff095c511ef0c36..4e74ad3a3a8c831ee952a6a9ee1c9093ce6235b5 100644 (file)
@@ -20,7 +20,7 @@ var test = function()
 
     function step1()
     {
-        InspectorBackend.setPauseOnExceptionsState(WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnUncaughtExceptions);
+        DebuggerAgent.setPauseOnExceptionsState(WebInspector.ScriptsPanel.PauseOnExceptionsState.PauseOnUncaughtExceptions);
         InspectorTest.showScriptSource("debugger-pause-on-exception.html", step2);
     }
 
index ef8ef7e5ca29df3c8b525457fcd9035cc8b72d49..8ffca8ffb1b78e4331f0c708e1f1e6b671fdc82a 100755 (executable)
@@ -25,26 +25,26 @@ function test()
             if (node.nodeType === Node.TEXT_NODE)
                 searchResults.push(node.nodeValue);
             else
-                InspectorBackend.getOuterHTML(node.id, addSearchResult);
+                DOMAgent.getOuterHTML(node.id, addSearchResult);
         }
     }
 
     // Plain text.
-    InspectorBackend.performSearch("Foo" + "Bar", true);
+    DOMAgent.performSearch("Foo" + "Bar", true);
     // Partial text.
-    InspectorBackend.performSearch("oo" + "Ba", true);
+    DOMAgent.performSearch("oo" + "Ba", true);
     // Start tag.
-    InspectorBackend.performSearch("<inpu" + "t", true);
+    DOMAgent.performSearch("<inpu" + "t", true);
     // Partial tag.
-    InspectorBackend.performSearch("npu" + "t", true);
+    DOMAgent.performSearch("npu" + "t", true);
     // Exact attribute name.
-    InspectorBackend.performSearch("valu" + "e", true);
+    DOMAgent.performSearch("valu" + "e", true);
     // Exact attribute val<>ue.
-    InspectorBackend.performSearch("In" + "putVa" + "l", true);
+    DOMAgent.performSearch("In" + "putVa" + "l", true);
     // Partial attribute val<>ue.
-    InspectorBackend.performSearch("n" + "putVa" + "l", true);
+    DOMAgent.performSearch("n" + "putVa" + "l", true);
     // Terminator.
-    InspectorBackend.performSearch("ter" + "mi" + "nator", true);
+    DOMAgent.performSearch("ter" + "mi" + "nator", true);
 }
 </script>
 </head>
index 124c29ede25a72eadf46c47297adc29f139d7561..b5a8366eda453a7d6c0cf56c2ad1df5f70efaa4d 100644 (file)
@@ -1,8 +1,8 @@
 Tests that InspectorBackendStub is catching incorrect arguments.
 
-Protocol Error: Invalid type of argument 'enabled' for 'InspectorBackend.setMonitoringXHREnabled' call. It should be 'boolean' but it is 'number'.
-Protocol Error: Invalid number of arguments for 'InspectorBackend.setMonitoringXHREnabled' call. It should have the next arguments '{"enabled":"boolean"}'.
-Protocol Error: Optional callback argument for 'InspectorBackend.setMonitoringXHREnabled' call should be a function but its type is 'string'.
+Protocol Error: Invalid type of argument 'enabled' for 'ConsoleAgent.setMonitoringXHREnabled' call. It should be 'boolean' but it is 'number'.
+Protocol Error: Invalid number of arguments for 'ConsoleAgent.setMonitoringXHREnabled' call. It should have the next arguments '{"enabled":"boolean"}'.
+Protocol Error: Optional callback argument for 'ConsoleAgent.setMonitoringXHREnabled' call should be a function but its type is 'string'.
 Protocol Error: the message is for non-existing domain 'wrongDomain'
 Protocol Error: Attempted to dispatch an unimplemented method 'Inspector.something-strange'
 
index c9a5b8fe1cf945ac924df622854a47ca26add80c..42eb83d814d555d28f4a2f3ed4185a748284a1f8 100644 (file)
@@ -11,11 +11,11 @@ function test()
         InspectorTest.addResult(String.sprintf.apply(this, arguments));
     }
 
-    InspectorBackend.setMonitoringXHREnabled(1);
-    InspectorBackend.setMonitoringXHREnabled();
-    InspectorBackend.setMonitoringXHREnabled(true, "not a function");
-    InspectorBackend.setMonitoringXHREnabled(true, undefined);
-    InspectorBackend.setMonitoringXHREnabled(false, undefined);
+    ConsoleAgent.setMonitoringXHREnabled(1);
+    ConsoleAgent.setMonitoringXHREnabled();
+    ConsoleAgent.setMonitoringXHREnabled(true, "not a function");
+    ConsoleAgent.setMonitoringXHREnabled(true, undefined);
+    ConsoleAgent.setMonitoringXHREnabled(false, undefined);
     InspectorBackend.dispatch('{"type": "event", "domain": "wrongDomain", "event": "something-strange", "data": {}}');
     InspectorBackend.dispatch('{"type": "event", "domain": "Inspector", "event": "something-strange", "data": {}}');
 
index d51985fe614f8a0126eae7291edf2f8fbb0cbb43..3b9b0014760aa3e7875c27b9bf369b1b20727bc1 100644 (file)
@@ -35,7 +35,7 @@ function test()
             InspectorFrontendHost.sendMessageToBackend(messages[i]);
     }
 
-    InspectorBackend.disableDebugger(fire);
+    InspectorAgent.disableDebugger(fire);
 }
 
 </script>
index 5086ecb056f96e7af305753aec854be35d92018a..c33f8ee269b9ee7ae0038954f37fb083b32fcb73 100644 (file)
@@ -47,7 +47,7 @@ function test()
 
         function nodeCallback(node)
         {
-            InspectorBackend.getStylesForNode(node.id, callback);
+            CSSAgent.getStylesForNode(node.id, callback);
         }
         InspectorTest.selectNodeWithId("mainBody", nodeCallback);
     }
@@ -67,7 +67,7 @@ function test()
 
         function nodeCallback(node)
         {
-            InspectorBackend.getStylesForNode(node.id, callback);
+            CSSAgent.getStylesForNode(node.id, callback);
         }
         InspectorTest.nodeWithId("thetable", nodeCallback);
     }
@@ -87,7 +87,7 @@ function test()
         {
             InspectorTest.addResult("");
             InspectorTest.addResult("=== Last stylesheet patched ===");
-            InspectorBackend.setStyleSheetText(styleSheet.styleSheetId, newStyleSheetText,
+            CSSAgent.setStyleSheetText(styleSheet.styleSheetId, newStyleSheetText,
                 loadAndDumpStyleSheet.bind(null, styleSheet.styleSheetId, test_changeSelector));
         }
 
@@ -98,7 +98,7 @@ function test()
             for (var i = 0; i < ids.length; ++i)
                 loadAndDumpStyleSheet(ids[i], (i < ids.length - 1) ? null : patchStyleSheet);
         }
-        InspectorBackend.getAllStyles(styleSheetIdsLoaded);
+        CSSAgent.getAllStyles(styleSheetIdsLoaded);
     }
 
     function test_changeSelector(styleSheet)
@@ -110,7 +110,7 @@ function test()
             loadAndDumpStyleSheet(rule.ruleId.styleSheetId, test_setStyleText);
         }
 
-        InspectorBackend.setRuleSelector(styleSheet.rules[0].ruleId, "html *, body[foo=\"bar\"]", didSetSelector);
+        CSSAgent.setRuleSelector(styleSheet.rules[0].ruleId, "html *, body[foo=\"bar\"]", didSetSelector);
     }
 
     function test_setStyleText(styleSheet)
@@ -122,12 +122,12 @@ function test()
             loadAndDumpStyleSheet(style.styleId.styleSheetId, test_addRule);
         }
 
-        InspectorBackend.setPropertyText(styleSheet.rules[0].style.styleId, 0, "", true);
-        InspectorBackend.setPropertyText(styleSheet.rules[0].style.styleId, 0, "", true);
+        CSSAgent.setPropertyText(styleSheet.rules[0].style.styleId, 0, "", true);
+        CSSAgent.setPropertyText(styleSheet.rules[0].style.styleId, 0, "", true);
 
         // This operation should not update the style as the new property text is not parsable.
-        InspectorBackend.setPropertyText(styleSheet.rules[0].style.styleId, 0, "zzz;", false);
-        InspectorBackend.setPropertyText(styleSheet.rules[0].style.styleId, 0, "color: white; background: black;", false, didSetStyleText);
+        CSSAgent.setPropertyText(styleSheet.rules[0].style.styleId, 0, "zzz;", false);
+        CSSAgent.setPropertyText(styleSheet.rules[0].style.styleId, 0, "color: white; background: black;", false, didSetStyleText);
     }
 
     function test_addRule()
@@ -142,15 +142,15 @@ function test()
 
         function didSetStyleText(style)
         {
-            InspectorBackend.getStylesForNode(WebInspector.domAgent.document.body.id, didGetStyles);
+            CSSAgent.getStylesForNode(WebInspector.domAgent.document.body.id, didGetStyles);
         }
 
         function ruleAdded(rule)
         {
-            InspectorBackend.setPropertyText(rule.style.styleId, 0, "font-family: serif;", false, didSetStyleText);
+            CSSAgent.setPropertyText(rule.style.styleId, 0, "font-family: serif;", false, didSetStyleText);
         }
 
-        InspectorBackend.addRule(WebInspector.domAgent.document.body.id, "body", ruleAdded);
+        CSSAgent.addRule(WebInspector.domAgent.document.body.id, "body", ruleAdded);
     }
 
     function test_disableProperty()
@@ -175,13 +175,13 @@ function test()
             // border-width: 0px;
 
             var style = styles.matchedCSSRules[1].style;
-            InspectorBackend.toggleProperty(style.styleId, 0, true); // height: 100%
-            InspectorBackend.toggleProperty(style.styleId, 7, true); // border-width: 0px
-            InspectorBackend.setPropertyText(style.styleId, 7, "font-size: 12px;", false);
-            InspectorBackend.setPropertyText(style.styleId, 9, "font-size: 14px;", false);
-            InspectorBackend.toggleProperty(style.styleId, 9, true); // font-size: 14px
-            InspectorBackend.setPropertyText(style.styleId, 8, "border-width: 1px;", true);
-            InspectorBackend.toggleProperty(style.styleId, 8, false); // border-width: 1px
+            CSSAgent.toggleProperty(style.styleId, 0, true); // height: 100%
+            CSSAgent.toggleProperty(style.styleId, 7, true); // border-width: 0px
+            CSSAgent.setPropertyText(style.styleId, 7, "font-size: 12px;", false);
+            CSSAgent.setPropertyText(style.styleId, 9, "font-size: 14px;", false);
+            CSSAgent.toggleProperty(style.styleId, 9, true); // font-size: 14px
+            CSSAgent.setPropertyText(style.styleId, 8, "border-width: 1px;", true);
+            CSSAgent.toggleProperty(style.styleId, 8, false); // border-width: 1px
             // height : 100% ; [d]
             // border: 1px solid;
             // border-width: 2px;
@@ -193,12 +193,12 @@ function test()
             // border-width: 1px;
             // font-size: 14px; [d]
 
-            InspectorBackend.setPropertyText(style.styleId, 3, "", true, didDisableProperty);
+            CSSAgent.setPropertyText(style.styleId, 3, "", true, didDisableProperty);
         }
 
         function nodeCallback(node)
         {
-            InspectorBackend.getStylesForNode(node.id, stylesCallback);
+            CSSAgent.getStylesForNode(node.id, stylesCallback);
         }
         InspectorTest.nodeWithId("toggle", nodeCallback);
     }
@@ -213,8 +213,8 @@ function test()
             InspectorTest.completeTest();
         }
 
-        InspectorBackend.toggleProperty(styleId, 6, false);
-        InspectorBackend.toggleProperty(styleId, 8, false, didEnableProperty);
+        CSSAgent.toggleProperty(styleId, 6, false);
+        CSSAgent.toggleProperty(styleId, 8, false, didEnableProperty);
     }
 
     // Data dumping
@@ -258,7 +258,7 @@ function test()
                 continuation(styleSheet);
         }
 
-        InspectorBackend.getStyleSheet(styleSheetId, styleSheetLoaded);
+        CSSAgent.getStyleSheet(styleSheetId, styleSheetLoaded);
     }
 }
 
index 16227ef82b079b65e346e666828df2f5b92e79d0..84e309b9cfeccc1a0141123fa253dfeaa51754e4 100644 (file)
@@ -37,7 +37,7 @@ function test()
 
     function step1(node)
     {
-        InspectorBackend.getStylesForNode(node.id, step2);
+        CSSAgent.getStylesForNode(node.id, step2);
     }
 
     function step2(styles)
index c41f8aa2025001e9948a047161141ddedb904bf3..2634074856093b18e8f11ec3bea6389ee8f71feb 100644 (file)
@@ -18,7 +18,7 @@ function test()
     var resourceId;
     var scriptUrl = "timeline-network-resource.js";
 
-    InspectorBackend.startTimelineProfiler(step1);
+    InspectorAgent.startTimelineProfiler(step1);
 
     function step1()
     {
@@ -28,7 +28,7 @@ function test()
 
     function step2()
     {
-        InspectorBackend.stopTimelineProfiler(step3);
+        InspectorAgent.stopTimelineProfiler(step3);
     }
 
     function step3()
index fb04f4d5294ee2a84757fef5f16bbe9d926a6555..88260440123f0c7205e7b2ef146d4cea68bee4c2 100644 (file)
@@ -13,7 +13,7 @@ function performActions()
 
 function test() 
 {
-    InspectorBackend.startTimelineProfiler(step1);
+    InspectorAgent.startTimelineProfiler(step1);
     function step1()
     {
         InspectorTest.evaluateInPage("performActions()");
@@ -22,7 +22,7 @@ function test()
 
     function step2()
     {
-        InspectorBackend.stopTimelineProfiler(step3);
+        InspectorAgent.stopTimelineProfiler(step3);
     }
 
     function step3()
index 9d6f0a886f9eba9973cdbb44a57509bfd6fb80c9..6f896337c00b22e3ef2822a6c348225af6fec858 100644 (file)
@@ -13,7 +13,7 @@ function performActions()
 
 function test() 
 {
-    InspectorBackend.startTimelineProfiler(step1);
+    InspectorAgent.startTimelineProfiler(step1);
     function step1()
     {
         InspectorTest._addSniffer(WebInspector.ConsoleView.prototype, "addMessage", step2);
@@ -22,7 +22,7 @@ function test()
 
     function step2()
     {
-        InspectorBackend.stopTimelineProfiler(step3);
+        InspectorAgent.stopTimelineProfiler(step3);
     }
 
     function step3()
index 54d63c136b43c051097970646c67a47b7e40f757..2c4b39d3fa971a45d91ead051f36ec0a0630d139 100644 (file)
@@ -17,7 +17,7 @@ InspectorTest.timelineNonDeterministicProps = {
 
 InspectorTest.performActionsAndPrint = function(actions, typeName)
 {
-    InspectorBackend.startTimelineProfiler(step1);
+    InspectorAgent.startTimelineProfiler(step1);
     function step1()
     {
         InspectorTest.evaluateInPage(actions, step2);
@@ -25,7 +25,7 @@ InspectorTest.performActionsAndPrint = function(actions, typeName)
 
     function step2()
     {
-        InspectorBackend.stopTimelineProfiler(step3);
+        InspectorAgent.stopTimelineProfiler(step3);
     }
 
     function step3()
index 4251a24c5b1a298ce20bf4684f95362719715e25..88b2399679f218b0ffad8baf7c551ed0e44e37e9 100644 (file)
@@ -10,7 +10,7 @@ function test() {
         InspectorTest.addResult("Timeline started");
         InspectorTest.completeTest();
     }
-    InspectorBackend.startTimelineProfiler(callback);
+    InspectorAgent.startTimelineProfiler(callback);
 }
 
 
index 9b1f295fb775b77ce7c1dc1326c0b1f899f83f97..56533baa8d91c88622332c8f69a161f6285a666c 100644 (file)
@@ -1,3 +1,148 @@
+2011-02-16  Ilya Tikhonovsky  <loislo@chromium.org>
+
+        Reviewed by Yury Semikhatsky.
+
+        Web Inspector: split all the functions of Inspector backend API by domain.
+        https://bugs.webkit.org/show_bug.cgi?id=54558
+
+        We have a number of functions from different domains in single instance of InspectorBackend.
+        It'd be better to split the functions by their domains.
+        As example 'evaluate' will be moved from InspectorBackend to RuntimeAgent container.
+
+        * inspector/CodeGeneratorInspector.pm:
+        * inspector/front-end/AuditRules.js:
+        (WebInspector.AuditRules.evaluateInTargetWindow):
+        (WebInspector.AuditRules.UnusedCssRule.prototype.doRun):
+        * inspector/front-end/AuditsPanel.js:
+        (WebInspector.AuditsPanel.prototype._reloadResources):
+        * inspector/front-end/BreakpointManager.js:
+        (WebInspector.BreakpointManager.prototype._projectChanged):
+        (WebInspector.BreakpointManager.prototype.restoreDOMBreakpoints):
+        (WebInspector.BreakpointManager.prototype._saveBreakpoints):
+        (WebInspector.DOMBreakpoint.prototype._enable):
+        (WebInspector.DOMBreakpoint.prototype._disable):
+        (WebInspector.EventListenerBreakpoint.prototype._enable):
+        (WebInspector.EventListenerBreakpoint.prototype._disable):
+        (WebInspector.XHRBreakpoint.prototype._enable):
+        (WebInspector.XHRBreakpoint.prototype._disable):
+        * inspector/front-end/CSSStyleModel.js:
+        (WebInspector.CSSStyleModel.prototype.getStylesAsync):
+        (WebInspector.CSSStyleModel.prototype.getComputedStyleAsync):
+        (WebInspector.CSSStyleModel.prototype.getInlineStyleAsync):
+        (WebInspector.CSSStyleModel.prototype.setRuleSelector.callback):
+        (WebInspector.CSSStyleModel.prototype.setRuleSelector):
+        (WebInspector.CSSStyleModel.prototype.addRule.callback):
+        (WebInspector.CSSStyleModel.prototype.addRule):
+        (WebInspector.CSSStyleModel.prototype._styleSheetChanged):
+        (WebInspector.CSSStyleModel.prototype._onRevert):
+        (WebInspector.CSSStyleDeclaration.prototype.insertPropertyAt):
+        (WebInspector.CSSProperty.prototype.setText):
+        (WebInspector.CSSProperty.prototype.setDisabled):
+        (WebInspector.CSSStyleSheet.createForId):
+        (WebInspector.CSSStyleSheet.prototype.setText):
+        * inspector/front-end/ConsoleView.js:
+        (WebInspector.ConsoleView.prototype.requestClearMessages):
+        (WebInspector.ConsoleView.prototype.completions):
+        (WebInspector.ConsoleView.prototype._handleContextMenuEvent.itemAction):
+        (WebInspector.ConsoleView.prototype._handleContextMenuEvent):
+        (WebInspector.ConsoleView.prototype.evalInInspectedWindow):
+        * inspector/front-end/CookieItemsView.js:
+        (WebInspector.CookieItemsView.prototype._deleteCookie):
+        * inspector/front-end/DOMAgent.js:
+        (WebInspector.DOMAgent.prototype.getChildNodesAsync):
+        (WebInspector.DOMAgent.prototype.setAttributeAsync):
+        (WebInspector.DOMAgent.prototype.removeAttributeAsync):
+        (WebInspector.DOMAgent.prototype.setTextNodeValueAsync):
+        (WebInspector.ApplicationCacheDispatcher.getApplicationCachesAsync):
+        (WebInspector.Cookies.getCookiesAsync):
+        (WebInspector.EventListeners.getEventListenersForNodeAsync):
+        * inspector/front-end/DOMStorage.js:
+        (WebInspector.DOMStorage.prototype.getEntries):
+        (WebInspector.DOMStorage.prototype.setItem):
+        (WebInspector.DOMStorage.prototype.removeItem):
+        * inspector/front-end/Database.js:
+        (WebInspector.Database.prototype.getTableNames):
+        (WebInspector.Database.prototype.executeSql):
+        * inspector/front-end/DebuggerModel.js:
+        (WebInspector.DebuggerModel.prototype.enableDebugger):
+        (WebInspector.DebuggerModel.prototype.disableDebugger):
+        (WebInspector.DebuggerModel.prototype.continueToLocation):
+        (WebInspector.DebuggerModel.prototype.setBreakpoint):
+        (WebInspector.DebuggerModel.prototype.setBreakpointBySourceId):
+        (WebInspector.DebuggerModel.prototype.removeBreakpoint):
+        (WebInspector.DebuggerModel.prototype.editScriptSource):
+        * inspector/front-end/ElementsPanel.js:
+        (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged):
+        (WebInspector.ElementsPanel):
+        (WebInspector.ElementsPanel.prototype.setDocument):
+        (WebInspector.ElementsPanel.prototype.searchCanceled):
+        (WebInspector.ElementsPanel.prototype.performSearch):
+        (WebInspector.ElementsPanel.prototype.handleCopyEvent):
+        (WebInspector.ElementsPanel.prototype.setSearchingForNode):
+        * inspector/front-end/ElementsTreeOutline.js:
+        (WebInspector.ElementsTreeElement.prototype._createTooltipForNode):
+        (WebInspector.ElementsTreeElement.prototype._tagNameEditingCommitted):
+        ():
+        * inspector/front-end/ExtensionPanel.js:
+        (WebInspector.ExtensionWatchSidebarPane.prototype.setExpression):
+        * inspector/front-end/ExtensionServer.js:
+        (WebInspector.ExtensionServer.prototype._onAddRequestHeaders):
+        (WebInspector.ExtensionServer.prototype._onReload):
+        (WebInspector.ExtensionServer.prototype._onEvaluateOnInspectedPage):
+        * inspector/front-end/HeapSnapshotView.js:
+        (WebInspector.HeapSnapshotProfileType.prototype.buttonClicked):
+        * inspector/front-end/NetworkManager.js:
+        (WebInspector.NetworkManager):
+        (WebInspector.NetworkManager.prototype.reset):
+        (WebInspector.NetworkManager.prototype.requestContent):
+        * inspector/front-end/NetworkPanel.js:
+        (WebInspector.NetworkDataGridNode.prototype._openInNewTab):
+        * inspector/front-end/ProfileView.js:
+        (WebInspector.CPUProfileView):
+        (WebInspector.CPUProfileType.prototype.buttonClicked):
+        * inspector/front-end/ProfilesPanel.js:
+        (WebInspector.ProfilesPanel.prototype._clearProfiles):
+        (WebInspector.ProfilesPanel.prototype._removeProfileHeader):
+        (WebInspector.ProfilesPanel.prototype.loadHeapSnapshot):
+        (WebInspector.ProfilesPanel.prototype._toggleProfiling):
+        (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
+        * inspector/front-end/PropertiesSidebarPane.js:
+        (WebInspector.PropertiesSidebarPane.prototype.update):
+        * inspector/front-end/RemoteObject.js:
+        (WebInspector.RemoteObject.resolveNode):
+        (WebInspector.RemoteObject.prototype.getProperties):
+        (WebInspector.RemoteObject.prototype.setPropertyValue):
+        (WebInspector.RemoteObject.prototype.pushNodeToFrontend):
+        * inspector/front-end/ResourcesPanel.js:
+        (WebInspector.FrameTreeElement.prototype.onselect):
+        (WebInspector.FrameTreeElement.prototype.set hovered):
+        (WebInspector.FrameResourceTreeElement.prototype.ondblclick):
+        * inspector/front-end/Script.js:
+        (WebInspector.Script.prototype.requestSource):
+        * inspector/front-end/ScriptsPanel.js:
+        (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
+        (WebInspector.ScriptsPanel.prototype._setPauseOnExceptions):
+        (WebInspector.ScriptsPanel.prototype._togglePause):
+        (WebInspector.ScriptsPanel.prototype._stepOverClicked):
+        (WebInspector.ScriptsPanel.prototype._stepIntoClicked):
+        (WebInspector.ScriptsPanel.prototype._stepOutClicked):
+        (WebInspector.ScriptsPanel.prototype.toggleBreakpointsClicked):
+        * inspector/front-end/SourceFrame.js:
+        (WebInspector.SourceFrame.prototype._hidePopup):
+        * inspector/front-end/TestController.js:
+        (WebInspector.TestController.prototype.notifyDone):
+        * inspector/front-end/TimelinePanel.js:
+        (WebInspector.TimelinePanel.prototype._toggleTimelineButtonClicked):
+        * inspector/front-end/WatchExpressionsSidebarPane.js:
+        (WebInspector.WatchExpressionsSection.prototype.update):
+        * inspector/front-end/WorkersSidebarPane.js:
+        (WebInspector.WorkersSidebarPane.prototype.setInstrumentation):
+        * inspector/front-end/inspector.js:
+        (WebInspector.highlightDOMNode):
+        (WebInspector.doLoadedDone):
+        (WebInspector.openResource):
+        (WebInspector.documentKeyDown):
+
 2011-02-16  Mario Sanchez Prada  <msanchez@igalia.com>
 
         Reviewed by Martin Robinson.
index e4e19b0812b5b1cadd9c81ee7e8b9f7bc80554eb..7b0a36883972aa534d437880cc11053f2bda7cae 100644 (file)
@@ -623,7 +623,10 @@ InspectorBackendStub.prototype = {
     _registerDelegate: function(commandInfo)
     {
         var commandObject = JSON.parse(commandInfo);
-        this[commandObject.command] = this.sendMessageToBackend.bind(this, commandInfo);
+        var agentName = commandObject.domain + "Agent";
+        if (!window[agentName])
+            window[agentName] = {};
+        window[agentName][commandObject.command] = this.sendMessageToBackend.bind(this, commandInfo);
     },
 
     sendMessageToBackend: function()
@@ -633,12 +636,12 @@ InspectorBackendStub.prototype = {
 
         for (var key in request.arguments) {
             if (args.length === 0) {
-                console.error("Protocol Error: Invalid number of arguments for 'InspectorBackend.%s' call. It should have the next arguments '%s'.", request.command, JSON.stringify(request.arguments));
+                console.error("Protocol Error: Invalid number of arguments for '%sAgent.%s' call. It should have the next arguments '%s'.", request.domain, request.command, JSON.stringify(request.arguments));
                 return;
             }
             var value = args.shift();
             if (request.arguments[key] && typeof value !== request.arguments[key]) {
-                console.error("Protocol Error: Invalid type of argument '%s' for 'InspectorBackend.%s' call. It should be '%s' but it is '%s'.", key, request.command, request.arguments[key], typeof value);
+                console.error("Protocol Error: Invalid type of argument '%s' for '%sAgent.%s' call. It should be '%s' but it is '%s'.", key, request.domain, request.command, request.arguments[key], typeof value);
                 return;
             }
             request.arguments[key] = value;
@@ -646,7 +649,7 @@ InspectorBackendStub.prototype = {
 
         if (args.length === 1) {
             if (typeof args[0] !== "function" && typeof args[0] !== "undefined") {
-                console.error("Protocol Error: Optional callback argument for 'InspectorBackend.%s' call should be a function but its type is '%s'.", request.command, typeof args[0]);
+                console.error("Protocol Error: Optional callback argument for '%sAgent.%s' call should be a function but its type is '%s'.", request.domain, request.command, typeof args[0]);
                 return;
             }
             request.seq = this._wrap(args[0]);
index c122ba47c667cf806b33cb6b7427616ebc903653..7d4b8a5be92c7223e238444f55bce3c47a95e70a 100644 (file)
@@ -65,7 +65,7 @@ WebInspector.AuditRules.getDomainToResourcesMap = function(resources, types, nee
 
 WebInspector.AuditRules.evaluateInTargetWindow = function(func, args, callback)
 {
-    InspectorBackend.evaluateOnSelf(func.toString(), args, callback);
+    InjectedScriptAgent.evaluateOnSelf(func.toString(), args, callback);
 }
 
 
@@ -383,7 +383,7 @@ WebInspector.AuditRules.UnusedCssRule.prototype = {
                 WebInspector.CSSStyleSheet.createForId(styleSheetIds[i], styleSheetCallback.bind(null, styleSheets, i == styleSheetIds.length - 1 ? evalCallback : null));
         }
 
-        InspectorBackend.getAllStyles(allStylesCallback);
+        CSSAgent.getAllStyles(allStylesCallback);
     }
 }
 
index 47c0b308c60381d45343556912b8112f78dc14ed..3144c788a6cb592930e0c710f219478f55025784 100644 (file)
@@ -192,7 +192,7 @@ WebInspector.AuditsPanel.prototype = {
     _reloadResources: function(callback)
     {
         this._pageReloadCallback = callback;
-        InspectorBackend.reloadPage(false);
+        InspectorAgent.reloadPage(false);
     },
 
     _didMainResourceLoad: function()
index 94345d5f23810138e549becb650e793fe675cbb9..325716a72f3becdb8e3b0d65d372f8797b73e015 100644 (file)
@@ -207,7 +207,7 @@ WebInspector.BreakpointManager.prototype = {
         }
 
         if (!this._breakpointsPushedToFrontend) {
-            InspectorBackend.setAllBrowserBreakpoints(this._stickyBreakpoints);
+            BrowserDebuggerAgent.setAllBrowserBreakpoints(this._stickyBreakpoints);
             this._breakpointsPushedToFrontend = true;
         }
     },
@@ -243,7 +243,7 @@ WebInspector.BreakpointManager.prototype = {
                 continue;
             pathToNodeId[path] = 0;
             pendingCalls += 1;
-            InspectorBackend.pushNodeByPathToFrontend(path, didPushNodeByPathToFrontend.bind(this, path));
+            DOMAgent.pushNodeByPathToFrontend(path, didPushNodeByPathToFrontend.bind(this, path));
         }
         if (!pendingCalls)
             this._domBreakpointsRestored = true;
@@ -268,7 +268,7 @@ WebInspector.BreakpointManager.prototype = {
         WebInspector.settings.nativeBreakpoints = breakpoints;
 
         this._stickyBreakpoints[WebInspector.settings.projectId] = breakpoints;
-        InspectorBackend.setAllBrowserBreakpoints(this._stickyBreakpoints);
+        BrowserDebuggerAgent.setAllBrowserBreakpoints(this._stickyBreakpoints);
     },
 
     _validateBreakpoints: function(persistentBreakpoints)
@@ -331,12 +331,12 @@ WebInspector.DOMBreakpoint = function(node, type)
 WebInspector.DOMBreakpoint.prototype = {
     _enable: function()
     {
-        InspectorBackend.setDOMBreakpoint(this._nodeId, this._type);
+        BrowserDebuggerAgent.setDOMBreakpoint(this._nodeId, this._type);
     },
 
     _disable: function()
     {
-        InspectorBackend.removeDOMBreakpoint(this._nodeId, this._type);
+        BrowserDebuggerAgent.removeDOMBreakpoint(this._nodeId, this._type);
     },
 
     _serializeToJSON: function()
@@ -354,12 +354,12 @@ WebInspector.EventListenerBreakpoint = function(eventName)
 WebInspector.EventListenerBreakpoint.prototype = {
     _enable: function()
     {
-        InspectorBackend.setEventListenerBreakpoint(this._eventName);
+        BrowserDebuggerAgent.setEventListenerBreakpoint(this._eventName);
     },
 
     _disable: function()
     {
-        InspectorBackend.removeEventListenerBreakpoint(this._eventName);
+        BrowserDebuggerAgent.removeEventListenerBreakpoint(this._eventName);
     },
 
     _serializeToJSON: function()
@@ -377,12 +377,12 @@ WebInspector.XHRBreakpoint = function(url)
 WebInspector.XHRBreakpoint.prototype = {
     _enable: function()
     {
-        InspectorBackend.setXHRBreakpoint(this._url);
+        BrowserDebuggerAgent.setXHRBreakpoint(this._url);
     },
 
     _disable: function()
     {
-        InspectorBackend.removeXHRBreakpoint(this._url);
+        BrowserDebuggerAgent.removeXHRBreakpoint(this._url);
     },
 
     _serializeToJSON: function()
index 69bd7a9bc2e38d151fcd90b84e9947b68dbe6715..dc5ca1e786a80e0a4e5767d82d2acd2ab0ef82e7 100644 (file)
@@ -83,7 +83,7 @@ WebInspector.CSSStyleModel.prototype = {
                 userCallback(result);
         }
 
-        InspectorBackend.getStylesForNode(nodeId, callback.bind(null, userCallback));
+        CSSAgent.getStylesForNode(nodeId, callback.bind(null, userCallback));
     },
 
     getComputedStyleAsync: function(nodeId, userCallback)
@@ -96,7 +96,7 @@ WebInspector.CSSStyleModel.prototype = {
                 userCallback(WebInspector.CSSStyleDeclaration.parsePayload(stylePayload));
         }
 
-        InspectorBackend.getComputedStyleForNode(nodeId, callback.bind(null, userCallback));
+        CSSAgent.getComputedStyleForNode(nodeId, callback.bind(null, userCallback));
     },
 
     getInlineStyleAsync: function(nodeId, userCallback)
@@ -109,7 +109,7 @@ WebInspector.CSSStyleModel.prototype = {
                 userCallback(WebInspector.CSSStyleDeclaration.parsePayload(stylePayload));
         }
 
-        InspectorBackend.getInlineStyleForNode(nodeId, callback.bind(null, userCallback));
+        CSSAgent.getInlineStyleForNode(nodeId, callback.bind(null, userCallback));
     },
 
     setRuleSelector: function(ruleId, nodeId, newSelector, successCallback, failureCallback)
@@ -127,10 +127,10 @@ WebInspector.CSSStyleModel.prototype = {
             if (!rulePayload)
                 failureCallback();
             else
-                InspectorBackend.querySelectorAll(nodeId, newSelector, checkAffectsCallback.bind(this, nodeId, successCallback, rulePayload));
+                CSSAgent.querySelectorAll(nodeId, newSelector, checkAffectsCallback.bind(this, nodeId, successCallback, rulePayload));
         }
 
-        InspectorBackend.setRuleSelector(ruleId, newSelector, callback.bind(this, nodeId, successCallback, failureCallback));
+        CSSAgent.setRuleSelector(ruleId, newSelector, callback.bind(this, nodeId, successCallback, failureCallback));
     },
 
     addRule: function(nodeId, selector, successCallback, failureCallback)
@@ -149,10 +149,10 @@ WebInspector.CSSStyleModel.prototype = {
                 // Invalid syntax for a selector
                 failureCallback();
             } else
-                InspectorBackend.querySelectorAll(nodeId, selector, checkAffectsCallback.bind(this, nodeId, successCallback, rulePayload));
+                CSSAgent.querySelectorAll(nodeId, selector, checkAffectsCallback.bind(this, nodeId, successCallback, rulePayload));
         }
 
-        InspectorBackend.addRule(nodeId, selector, callback.bind(this, successCallback, failureCallback, selector));
+        CSSAgent.addRule(nodeId, selector, callback.bind(this, successCallback, failureCallback, selector));
     },
 
     _styleSheetChanged: function(styleSheetId, majorChange)
@@ -166,7 +166,7 @@ WebInspector.CSSStyleModel.prototype = {
             if (resource && resource.type === WebInspector.Resource.Type.Stylesheet)
                 resource.setContent(content, this._onRevert.bind(this, styleSheetId));
         }
-        InspectorBackend.getStyleSheetText(styleSheetId, callback.bind(this));
+        CSSAgent.getStyleSheetText(styleSheetId, callback.bind(this));
     },
 
     _onRevert: function(styleSheetId, contentToRevertTo)
@@ -176,7 +176,7 @@ WebInspector.CSSStyleModel.prototype = {
             this._styleSheetChanged(styleSheetId, true);
             this.dispatchEventToListeners("stylesheet changed");
         }
-        InspectorBackend.setStyleSheetText(styleSheetId, contentToRevertTo, callback.bind(this));
+        CSSAgent.setStyleSheetText(styleSheetId, contentToRevertTo, callback.bind(this));
     }
 }
 
@@ -348,7 +348,7 @@ WebInspector.CSSStyleDeclaration.prototype = {
             }
         }
 
-        InspectorBackend.setPropertyText(this.id, index, name + ": " + value + ";", false, callback.bind(null, userCallback));
+        CSSAgent.setPropertyText(this.id, index, name + ": " + value + ";", false, callback.bind(null, userCallback));
     },
 
     appendProperty: function(name, value, userCallback)
@@ -488,7 +488,7 @@ WebInspector.CSSProperty.prototype = {
             throw "No ownerStyle for property";
 
         // An index past all the properties adds a new property to the style.
-        InspectorBackend.setPropertyText(this.ownerStyle.id, this.index, propertyText, this.index < this.ownerStyle.pastLastSourcePropertyIndex(), callback.bind(this));
+        CSSAgent.setPropertyText(this.ownerStyle.id, this.index, propertyText, this.index < this.ownerStyle.pastLastSourcePropertyIndex(), callback.bind(this));
     },
 
     setValue: function(newValue, userCallback)
@@ -517,7 +517,7 @@ WebInspector.CSSProperty.prototype = {
             }
         }
 
-        InspectorBackend.toggleProperty(this.ownerStyle.id, this.index, disabled, callback.bind(this));
+        CSSAgent.toggleProperty(this.ownerStyle.id, this.index, disabled, callback.bind(this));
     }
 }
 
@@ -548,7 +548,7 @@ WebInspector.CSSStyleSheet.createForId = function(styleSheetId, userCallback)
         else
             userCallback(new WebInspector.CSSStyleSheet(styleSheetPayload));
     }
-    InspectorBackend.getStyleSheet(styleSheetId, callback.bind(this));
+    CSSAgent.getStyleSheet(styleSheetId, callback.bind(this));
 }
 
 WebInspector.CSSStyleSheet.prototype = {
@@ -569,6 +569,6 @@ WebInspector.CSSStyleSheet.prototype = {
             }
         }
 
-        InspectorBackend.setStyleSheetText(this.id, newText, callback.bind(this));
+        CSSAgent.setStyleSheetText(this.id, newText, callback.bind(this));
     }
 }
index 35d1ebf7034af931124bae1953dc47f2cb04ad9e..46329eb4eda6c96614b5ddba1874095467666c8d 100644 (file)
@@ -316,7 +316,7 @@ WebInspector.ConsoleView.prototype = {
 
     requestClearMessages: function()
     {
-        InspectorBackend.clearConsoleMessages();
+        ConsoleAgent.clearConsoleMessages();
     },
 
     clearMessages: function()
@@ -359,9 +359,9 @@ WebInspector.ConsoleView.prototype = {
         var includeCommandLineAPI = (!dotNotation && !bracketNotation);
         var injectedScriptAccess;
         if (WebInspector.panels.scripts && WebInspector.panels.scripts.paused)
-            InspectorBackend.getCompletionsOnCallFrame(WebInspector.panels.scripts.selectedCallFrameId(), expressionString, includeCommandLineAPI, reportCompletions);
+            DebuggerAgent.getCompletionsOnCallFrame(WebInspector.panels.scripts.selectedCallFrameId(), expressionString, includeCommandLineAPI, reportCompletions);
         else
-            InspectorBackend.getCompletions(expressionString, includeCommandLineAPI, reportCompletions);
+            RuntimeAgent.getCompletions(expressionString, includeCommandLineAPI, reportCompletions);
     },
 
     _reportCompletions: function(bestMatchOnly, completionsReadyCallback, dotNotation, bracketNotation, prefix, result, isException) {
@@ -417,7 +417,7 @@ WebInspector.ConsoleView.prototype = {
 
         var itemAction = function () {
             WebInspector.settings.monitoringXHREnabled = !WebInspector.settings.monitoringXHREnabled;
-            InspectorBackend.setMonitoringXHREnabled(WebInspector.settings.monitoringXHREnabled);
+            ConsoleAgent.setMonitoringXHREnabled(WebInspector.settings.monitoringXHREnabled);
         }.bind(this);
         var contextMenu = new WebInspector.ContextMenu();
         contextMenu.appendCheckboxItem(WebInspector.UIString("XMLHttpRequest logging"), itemAction, WebInspector.settings.monitoringXHREnabled)
@@ -526,7 +526,7 @@ WebInspector.ConsoleView.prototype = {
         {
             callback(WebInspector.RemoteObject.fromPayload(result));
         }
-        InspectorBackend.evaluate(expression, objectGroup, includeCommandLineAPI, evalCallback);
+        RuntimeAgent.evaluate(expression, objectGroup, includeCommandLineAPI, evalCallback);
     },
 
     _enterKeyPressed: function(event)
index dc76b39a1044f296c360b30693e2d561f0a560ad..c8187bb2ec7a8b2232564f065717c682de24fc09 100644 (file)
@@ -140,7 +140,7 @@ WebInspector.CookieItemsView.prototype = {
 
     _deleteCookie: function(cookie)
     {
-        InspectorBackend.deleteCookie(cookie.name, this._cookieDomain);
+        InspectorAgent.deleteCookie(cookie.name, this._cookieDomain);
         this._update();
     },
 
index 3645bb938e3e47e06c2a24f50d4ff8be361400fb..07f8424d106f4fb17c20ba24f89dbe4714c1adea 100644 (file)
@@ -319,25 +319,25 @@ WebInspector.DOMAgent.prototype = {
         function mycallback() {
             callback(parent.children);
         }
-        InspectorBackend.getChildNodes(parent.id, mycallback);
+        DOMAgent.getChildNodes(parent.id, mycallback);
     },
 
     setAttributeAsync: function(node, name, value, callback)
     {
         var mycallback = this._didApplyDomChange.bind(this, node, callback);
-        InspectorBackend.setAttribute(node.id, name, value, mycallback);
+        DOMAgent.setAttribute(node.id, name, value, mycallback);
     },
 
     removeAttributeAsync: function(node, name, callback)
     {
         var mycallback = this._didApplyDomChange.bind(this, node, callback);
-        InspectorBackend.removeAttribute(node.id, name, mycallback);
+        DOMAgent.removeAttribute(node.id, name, mycallback);
     },
 
     setTextNodeValueAsync: function(node, text, callback)
     {
         var mycallback = this._didApplyDomChange.bind(this, node, callback);
-        InspectorBackend.setTextNodeValue(node.id, text, mycallback);
+        DOMAgent.setTextNodeValue(node.id, text, mycallback);
     },
 
     _didApplyDomChange: function(node, callback, success)
@@ -511,7 +511,7 @@ WebInspector.ApplicationCacheDispatcher.getApplicationCachesAsync = function(cal
             callback(applicationCaches);
     }
 
-    InspectorBackend.getApplicationCaches(mycallback);
+    ApplicationCacheAgent.getApplicationCaches(mycallback);
 }
 
 WebInspector.ApplicationCacheDispatcher.prototype = {
@@ -540,7 +540,7 @@ WebInspector.Cookies.getCookiesAsync = function(callback)
             callback(cookies, true);
     }
 
-    InspectorBackend.getCookies(mycallback);
+    InspectorAgent.getCookies(mycallback);
 }
 
 WebInspector.Cookies.buildCookiesFromString = function(rawCookieString)
@@ -585,5 +585,5 @@ WebInspector.EventListeners.getEventListenersForNodeAsync = function(node, callb
 {
     if (!node)
         return;
-    InspectorBackend.getEventListenersForNode(node.id, callback);
+    DOMAgent.getEventListenersForNode(node.id, callback);
 }
index 43011eabbff8432d46452870d56b70ef004238f2..6ee899f46ab5b17995abe662c9826deeba73693a 100644 (file)
@@ -51,17 +51,17 @@ WebInspector.DOMStorage.prototype = {
 
     getEntries: function(callback)
     {
-        InspectorBackend.getDOMStorageEntries(this._id, callback);
+        DOMStorageAgent.getDOMStorageEntries(this._id, callback);
     },
     
     setItem: function(key, value, callback)
     {
-        InspectorBackend.setDOMStorageItem(this._id, key, value, callback);
+        DOMStorageAgent.setDOMStorageItem(this._id, key, value, callback);
     },
     
     removeItem: function(key, callback)
     {
-        InspectorBackend.removeDOMStorageItem(this._id, key, callback);
+        DOMStorageAgent.removeDOMStorageItem(this._id, key, callback);
     }
 }
 
index effb809b4164105c0e22fbcdb87703ad42e6254a..72cc5919b11966cb046fb945ceb5b691146683fd 100644 (file)
@@ -81,7 +81,7 @@ WebInspector.Database.prototype = {
         {
             callback(names.sort());
         }
-        InspectorBackend.getDatabaseTableNames(this._id, sortingCallback);
+        DatabaseAgent.getDatabaseTableNames(this._id, sortingCallback);
     },
     
     executeSql: function(query, onSuccess, onError)
@@ -94,7 +94,7 @@ WebInspector.Database.prototype = {
             }
             WebInspector.DatabaseDispatcher._callbacks[transactionId] = {"onSuccess": onSuccess, "onError": onError};
         }
-        InspectorBackend.executeSQL(this._id, query, callback);
+        DatabaseAgent.executeSQL(this._id, query, callback);
     }
 }
 
index 3384c34b12582e88c0d93af939599b5e5e99efe8..dc7e0adfba229a4ff185835549853797161244d9 100644 (file)
@@ -52,7 +52,7 @@ WebInspector.DebuggerModel.Events = {
 WebInspector.DebuggerModel.prototype = {
     enableDebugger: function()
     {
-        InspectorBackend.enableDebugger();
+        InspectorAgent.enableDebugger();
         if (this._breakpointsPushedToBackend)
             return;
         var breakpoints = WebInspector.settings.breakpoints;
@@ -68,12 +68,12 @@ WebInspector.DebuggerModel.prototype = {
 
     disableDebugger: function()
     {
-        InspectorBackend.disableDebugger();
+        InspectorAgent.disableDebugger();
     },
 
     continueToLocation: function(sourceID, lineNumber, columnNumber)
     {
-        InspectorBackend.continueToLocation(sourceID, lineNumber, columnNumber);
+        DebuggerAgent.continueToLocation(sourceID, lineNumber, columnNumber);
     },
 
     setBreakpoint: function(url, lineNumber, columnNumber, condition, enabled)
@@ -89,7 +89,7 @@ WebInspector.DebuggerModel.prototype = {
                 this._saveBreakpoints();
             this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.BreakpointAdded, breakpoint);
         }
-        InspectorBackend.setJavaScriptBreakpoint(url, lineNumber, columnNumber, condition, enabled, didSetBreakpoint.bind(this, this._breakpointsPushedToBackend));
+        DebuggerAgent.setJavaScriptBreakpoint(url, lineNumber, columnNumber, condition, enabled, didSetBreakpoint.bind(this, this._breakpointsPushedToBackend));
     },
 
     setBreakpointBySourceId: function(sourceID, lineNumber, columnNumber, condition, enabled)
@@ -103,12 +103,12 @@ WebInspector.DebuggerModel.prototype = {
             this._breakpoints[breakpointId] = breakpoint;
             this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.BreakpointAdded, breakpoint);
         }
-        InspectorBackend.setJavaScriptBreakpointBySourceId(sourceID, lineNumber, columnNumber, condition, enabled, didSetBreakpoint.bind(this));
+        DebuggerAgent.setJavaScriptBreakpointBySourceId(sourceID, lineNumber, columnNumber, condition, enabled, didSetBreakpoint.bind(this));
     },
 
     removeBreakpoint: function(breakpointId)
     {
-        InspectorBackend.removeJavaScriptBreakpoint(breakpointId);
+        DebuggerAgent.removeJavaScriptBreakpoint(breakpointId);
         var breakpoint = this._breakpoints[breakpointId];
         delete this._breakpoints[breakpointId];
         this._saveBreakpoints();
@@ -219,7 +219,7 @@ WebInspector.DebuggerModel.prototype = {
             } else
                 WebInspector.log(newBodyOrErrorMessage, WebInspector.ConsoleMessage.MessageLevel.Warning);
         }
-        InspectorBackend.editScriptSource(sourceID, scriptSource, didEditScriptSource.bind(this));
+        DebuggerAgent.editScriptSource(sourceID, scriptSource, didEditScriptSource.bind(this));
     },
 
     _updateScriptSource: function(sourceID, scriptSource)
index e6af93c89addcdc8c7eeeed493f67a39aed22636..79ae20b10b59718cf83c5157aecca608c915824b 100644 (file)
@@ -57,7 +57,7 @@ WebInspector.ElementsPanel = function()
         this.panel.updateEventListeners();
 
         if (this._focusedDOMNode) {
-            InspectorBackend.addInspectedNode(this._focusedDOMNode.id);
+            DOMAgent.addInspectedNode(this._focusedDOMNode.id);
             WebInspector.extensionServer.notifyObjectSelected(this.panel.name);
         }
     };
@@ -211,7 +211,7 @@ WebInspector.ElementsPanel.prototype = {
         }
 
         if (this._selectedPathOnReset)
-            InspectorBackend.pushNodeByPathToFrontend(this._selectedPathOnReset, selectLastSelectedNode.bind(this));
+            DOMAgent.pushNodeByPathToFrontend(this._selectedPathOnReset, selectLastSelectedNode.bind(this));
         else
             selectNode.call(this);
         delete this._selectedPathOnReset;
@@ -226,7 +226,7 @@ WebInspector.ElementsPanel.prototype = {
 
         this._currentSearchResultIndex = 0;
         this._searchResults = [];
-        InspectorBackend.searchCanceled();
+        DOMAgent.searchCanceled();
     },
 
     performSearch: function(query)
@@ -242,7 +242,7 @@ WebInspector.ElementsPanel.prototype = {
         this._matchesCountUpdateTimeout = null;
         this._searchQuery = query;
 
-        InspectorBackend.performSearch(whitespaceTrimmedQuery, false);
+        DOMAgent.performSearch(whitespaceTrimmedQuery, false);
     },
 
     populateHrefContextMenu: function(contextMenu, event, anchorElement)
@@ -1023,7 +1023,7 @@ WebInspector.ElementsPanel.prototype = {
             return;
         event.clipboardData.clearData();
         event.preventDefault();
-        InspectorBackend.copyNode(this.focusedDOMNode.id);
+        DOMAgent.copyNode(this.focusedDOMNode.id);
     },
 
     rightSidebarResizerDragStart: function(event)
@@ -1070,7 +1070,7 @@ WebInspector.ElementsPanel.prototype = {
 
     setSearchingForNode: function(enabled)
     {
-        InspectorBackend.setSearchingForNode(enabled, this._setSearchingForNode.bind(this));
+        InspectorAgent.setSearchingForNode(enabled, this._setSearchingForNode.bind(this));
     },
 
     toggleSearchingForNode: function()
index 56c3e75d0c0a09d1976504bfcdf64464ecfbef24..91afce426d74e03d303f1b77bf004a6452fdcf7f 100644 (file)
@@ -410,7 +410,7 @@ WebInspector.ElementsTreeElement.prototype = {
             else
                 this.tooltip = WebInspector.UIString("%d × %d pixels (Natural: %d × %d pixels)", properties.offsetWidth, properties.offsetHeight, properties.naturalWidth, properties.naturalHeight);
         }
-        InspectorBackend.getNodeProperties(node.id, ["naturalHeight", "naturalWidth", "offsetHeight", "offsetWidth"], setTooltip.bind(this));
+        DOMAgent.getNodeProperties(node.id, ["naturalHeight", "naturalWidth", "offsetHeight", "offsetWidth"], setTooltip.bind(this));
     },
 
     updateSelection: function()
@@ -1154,7 +1154,7 @@ WebInspector.ElementsTreeElement.prototype = {
             moveToNextAttributeIfNeeded.call(newTreeItem);
         }
 
-        InspectorBackend.changeTagName(this.representedObject.id, newText, changeTagNameCallback);
+        DOMAgent.changeTagName(this.representedObject.id, newText, changeTagNameCallback);
     },
 
     _textNodeEditingCommitted: function(element, newText)
@@ -1381,7 +1381,7 @@ WebInspector.ElementsTreeElement.prototype = {
             parentElement.adjustCollapsedRange(true);
         }
 
-        InspectorBackend.removeNode(this.representedObject.id, removeNodeCallback);
+        DOMAgent.removeNode(this.representedObject.id, removeNodeCallback);
     },
 
     _editAsHTML: function()
@@ -1408,15 +1408,15 @@ WebInspector.ElementsTreeElement.prototype = {
 
         function commitChange(value)
         {
-            InspectorBackend.setOuterHTML(node.id, value, selectNode);
+            DOMAgent.setOuterHTML(node.id, value, selectNode);
         }
 
-        InspectorBackend.getOuterHTML(node.id, this._startEditingAsHTML.bind(this, commitChange));
+        DOMAgent.getOuterHTML(node.id, this._startEditingAsHTML.bind(this, commitChange));
     },
 
     _copyHTML: function()
     {
-        InspectorBackend.copyNode(this.representedObject.id);
+        DOMAgent.copyNode(this.representedObject.id);
     },
 
     _highlightSearchResults: function()
index 144d55d38bcaa0c96451c2efb237a915a5cbba43..142b8c132e43bfa470083d3137f2cb89e4ce64b2 100644 (file)
@@ -95,7 +95,7 @@ WebInspector.ExtensionWatchSidebarPane.prototype = {
 
     setExpression: function(expression, title)
     {
-        InspectorBackend.evaluate(expression, "extension-watch", false, this._onEvaluate.bind(this, title));
+        RuntimeAgent.evaluate(expression, "extension-watch", false, this._onEvaluate.bind(this, title));
     },
 
     _onEvaluate: function(title, result)
index 7d33b731c2a257f6ea9b6085b6adb89ab5aaeec4..ba30f732779b5ff473076e0e09dd102e0750d600 100644 (file)
@@ -166,7 +166,7 @@ WebInspector.ExtensionServer.prototype = {
                     allHeaders[name] = headers[name];
             }
         }
-        InspectorBackend.setExtraHeaders(allHeaders);
+        NetworkAgent.setExtraHeaders(allHeaders);
     },
 
     _onCreatePanel: function(message, port)
@@ -255,9 +255,9 @@ WebInspector.ExtensionServer.prototype = {
     _onReload: function(message)
     {
         if (typeof message.userAgent === "string")
-            InspectorBackend.setUserAgentOverride(message.userAgent);
+            InspectorAgent.setUserAgentOverride(message.userAgent);
 
-        InspectorBackend.reloadPage(false);
+        InspectorAgent.reloadPage(false);
         return this._status.OK();
     },
 
@@ -273,7 +273,7 @@ WebInspector.ExtensionServer.prototype = {
             this._dispatchCallback(message.requestId, port, result);
         }
         var evalExpression = "JSON.stringify(eval(unescape('" + escape(message.expression) + "')));";
-        InspectorBackend.evaluate(evalExpression, "none", true, callback.bind(this));
+        RuntimeAgent.evaluate(evalExpression, "none", true, callback.bind(this));
     },
 
     _onRevealAndSelect: function(message)
index 44b95c323333e50ebf3da00962ead4d79c6c8766..87e02f73419c1438258241311821b77c6bee38f8 100644 (file)
@@ -1010,7 +1010,7 @@ WebInspector.HeapSnapshotProfileType.prototype = {
 
     buttonClicked: function()
     {
-        InspectorBackend.takeHeapSnapshot(false);
+        ProfilerAgent.takeHeapSnapshot(false);
     },
 
     get welcomeMessage()
index da043feb99855c817c6841a3bd45d97e25362a98..4c28a038da85e9457091863bd6fa2e26b01b3c73 100644 (file)
@@ -33,7 +33,7 @@ WebInspector.NetworkManager = function(resourceTreeModel)
     WebInspector.Object.call(this);
     this._resourceTreeModel = resourceTreeModel;
     this._dispatcher = new WebInspector.NetworkDispatcher(resourceTreeModel, this);
-    InspectorBackend.cachedResources(this._processCachedResources.bind(this));
+    NetworkAgent.cachedResources(this._processCachedResources.bind(this));
 }
 
 WebInspector.NetworkManager.EventTypes = {
@@ -48,7 +48,7 @@ WebInspector.NetworkManager.prototype = {
     {
         WebInspector.panels.network.clear();
         this._resourceTreeModel.reset();
-        InspectorBackend.cachedResources(this._processCachedResources.bind(this));
+        NetworkAgent.cachedResources(this._processCachedResources.bind(this));
     },
 
     requestContent: function(resource, base64Encode, callback)
@@ -57,7 +57,7 @@ WebInspector.NetworkManager.prototype = {
         {
             callback(success ? content : null);
         }
-        InspectorBackend.resourceContent(resource.loader.frameId, resource.url, base64Encode, callbackWrapper);
+        NetworkAgent.resourceContent(resource.loader.frameId, resource.url, base64Encode, callbackWrapper);
     },
 
     _processCachedResources: function(mainFramePayload)
index 085f4683afc531c02c1d155460915711c0d08bd3..e007eced62b2a654053ac02b6257a7c7430195a4 100644 (file)
@@ -1395,7 +1395,7 @@ WebInspector.NetworkDataGridNode.prototype = {
 
     _openInNewTab: function()
     {
-        InspectorBackend.openInInspectedWindow(this._resource.url);
+        InspectorAgent.openInInspectedWindow(this._resource.url);
     },
 
     get selectable()
index c325bf76aee019eae5e37902f34dc96bca01034f..335bf03288a9e8613117d431bc1ee63098572078 100644 (file)
@@ -94,7 +94,7 @@ WebInspector.CPUProfileView = function(profile)
         self._updatePercentButton();
     }
 
-    InspectorBackend.getProfile(this.profile.typeId, this.profile.uid, profileCallback);
+    ProfilerAgent.getProfile(this.profile.typeId, this.profile.uid, profileCallback);
 }
 
 WebInspector.CPUProfileView.prototype = {
@@ -593,9 +593,9 @@ WebInspector.CPUProfileType.prototype = {
         this._recording = !this._recording;
 
         if (this._recording)
-            InspectorBackend.startProfiling();
+            InspectorAgent.startProfiling();
         else
-            InspectorBackend.stopProfiling();
+            InspectorAgent.stopProfiling();
     },
 
     get welcomeMessage()
index b87ea7f53263f278a63309dd65159683babb8261..56c7f81db558524a40082be1bcf6b71fd1c902cd 100644 (file)
@@ -215,7 +215,7 @@ WebInspector.ProfilesPanel.prototype = {
 
     _clearProfiles: function()
     {
-        InspectorBackend.clearProfiles();
+        ProfilerAgent.clearProfiles();
         this._reset();
     },
 
@@ -351,7 +351,7 @@ WebInspector.ProfilesPanel.prototype = {
         sidebarParent.removeChild(profile._profilesTreeElement);
 
         if (!profile.isTemporary)
-            InspectorBackend.removeProfile(profile.typeId, profile.uid);
+            ProfilerAgent.removeProfile(profile.typeId, profile.uid);
 
         // No other item will be selected if there aren't any other profiles, so
         // make sure that view gets cleared when the last profile is removed.
@@ -424,7 +424,7 @@ WebInspector.ProfilesPanel.prototype = {
             profile._callbacks = [callback];
             profile._json = "";
             profile.sideBarElement.subtitle = WebInspector.UIString("Loading…");
-            InspectorBackend.getProfile(profile.typeId, profile.uid);
+            ProfilerAgent.getProfile(profile.typeId, profile.uid);
         }
     },
 
@@ -592,10 +592,10 @@ WebInspector.ProfilesPanel.prototype = {
     {
         if (this._profilerEnabled) {
             WebInspector.settings.profilerEnabled = false;
-            InspectorBackend.disableProfiler(true);
+            InspectorAgent.disableProfiler(true);
         } else {
             WebInspector.settings.profilerEnabled = !!optionalAlways;
-            InspectorBackend.enableProfiler();
+            InspectorAgent.enableProfiler();
         }
     },
 
@@ -612,7 +612,7 @@ WebInspector.ProfilesPanel.prototype = {
                    this._addProfileHeader(profileHeaders[i]);
         }
 
-        InspectorBackend.getProfileHeaders(populateCallback.bind(this));
+        ProfilerAgent.getProfileHeaders(populateCallback.bind(this));
 
         this._profilesWereRequested = true;
     },
@@ -658,7 +658,7 @@ WebInspector.ProfilesPanel.prototype = {
             }
             this._addProfileHeader(this._temporaryTakingSnapshot);
         }
-        InspectorBackend.takeHeapSnapshot(detailed);
+        ProfilerAgent.takeHeapSnapshot(detailed);
     },
 
     _reportHeapSnapshotProgress: function(done, total)
index a1e37bc22044f9e4fd1a0a2c165b9f3b9983d331..4cc4b69bbd692ab49e78a8ff512d053c8aba4924 100644 (file)
@@ -59,7 +59,7 @@ WebInspector.PropertiesSidebarPane.prototype = {
                 body.appendChild(section.element);
             }
         }
-        InspectorBackend.getNodePrototypes(node.id, callback.bind(this));
+        DOMAgent.getNodePrototypes(node.id, callback.bind(this));
     }
 }
 
index 10af2e33221b989ea5a5136c24251482bd540bc1..eb70d6001ae280404cb554b71d78ca001f83ea35 100644 (file)
@@ -52,7 +52,7 @@ WebInspector.RemoteObject.resolveNode = function(node, callback)
     {
         callback(object ? WebInspector.RemoteObject.fromPayload(object) : null);
     }
-    InspectorBackend.resolveNode(node.id, mycallback);
+    DOMAgent.resolveNode(node.id, mycallback);
 }
 
 WebInspector.RemoteObject.fromPayload = function(payload)
@@ -118,7 +118,7 @@ WebInspector.RemoteObject.prototype = {
                 properties[i].value = WebInspector.RemoteObject.fromPayload(properties[i].value);
             callback(properties);
         }
-        InspectorBackend.getProperties(this._objectId, !!ignoreHasOwnProperty, abbreviate, remoteObjectBinder);
+        RuntimeAgent.getProperties(this._objectId, !!ignoreHasOwnProperty, abbreviate, remoteObjectBinder);
     },
 
     setPropertyValue: function(name, value, callback)
@@ -127,12 +127,12 @@ WebInspector.RemoteObject.prototype = {
             callback(false);
             return;
         }
-        InspectorBackend.setPropertyValue(this._objectId, name, value, callback);
+        RuntimeAgent.setPropertyValue(this._objectId, name, value, callback);
     },
 
     pushNodeToFrontend: function(callback)
     {
-        InspectorBackend.pushNodeToFrontend(this._objectId, callback);
+        DOMAgent.pushNodeToFrontend(this._objectId, callback);
     }
 }
 
index 7c0649ff916f0c34b7dc7b36e15e5310433a8556..3c858920f75afd79205e8247d209d58d1e193406 100644 (file)
@@ -904,7 +904,7 @@ WebInspector.FrameTreeElement.prototype = {
         this._storagePanel.showCategoryView(this._displayName);
 
         this.listItemElement.removeStyleClass("hovered");
-        InspectorBackend.hideFrameHighlight();
+        InspectorAgent.hideFrameHighlight();
     },
 
     get displayName()
@@ -937,10 +937,10 @@ WebInspector.FrameTreeElement.prototype = {
     {
         if (hovered) {
             this.listItemElement.addStyleClass("hovered");
-            InspectorBackend.highlightFrame(this._frameId);
+            InspectorAgent.highlightFrame(this._frameId);
         } else {
             this.listItemElement.removeStyleClass("hovered");
-            InspectorBackend.hideFrameHighlight();
+            InspectorAgent.hideFrameHighlight();
         }
     }
 }
@@ -969,7 +969,7 @@ WebInspector.FrameResourceTreeElement.prototype = {
 
     ondblclick: function(event)
     {
-        InspectorBackend.openInInspectedWindow(this._resource.url);
+        InspectorAgent.openInInspectedWindow(this._resource.url);
     },
 
     onattach: function()
index 8d3eabf2cb5e731a2be396eaef36f55402e3d7e0..3f27485a076f358c8a303662a5f717ee42a69edd 100644 (file)
@@ -120,6 +120,6 @@ WebInspector.Script.prototype = {
             this._source = source;
             callback(this._source);
         }
-        InspectorBackend.getScriptSource(this.sourceID, didGetScriptSource.bind(this));
+        DebuggerAgent.getScriptSource(this.sourceID, didGetScriptSource.bind(this));
     }
 }
index 3b24d456870fb4062bea09862424a77993914f14..c35a547034923dd53dabdfaa5e887305461e5771 100644 (file)
@@ -362,7 +362,7 @@ WebInspector.ScriptsPanel.prototype = {
                     this.sidebarPanes.scopechain.update(selectedCallFrame);
             }
         }
-        InspectorBackend.evaluateOnCallFrame(selectedCallFrame.id, code, objectGroup, includeCommandLineAPI, updatingCallbackWrapper.bind(this));
+        DebuggerAgent.evaluateOnCallFrame(selectedCallFrame.id, code, objectGroup, includeCommandLineAPI, updatingCallbackWrapper.bind(this));
     },
 
     _debuggerPaused: function(event)
@@ -747,7 +747,7 @@ WebInspector.ScriptsPanel.prototype = {
             this._pauseOnExceptionButton.state = pauseOnExceptionsState;
             WebInspector.settings.pauseOnExceptionState = pauseOnExceptionsState;
         }
-        InspectorBackend.setPauseOnExceptionsState(pauseOnExceptionsState, callback.bind(this));
+        DebuggerAgent.setPauseOnExceptionsState(pauseOnExceptionsState, callback.bind(this));
     },
 
     _updateDebuggerButtons: function()
@@ -865,11 +865,11 @@ WebInspector.ScriptsPanel.prototype = {
         if (this._paused) {
             this._paused = false;
             this._waitingToPause = false;
-            InspectorBackend.resume();
+            DebuggerAgent.resume();
         } else {
             this._stepping = false;
             this._waitingToPause = true;
-            InspectorBackend.pause();
+            DebuggerAgent.pause();
         }
 
         this._clearInterface();
@@ -882,7 +882,7 @@ WebInspector.ScriptsPanel.prototype = {
 
         this._clearInterface();
 
-        InspectorBackend.stepOver();
+        DebuggerAgent.stepOver();
     },
 
     _stepIntoClicked: function()
@@ -892,7 +892,7 @@ WebInspector.ScriptsPanel.prototype = {
 
         this._clearInterface();
 
-        InspectorBackend.stepInto();
+        DebuggerAgent.stepInto();
     },
 
     _stepOutClicked: function()
@@ -902,18 +902,18 @@ WebInspector.ScriptsPanel.prototype = {
 
         this._clearInterface();
 
-        InspectorBackend.stepOut();
+        DebuggerAgent.stepOut();
     },
 
     toggleBreakpointsClicked: function()
     {
         this.toggleBreakpointsButton.toggled = !this.toggleBreakpointsButton.toggled;
         if (this.toggleBreakpointsButton.toggled) {
-            InspectorBackend.activateBreakpoints();
+            DebuggerAgent.activateBreakpoints();
             this.toggleBreakpointsButton.title = WebInspector.UIString("Deactivate all breakpoints.");
             document.getElementById("main-panels").removeStyleClass("breakpoints-deactivated");
         } else {
-            InspectorBackend.deactivateBreakpoints();
+            DebuggerAgent.deactivateBreakpoints();
             this.toggleBreakpointsButton.title = WebInspector.UIString("Activate all breakpoints.");
             document.getElementById("main-panels").addStyleClass("breakpoints-deactivated");
         }
index 6b4b3b3bd3461aa95cf159fa6bacd196f1471903..f35db2a3c965025de09d5cb3867d043d00f5b673 100644 (file)
@@ -684,7 +684,7 @@ WebInspector.SourceFrame.prototype = {
 
         this._popup.hide();
         delete this._popup;
-        InspectorBackend.releaseWrapperObjectGroup(0, this._popoverObjectGroup);
+        RuntimeAgent.releaseWrapperObjectGroup(0, this._popoverObjectGroup);
     },
 
     _mouseHover: function(element)
index 3bfe28c04f8b5e84405c53ffd84c86dfeb2eab04..0967027b740d3b7a208a0913f7a2543b5ad5e2ee 100644 (file)
@@ -46,7 +46,7 @@ WebInspector.TestController.prototype = {
         if (typeof result === "undefined" && this.results.length)
             result = this.results;
         var message = typeof result === "undefined" ? "\"<undefined>\"" : JSON.stringify(result);
-        InspectorBackend.didEvaluateForTestInFrontend(this._callId, message);
+        InspectorAgent.didEvaluateForTestInFrontend(this._callId, message);
     },
 
     runAfterPendingDispatches: function(callback)
index 1d8b9c9c98b853c234b9a75b3af36e9007f906a2..fe9e8c83e07b47457c94c44fa48931b7ef28814e 100644 (file)
@@ -270,10 +270,10 @@ WebInspector.TimelinePanel.prototype = {
     _toggleTimelineButtonClicked: function()
     {
         if (this.toggleTimelineButton.toggled)
-            InspectorBackend.stopTimelineProfiler();
+            InspectorAgent.stopTimelineProfiler();
         else {
             this._clearPanel();
-            InspectorBackend.startTimelineProfiler();
+            InspectorAgent.startTimelineProfiler();
         }
     },
 
index a6f59ca5f8fb7574730a6e3e4958579c40ed2b55..9db2e003048a29cb432c11f2550feea284173bbf 100644 (file)
@@ -120,7 +120,7 @@ WebInspector.WatchExpressionsSection.prototype = {
         }
 
         // TODO: pass exact injected script id.
-        InspectorBackend.releaseWrapperObjectGroup(0, this._watchObjectGroupId)
+        RuntimeAgent.releaseWrapperObjectGroup(0, this._watchObjectGroupId)
         var properties = [];
 
         // Count the properties, so we known when to call this.updateProperties()
index b254f3c604c22c232d5ac57feb81d9f37e18b5ad..efdb936a4efbe419372f5d9957ef8038c3ef7e9b 100644 (file)
@@ -74,9 +74,9 @@ WebInspector.WorkersSidebarPane.prototype = {
 
     setInstrumentation: function(enabled)
     {
-        InspectorBackend.removeAllScriptsToEvaluateOnLoad();
+        InspectorAgent.removeAllScriptsToEvaluateOnLoad();
         if (enabled)
-            InspectorBackend.addScriptToEvaluateOnLoad("(" + InjectedFakeWorker + ")");
+            InspectorAgent.addScriptToEvaluateOnLoad("(" + InjectedFakeWorker + ")");
     },
 
     reset: function()
index 09592897f92745c47c5a69afd75d37babdc2307d..62868e9a4e0bb6704c004ce6fc70707e3cdb82fd 100644 (file)
@@ -360,9 +360,9 @@ var WebInspector = {
 
         this._highlightedDOMNodeId = nodeId;
         if (nodeId)
-            InspectorBackend.highlightDOMNode(nodeId);
+            InspectorAgent.highlightDOMNode(nodeId);
         else
-            InspectorBackend.hideDOMNodeHighlight();
+            InspectorAgent.hideDOMNodeHighlight();
     },
 
     highlightDOMNodeForTwoSeconds: function(nodeId)
@@ -550,23 +550,23 @@ WebInspector.doLoadedDone = function()
         if (!WebInspector.currentPanel)
             WebInspector.showPanel(WebInspector.settings.lastActivePanel);
     }
-    InspectorBackend.populateScriptObjects(onPopulateScriptObjects);
+    InspectorAgent.populateScriptObjects(onPopulateScriptObjects);
 
     if (Preferences.debuggerAlwaysEnabled || WebInspector.settings.debuggerEnabled)
         this.debuggerModel.enableDebugger();
     if (Preferences.profilerAlwaysEnabled || WebInspector.settings.profilerEnabled)
-        InspectorBackend.enableProfiler();
+        InspectorAgent.enableProfiler();
     if (WebInspector.settings.monitoringXHREnabled)
-        InspectorBackend.setMonitoringXHREnabled(true);
+        ConsoleAgent.setMonitoringXHREnabled(true);
 
-    InspectorBackend.setConsoleMessagesEnabled(true);
+    ConsoleAgent.setConsoleMessagesEnabled(true);
 
     function propertyNamesCallback(names)
     {
         WebInspector.cssNameCompletions = new WebInspector.CSSCompletions(names);
     }
     // As a DOMAgent method, this needs to happen after the frontend has loaded and the agent is available.
-    InspectorBackend.getSupportedCSSProperties(propertyNamesCallback);
+    CSSAgent.getSupportedCSSProperties(propertyNamesCallback);
 }
 
 WebInspector.addPanelToolbarIcon = function(toolbarElement, panel, previousToolbarItem)
@@ -727,7 +727,7 @@ WebInspector.openResource = function(resourceURL, inResourcesPanel)
         WebInspector.panels.resources.showResource(resource);
         WebInspector.showPanel("resources");
     } else
-        InspectorBackend.openInInspectedWindow(resource ? resource.url : resourceURL);
+        InspectorAgent.openInInspectedWindow(resource ? resource.url : resourceURL);
 }
 
 WebInspector._registerShortcuts = function()
@@ -875,13 +875,13 @@ WebInspector.documentKeyDown = function(event)
 
         case "U+0052": // R key
             if ((event.metaKey && isMac) || (event.ctrlKey && !isMac)) {
-                InspectorBackend.reloadPage(event.shiftKey);
+                InspectorAgent.reloadPage(event.shiftKey);
                 event.preventDefault();
             }
             break;
         case "F5":
             if (!isMac)
-                InspectorBackend.reloadPage(event.ctrlKey || event.shiftKey);
+                InspectorAgent.reloadPage(event.ctrlKey || event.shiftKey);
             break;
     }
 }