/**
* @constructor
- * @extends {WebInspector.Panel}
+ * @extends {WebInspector.PanelWithSidebarTree}
*/
WebInspector.ResourcesPanel = function(database)
{
- WebInspector.Panel.call(this, "resources");
+ WebInspector.PanelWithSidebarTree.call(this, "resources");
this.registerRequiredCSS("resourcesPanel.css");
WebInspector.settings.resourcesLastSelectedItem = WebInspector.settings.createSetting("resourcesLastSelectedItem", {});
- this.createSidebarViewWithTree();
- this.splitView.sidebarElement().classList.add("outline-disclosure", "filter-all", "children", "small");
-
- this.sidebarTreeElement.classList.remove("sidebar-tree");
+ this.sidebarElement().classList.add("filter-all", "children", "small", "outline-disclosure");
+ this.sidebarTree.element.classList.remove("sidebar-tree");
this.resourcesListTreeElement = new WebInspector.StorageCategoryTreeElement(this, WebInspector.UIString("Frames"), "Frames", ["frame-storage-tree-item"]);
this.sidebarTree.appendChild(this.resourcesListTreeElement);
this.sidebarTree.appendChild(this.fileSystemListTreeElement);
}
- var mainElement = this.splitView.mainElement();
- this.storageViews = mainElement.createChild("div", "resources-main");
- var statusBarContainer = mainElement.createChild("div", "resources-status-bar");
+ var mainView = new WebInspector.View();
+ this.storageViews = mainView.element.createChild("div", "resources-main diff-container");
+ var statusBarContainer = mainView.element.createChild("div", "resources-status-bar");
this.storageViewStatusBarItemsContainer = statusBarContainer.createChild("div", "status-bar");
- this.storageViews.classList.add("diff-container");
+ mainView.show(this.mainElement());
/** @type {!Map.<!WebInspector.Database, !Object.<string, !WebInspector.DatabaseTableView>>} */
this._databaseTableViews = new Map();
/** @type {!Object.<string, boolean>} */
this._domains = {};
- this.splitView.sidebarElement().addEventListener("mousemove", this._onmousemove.bind(this), false);
- this.splitView.sidebarElement().addEventListener("mouseout", this._onmouseout.bind(this), false);
+ this.sidebarElement().addEventListener("mousemove", this._onmousemove.bind(this), false);
+ this.sidebarElement().addEventListener("mouseout", this._onmouseout.bind(this), false);
/**
* @return {!WebInspector.View}
},
/**
- * @param {!Element} anchor
- * @return {boolean}
- */
- showAnchorLocation: function(anchor)
- {
- var resource = WebInspector.resourceForURL(anchor.href);
- if (!resource)
- return false;
- WebInspector.inspectorView.setCurrentPanel(this);
- this.showResource(resource, anchor.lineNumber);
- return true;
- },
-
- /**
* @param {!WebInspector.Resource} resource
* @param {number=} line
* @param {number=} column
}
},
- __proto__: WebInspector.Panel.prototype
+ __proto__: WebInspector.PanelWithSidebarTree.prototype
+}
+
+/**
+ * @constructor
+ * @implements {WebInspector.Revealer}
+ */
+WebInspector.ResourcesPanel.ResourceRevealer = function()
+{
+}
+
+WebInspector.ResourcesPanel.ResourceRevealer.prototype = {
+ /**
+ * @param {!Object} resource
+ * @param {number=} lineNumber
+ */
+ reveal: function(resource, lineNumber)
+ {
+ if (resource instanceof WebInspector.Resource)
+ /** @type {!WebInspector.ResourcesPanel} */ (WebInspector.showPanel("resources")).showResource(resource, lineNumber);
+ }
}
/**