Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: Source/devtools/front_end/ui/SidebarPane.js

Issue 449893002: DevTools: Introduce ThreadsSidebar (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix visibility Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/ui/SidebarPane.js
diff --git a/Source/devtools/front_end/ui/SidebarPane.js b/Source/devtools/front_end/ui/SidebarPane.js
index cf6d871e17d8a0447e1aaf2b745dd906fd64ab44..bd6389adee7c6592ba83af5725ac426ed4158ff5 100644
--- a/Source/devtools/front_end/ui/SidebarPane.js
+++ b/Source/devtools/front_end/ui/SidebarPane.js
@@ -159,6 +159,8 @@ WebInspector.SidebarPaneStack = function()
WebInspector.View.call(this);
this.setMinimumSize(25, 0);
this.element.className = "sidebar-pane-stack"; // Override
+ /** @type {!Map.<!WebInspector.SidebarPane, !WebInspector.SidebarPaneTitle>} */
+ this._titleByPane = new Map();
}
WebInspector.SidebarPaneStack.prototype = {
@@ -167,7 +169,21 @@ WebInspector.SidebarPaneStack.prototype = {
*/
addPane: function(pane)
{
- new WebInspector.SidebarPaneTitle(this.element, pane);
+ this._titleByPane.put(pane, new WebInspector.SidebarPaneTitle(this.element, pane));
+ },
+
+ /**
+ * @param {!WebInspector.SidebarPane} pane
+ * @param {boolean} hide
+ */
+ toggleHidden: function(pane, hide)
+ {
+ var title = this._titleByPane.get(pane);
+ if (!title)
+ return;
+
+ title.element.classList.toggle("hidden", hide);
+ pane.element.classList.toggle("hidden", hide);
},
__proto__: WebInspector.View.prototype

Powered by Google App Engine
This is Rietveld 408576698