Web Inspector: register context menu providers for lazily loaded panels.
authorpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 14:59:13 +0000 (14:59 +0000)
committerpfeldman@chromium.org <pfeldman@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 14:59:13 +0000 (14:59 +0000)
https://bugs.webkit.org/show_bug.cgi?id=94812

Reviewed by Alexander Pavlov.

- Panel descriptors now register providers that lazily load panels on demand.
- Removed custom profiles context provider infrastructure in favor of generic one.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/NetworkPanel.js:
(WebInspector.NetworkPanel):
* inspector/front-end/NetworkPanelDescriptor.js: Added.
(WebInspector.NetworkPanelDescriptor):
(WebInspector.NetworkPanelDescriptor.prototype.appendApplicableItems):
* inspector/front-end/ObjectPropertiesSection.js:
(WebInspector.ObjectPropertiesSection.prototype._contextMenuEventFired):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel):
(WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
(WebInspector.ProfilesPanel.prototype.appendApplicableItems.didReceiveHeapObjectId):
(WebInspector.ProfilesPanel.prototype.appendApplicableItems):
* inspector/front-end/ScriptsPanel.js:
(WebInspector.ScriptsPanel):
* inspector/front-end/ScriptsPanelDescriptor.js: Added.
(WebInspector.ScriptsPanelDescriptor):
(WebInspector.ScriptsPanelDescriptor.prototype.appendApplicableItems):
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
* inspector/front-end/inspector.js:
(WebInspector._panelDescriptors):

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

14 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/inspector/compile-front-end.py
Source/WebCore/inspector/front-end/NetworkPanel.js
Source/WebCore/inspector/front-end/NetworkPanelDescriptor.js [new file with mode: 0644]
Source/WebCore/inspector/front-end/ObjectPropertiesSection.js
Source/WebCore/inspector/front-end/ProfilesPanel.js
Source/WebCore/inspector/front-end/ScriptsPanel.js
Source/WebCore/inspector/front-end/ScriptsPanelDescriptor.js [new file with mode: 0644]
Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js
Source/WebCore/inspector/front-end/WebKit.qrc
Source/WebCore/inspector/front-end/inspector.html
Source/WebCore/inspector/front-end/inspector.js

index 6a72923..851c871 100644 (file)
@@ -1,3 +1,38 @@
+2012-08-23  Pavel Feldman  <pfeldman@chromium.org>
+
+        Web Inspector: register context menu providers for lazily loaded panels.
+        https://bugs.webkit.org/show_bug.cgi?id=94812
+
+        Reviewed by Alexander Pavlov.
+
+        - Panel descriptors now register providers that lazily load panels on demand.
+        - Removed custom profiles context provider infrastructure in favor of generic one.
+
+        * WebCore.gypi:
+        * WebCore.vcproj/WebCore.vcproj:
+        * inspector/compile-front-end.py:
+        * inspector/front-end/NetworkPanel.js:
+        (WebInspector.NetworkPanel):
+        * inspector/front-end/NetworkPanelDescriptor.js: Added.
+        (WebInspector.NetworkPanelDescriptor):
+        (WebInspector.NetworkPanelDescriptor.prototype.appendApplicableItems):
+        * inspector/front-end/ObjectPropertiesSection.js:
+        (WebInspector.ObjectPropertiesSection.prototype._contextMenuEventFired):
+        * inspector/front-end/ProfilesPanel.js:
+        (WebInspector.ProfilesPanel):
+        (WebInspector.ProfilesPanel.prototype._reportHeapSnapshotProgress):
+        (WebInspector.ProfilesPanel.prototype.appendApplicableItems.didReceiveHeapObjectId):
+        (WebInspector.ProfilesPanel.prototype.appendApplicableItems):
+        * inspector/front-end/ScriptsPanel.js:
+        (WebInspector.ScriptsPanel):
+        * inspector/front-end/ScriptsPanelDescriptor.js: Added.
+        (WebInspector.ScriptsPanelDescriptor):
+        (WebInspector.ScriptsPanelDescriptor.prototype.appendApplicableItems):
+        * inspector/front-end/WebKit.qrc:
+        * inspector/front-end/inspector.html:
+        * inspector/front-end/inspector.js:
+        (WebInspector._panelDescriptors):
+
 2012-08-23  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed. Fix make distcheck.
 2012-08-23  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed. Fix make distcheck.
index 8fc5786..f629de9 100644 (file)
             'inspector/front-end/NativeBreakpointsSidebarPane.js',
             'inspector/front-end/NetworkManager.js',
             'inspector/front-end/NetworkLog.js',
             'inspector/front-end/NativeBreakpointsSidebarPane.js',
             'inspector/front-end/NetworkManager.js',
             'inspector/front-end/NetworkLog.js',
+            'inspector/front-end/NetworkPanelDescriptor.js',
             'inspector/front-end/NetworkRequest.js',
             'inspector/front-end/Object.js',
             'inspector/front-end/ObjectPopoverHelper.js',
             'inspector/front-end/NetworkRequest.js',
             'inspector/front-end/Object.js',
             'inspector/front-end/ObjectPopoverHelper.js',
             'inspector/front-end/ScriptFormatter.js',
             'inspector/front-end/ScriptFormatterWorker.js',
             'inspector/front-end/ScriptSnippetModel.js',
             'inspector/front-end/ScriptFormatter.js',
             'inspector/front-end/ScriptFormatterWorker.js',
             'inspector/front-end/ScriptSnippetModel.js',
+            'inspector/front-end/ScriptsPanelDescriptor.js',
             'inspector/front-end/SearchController.js',
             'inspector/front-end/ShortcutsScreen.js',
             'inspector/front-end/SettingsScreen.js',
             'inspector/front-end/SearchController.js',
             'inspector/front-end/ShortcutsScreen.js',
             'inspector/front-end/SettingsScreen.js',
index 90561a7..f57e0cb 100755 (executable)
                                        >
                                </File>
                                <File
                                        >
                                </File>
                                <File
+                                       RelativePath="..\inspector\front-end\NetworkPanelDescriptor.js"
+                                       >
+                               </File>
+                               <File
                                        RelativePath="..\inspector\front-end\NetworkRequest.js"
                                        >
                                </File>
                                        RelativePath="..\inspector\front-end\NetworkRequest.js"
                                        >
                                </File>
                                        >
                                </File>
                                <File
                                        >
                                </File>
                                <File
+                                       RelativePath="..\inspector\front-end\ScriptsPanelDescriptor.js"
+                                       >
+                               </File>
+                               <File
                                        RelativePath="..\inspector\front-end\ScriptsSearchScope.js"
                                        >
                                </File>
                                        RelativePath="..\inspector\front-end\ScriptsSearchScope.js"
                                        >
                                </File>
index 4491319..f314ead 100755 (executable)
@@ -197,6 +197,7 @@ modules = [
             "ResourceView.js",
             "ResourceWebSocketFrameView.js",
             "NetworkPanel.js",
             "ResourceView.js",
             "ResourceWebSocketFrameView.js",
             "NetworkPanel.js",
+            "NetworkPanelDescriptor.js",
         ]
     },
     {
         ]
     },
     {
@@ -229,6 +230,7 @@ modules = [
             "ScopeChainSidebarPane.js",
             "ScriptsNavigator.js",
             "ScriptsPanel.js",
             "ScopeChainSidebarPane.js",
             "ScriptsNavigator.js",
             "ScriptsPanel.js",
+            "ScriptsPanelDescriptor.js",
             "ScriptsSearchScope.js",
             "SnippetJavaScriptSourceFrame.js",
             "StyleSheetOutlineDialog.js",
             "ScriptsSearchScope.js",
             "SnippetJavaScriptSourceFrame.js",
             "StyleSheetOutlineDialog.js",
index 697fd0d..6aa5fc9 100644 (file)
@@ -1308,7 +1308,6 @@ WebInspector.NetworkPanel = function()
         return this.visibleView;
     }
     WebInspector.GoToLineDialog.install(this, viewGetter.bind(this));
         return this.visibleView;
     }
     WebInspector.GoToLineDialog.install(this, viewGetter.bind(this));
