Index: Source/devtools/front_end/Panel.js |
diff --git a/Source/devtools/front_end/Panel.js b/Source/devtools/front_end/Panel.js |
index 5348b5963e5ff2a8cc0ffaaeca2b05d2e05e9cfb..128cd03e26e5f5ef4775200e4a37ac7f6eef8e99 100644 |
--- a/Source/devtools/front_end/Panel.js |
+++ b/Source/devtools/front_end/Panel.js |
@@ -79,6 +79,17 @@ WebInspector.Panel.prototype = { |
} |
this.focus(); |
+ var defaultJumpHistoryEntry = this.createPanelJumpHistoryEntry(); |
+ if (defaultJumpHistoryEntry) |
+ WebInspector.jumpHistoryManager.jumpToPosition(null, defaultJumpHistoryEntry); |
+ }, |
+ |
+ /** |
+ * @return {?WebInspector.JumpHistoryEntry} |
+ */ |
+ createPanelJumpHistoryEntry: function() |
+ { |
+ return new WebInspector.PanelJumpHistoryEntry(this); |
}, |
willHide: function() |
@@ -344,3 +355,51 @@ WebInspector.PanelDescriptor.prototype = { |
registerShortcuts: function() {} |
} |
+ |
+/** |
+ * @constructor |
+ * @implements {WebInspector.JumpHistoryEntry} |
+ * @param {WebInspector.Panel} panel |
+ */ |
+WebInspector.PanelJumpHistoryEntry = function(panel) |
+{ |
+ this._panel = panel; |
+} |
+ |
+WebInspector.PanelJumpHistoryEntry.prototype = { |
+ /** |
+ * @return {boolean} |
+ */ |
+ valid: function() |
+ { |
+ return true; |
+ }, |
+ |
+ /** |
+ * @param {WebInspector.JumpHistoryEntry} entry |
+ */ |
+ merge: function(entry) |
+ { |
+ }, |
+ |
+ /** |
+ * @return {boolean} |
+ */ |
+ reveal: function() |
+ { |
+ if (this._panel.isShowing()) |
+ return false; |
+ WebInspector.inspectorView.setCurrentPanel(this._panel); |
+ return true; |
+ }, |
+ |
+ /** |
+ * @param {WebInspector.JumpHistoryEntry} entry |
+ */ |
+ equal: function(entry) |
+ { |
+ if (!(entry instanceof WebInspector.PanelJumpHistoryEntry)) |
+ return false; |
+ return this._panel === entry._panel; |
+ } |
+} |