-    WebInspector.ContextMenu.registerProvider(this);
 }
 
 WebInspector.NetworkPanel.prototype = {
 }
 
 WebInspector.NetworkPanel.prototype = {
diff --git a/Source/WebCore/inspector/front-end/NetworkPanelDescriptor.js b/Source/WebCore/inspector/front-end/NetworkPanelDescriptor.js
new file mode 100644 (file)
index 0000000..4a4fecf
--- /dev/null
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. AND ITS CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC.
+ * OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+/**
+ * @constructor
+ * @extends {WebInspector.PanelDescriptor}
+ * @implements {WebInspector.ContextMenu.Provider}
+ */
+WebInspector.NetworkPanelDescriptor = function()
+{
+    WebInspector.PanelDescriptor.call(this, "network", WebInspector.UIString("Network"), "NetworkPanel", "NetworkPanel.js");
+    WebInspector.ContextMenu.registerProvider(this);
+}
+
+WebInspector.NetworkPanelDescriptor.prototype = {
+    /** 
+     * @param {WebInspector.ContextMenu} contextMenu
+     * @param {Object} target
+     */
+    appendApplicableItems: function(contextMenu, target)
+    {
+        if (!(target instanceof WebInspector.NetworkRequest))
+            return;
+        this.panel().appendApplicableItems(contextMenu, target);
+    }
+}
+
+WebInspector.NetworkPanelDescriptor.prototype.__proto__ = WebInspector.PanelDescriptor.prototype;
index ea3b448..f1c5069 100644 (file)
@@ -27,7 +27,7 @@
 /**
  * @constructor
  * @extends {WebInspector.PropertiesSection}
 /**
  * @constructor
  * @extends {WebInspector.PropertiesSection}
- * @param {WebInspector.RemoteObject=} object
+ * @param {WebInspector.RemoteObject} object
  * @param {string|Element=} title
  * @param {string=} subtitle
  * @param {string=} emptyPlaceholder
  * @param {string|Element=} title
  * @param {string=} subtitle
  * @param {string=} emptyPlaceholder
@@ -50,38 +50,6 @@ WebInspector.ObjectPropertiesSection = function(object, title, subtitle, emptyPl
 
 WebInspector.ObjectPropertiesSection._arrayLoadThreshold = 100;
 
 
 WebInspector.ObjectPropertiesSection._arrayLoadThreshold = 100;
 
-
-/**
- * @interface
- */
-WebInspector.ObjectPropertiesSection.ContextMenuProvider = function()
-{
-}
-
-WebInspector.ObjectPropertiesSection.ContextMenuProvider.prototype = {
-    /**
-     * @param {WebInspector.ObjectPropertiesSection} section
-     * @param {WebInspector.ContextMenu} contextMenu
-     */
-    populateContextMenu: function(section, contextMenu)
-    {
-    }
-}
-
-
-/**
- * @type {Array.<WebInspector.ObjectPropertiesSection.ContextMenuProvider>}
- */
-WebInspector.ObjectPropertiesSection._contextMenuProviers = [];
-
-/**
- * @param {WebInspector.ObjectPropertiesSection.ContextMenuProvider} provider
- */
-WebInspector.ObjectPropertiesSection.addContextMenuProvider = function(provider)
-{
-    WebInspector.ObjectPropertiesSection._contextMenuProviers.push(provider);
-}
-
 WebInspector.ObjectPropertiesSection.prototype = {
     enableContextMenu: function()
     {
 WebInspector.ObjectPropertiesSection.prototype = {
     enableContextMenu: function()
     {
@@ -91,9 +59,7 @@ WebInspector.ObjectPropertiesSection.prototype = {
     _contextMenuEventFired: function(event)
     {
         var contextMenu = new WebInspector.ContextMenu();
     _contextMenuEventFired: function(event)
     {
         var contextMenu = new WebInspector.ContextMenu();
-        var providers = WebInspector.ObjectPropertiesSection._contextMenuProviers;
-        for (var i = 0; i < providers.length; i++)
-            providers[i].populateContextMenu(this, contextMenu);
+        contextMenu.appendApplicableItems(this.object);
         if (!contextMenu.isEmpty())
             contextMenu.show(event);
     },
         if (!contextMenu.isEmpty())
             contextMenu.show(event);
     },
index 785bbb1..09b0fb9 100644 (file)
@@ -183,6 +183,7 @@ WebInspector.ProfileHeader.prototype = {
 /**
  * @constructor
  * @extends {WebInspector.Panel}
 /**
  * @constructor
  * @extends {WebInspector.Panel}
+ * @implements {WebInspector.ContextMenu.Provider}
  */
 WebInspector.ProfilesPanel = function()
 {
  */
 WebInspector.ProfilesPanel = function()
 {
@@ -253,7 +254,7 @@ WebInspector.ProfilesPanel = function()
     this._createFileSelectorElement();
     this.element.addEventListener("contextmenu", this._handleContextMenuEvent.bind(this), true);
 
     this._createFileSelectorElement();
     this.element.addEventListener("contextmenu", this._handleContextMenuEvent.bind(this), true);
 
-    WebInspector.ObjectPropertiesSection.addContextMenuProvider(new WebInspector.RevealInHeapSnapshotContextMenuProvider());
+    WebInspector.ContextMenu.registerProvider(this);
 }
 
 WebInspector.ProfilesPanel.prototype = {
 }
 
 WebInspector.ProfilesPanel.prototype = {
@@ -1074,36 +1075,23 @@ WebInspector.ProfilesPanel.prototype = {
             if (done >= total)
                 this._removeTemporaryProfile(WebInspector.HeapSnapshotProfileType.TypeId);
         }
             if (done >= total)
                 this._removeTemporaryProfile(WebInspector.HeapSnapshotProfileType.TypeId);
         }
-    }
-}
-
-WebInspector.ProfilesPanel.prototype.__proto__ = WebInspector.Panel.prototype;
-
-
-/**
- * @implements {WebInspector.ObjectPropertiesSection.ContextMenuProvider}
- * @constructor
- */
-WebInspector.RevealInHeapSnapshotContextMenuProvider = function()
-{
-}
+    },
 
 
-WebInspector.RevealInHeapSnapshotContextMenuProvider.prototype = {
-    /**
-     * @override
-     * @param {WebInspector.ObjectPropertiesSection} section
+    /** 
      * @param {WebInspector.ContextMenu} contextMenu
      * @param {WebInspector.ContextMenu} contextMenu
+     * @param {Object} target
      */
      */
-    populateContextMenu: function(section, contextMenu)
+    appendApplicableItems: function(contextMenu, target)
     {
     {
-        if (WebInspector.inspectorView.currentPanel() !== WebInspector.ProfilesPanel._instance)
+        if (WebInspector.inspectorView.currentPanel() !== this)
             return;
 
             return;
 
-        var objectId = section.object.objectId;
+        var object = /** @type {WebInspector.RemoteObject} */ target;
+        var objectId = object.objectId;
         if (!objectId)
             return;
 
         if (!objectId)
             return;
 
-        var heapProfiles = WebInspector.ProfilesPanel._instance.getProfiles(WebInspector.HeapSnapshotProfileType.TypeId);
+        var heapProfiles = this.getProfiles(WebInspector.HeapSnapshotProfileType.TypeId);
         if (!heapProfiles.length)
             return;
 
         if (!heapProfiles.length)
             return;
 
@@ -1114,10 +1102,10 @@ WebInspector.RevealInHeapSnapshotContextMenuProvider.prototype = {
 
         function didReceiveHeapObjectId(viewName, error, result)
         {
 
         function didReceiveHeapObjectId(viewName, error, result)
         {
-            if (WebInspector.inspectorView.currentPanel() !== WebInspector.ProfilesPanel._instance)
+            if (WebInspector.inspectorView.currentPanel() !== this)
                 return;
             if (!error)
                 return;
             if (!error)
-                WebInspector.ProfilesPanel._instance.showObject(result, viewName);
+                this.showObject(result, viewName);
         }
 
         contextMenu.appendItem(WebInspector.UIString("Reveal in Dominators View"), revealInView.bind(this, "Dominators"));
         }
 
         contextMenu.appendItem(WebInspector.UIString("Reveal in Dominators View"), revealInView.bind(this, "Dominators"));
@@ -1125,6 +1113,7 @@ WebInspector.RevealInHeapSnapshotContextMenuProvider.prototype = {
     }
 }
 
     }
 }
 
+WebInspector.ProfilesPanel.prototype.__proto__ = WebInspector.Panel.prototype;
 
 /**
  * @constructor
 
 /**
  * @constructor
index 08bd66a..49dad89 100644 (file)
@@ -199,7 +199,6 @@ WebInspector.ScriptsPanel = function(workspaceForTest)
     this._workspace.addEventListener(WebInspector.Workspace.Events.WorkspaceReset, this._reset.bind(this), this);
 
     WebInspector.advancedSearchController.registerSearchScope(new WebInspector.ScriptsSearchScope(this._workspace));
     this._workspace.addEventListener(WebInspector.Workspace.Events.WorkspaceReset, this._reset.bind(this), this);
 
     WebInspector.advancedSearchController.registerSearchScope(new WebInspector.ScriptsSearchScope(this._workspace));
-    WebInspector.ContextMenu.registerProvider(this);
 }
 
 WebInspector.ScriptsPanel.prototype = {
 }
 
 WebInspector.ScriptsPanel.prototype = {
diff --git a/Source/WebCore/inspector/front-end/ScriptsPanelDescriptor.js b/Source/WebCore/inspector/front-end/ScriptsPanelDescriptor.js
new file mode 100644 (file)
index 0000000..01a873e
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2012 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. AND ITS CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GOOGLE INC.
+ * OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @constructor
+ * @extends {WebInspector.PanelDescriptor}
+ * @implements {WebInspector.ContextMenu.Provider}
+ */
+WebInspector.ScriptsPanelDescriptor = function()
+{
+    WebInspector.PanelDescriptor.call(this, "scripts", WebInspector.UIString("Sources"), "ScriptsPanel", "ScriptsPanel.js");
+    WebInspector.ContextMenu.registerProvider(this);
+}
+
+WebInspector.ScriptsPanelDescriptor.prototype = {
+    /** 
+     * @param {WebInspector.ContextMenu} contextMenu
+     * @param {Object} target
+     */
+    appendApplicableItems: function(contextMenu, target)
+    {
+        if (!(target instanceof WebInspector.UISourceCode))
+            return;
+        this.panel().appendApplicableItems(contextMenu, target);
+    }
+}
+
+WebInspector.ScriptsPanelDescriptor.prototype.__proto__ = WebInspector.PanelDescriptor.prototype;
index 245fb2e..caed4f9 100644 (file)
@@ -123,7 +123,7 @@ WebInspector.WatchExpressionsSection = function()
 {
     this._watchObjectGroupId = "watch-group";
 
 {
     this._watchObjectGroupId = "watch-group";
 
-    WebInspector.ObjectPropertiesSection.call(this);
+    WebInspector.ObjectPropertiesSection.call(this, WebInspector.RemoteObject.fromPrimitiveValue(""));
 
     this.emptyElement = document.createElement("div");
     this.emptyElement.className = "info";
 
     this.emptyElement = document.createElement("div");
     this.emptyElement.className = "info";
index c9c8497..e55b2fe 100644 (file)
     <file>NetworkLog.js</file>
     <file>NetworkManager.js</file>
     <file>NetworkPanel.js</file>
     <file>NetworkLog.js</file>
     <file>NetworkManager.js</file>
     <file>NetworkPanel.js</file>
+    <file>NetworkPanelDescriptor.js</file>
     <file>NetworkRequest.js</file>
     <file>Object.js</file>
     <file>ObjectPopoverHelper.js</file>
     <file>NetworkRequest.js</file>
     <file>Object.js</file>
     <file>ObjectPopoverHelper.js</file>
     <file>ScriptFormatterWorker.js</file>
     <file>ScriptSnippetModel.js</file>
     <file>ScriptsPanel.js</file>
     <file>ScriptFormatterWorker.js</file>
     <file>ScriptSnippetModel.js</file>
     <file>ScriptsPanel.js</file>
+    <file>ScriptsPanelDescriptor.js</file>
     <file>ScriptsNavigator.js</file>
     <file>ScriptsSearchScope.js</file>
     <file>SearchController.js</file>
     <file>ScriptsNavigator.js</file>
     <file>ScriptsSearchScope.js</file>
     <file>SearchController.js</file>
index 5fdd2b4..a2aeb97 100644 (file)
@@ -158,6 +158,8 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     <script type="text/javascript" src="ScriptSnippetModel.js"></script>
     <script type="text/javascript" src="ProgressBar.js"></script>
     <script type="text/javascript" src="StyleSource.js"></script>
     <script type="text/javascript" src="ScriptSnippetModel.js"></script>
     <script type="text/javascript" src="ProgressBar.js"></script>
     <script type="text/javascript" src="StyleSource.js"></script>
+    <script type="text/javascript" src="NetworkPanelDescriptor.js"></script>
+    <script type="text/javascript" src="ScriptsPanelDescriptor.js"></script>
 </head>
 <body class="detached" id="-webkit-web-inspector">
     <div id="toolbar">
 </head>
 <body class="detached" id="-webkit-web-inspector">
     <div id="toolbar">
index e055d11..28dfa2e 100644 (file)
@@ -39,8 +39,8 @@ var WebInspector = {
 
         var elements = new WebInspector.PanelDescriptor("elements", WebInspector.UIString("Elements"), "ElementsPanel", "ElementsPanel.js");
         var resources = new WebInspector.PanelDescriptor("resources", WebInspector.UIString("Resources"), "ResourcesPanel", "ResourcesPanel.js");
 
         var elements = new WebInspector.PanelDescriptor("elements", WebInspector.UIString("Elements"), "ElementsPanel", "ElementsPanel.js");
         var resources = new WebInspector.PanelDescriptor("resources", WebInspector.UIString("Resources"), "ResourcesPanel", "ResourcesPanel.js");
-        var network = new WebInspector.PanelDescriptor("network", WebInspector.UIString("Network"), "NetworkPanel", "NetworkPanel.js");
-        var scripts = new WebInspector.PanelDescriptor("scripts", WebInspector.UIString("Sources"), "ScriptsPanel", "ScriptsPanel.js");
+        var network = new WebInspector.NetworkPanelDescriptor();
+        var scripts = new WebInspector.ScriptsPanelDescriptor();
         var timeline = new WebInspector.PanelDescriptor("timeline", WebInspector.UIString("Timeline"), "TimelinePanel", "TimelinePanel.js");
         var profiles = new WebInspector.PanelDescriptor("profiles", WebInspector.UIString("Profiles"), "ProfilesPanel", "ProfilesPanel.js");
         var audits = new WebInspector.PanelDescriptor("audits", WebInspector.UIString("Audits"), "AuditsPanel", "AuditsPanel.js");
         var timeline = new WebInspector.PanelDescriptor("timeline", WebInspector.UIString("Timeline"), "TimelinePanel", "TimelinePanel.js");
         var profiles = new WebInspector.PanelDescriptor("profiles", WebInspector.UIString("Profiles"), "ProfilesPanel", "ProfilesPanel.js");
         var audits = new WebInspector.PanelDescriptor("audits", WebInspector.UIString("Audits"), "AuditsPanel", "AuditsPanel.js");