Index: Source/devtools/front_end/StackView.js |
diff --git a/Source/devtools/front_end/AuditsPanelDescriptor.js b/Source/devtools/front_end/StackView.js |
similarity index 54% |
copy from Source/devtools/front_end/AuditsPanelDescriptor.js |
copy to Source/devtools/front_end/StackView.js |
index 196a3cf782a25439a8246c61fd7432b6756bf9cf..171ca02fda02c93a82420a2f1abcba77c4929151 100644 |
--- a/Source/devtools/front_end/AuditsPanelDescriptor.js |
+++ b/Source/devtools/front_end/StackView.js |
@@ -1,5 +1,5 @@ |
/* |
- * Copyright (C) 2013 Google Inc. All rights reserved. |
+ * Copyright (C) 2014 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 |
@@ -28,46 +28,39 @@ |
/** |
* @constructor |
- * @extends {WebInspector.PanelDescriptor} |
+ * @extends {WebInspector.View} |
+ * @param {boolean} isVertical |
*/ |
-WebInspector.AuditsPanelDescriptor = function() |
+WebInspector.StackView = function(isVertical) |
aandrey
2014/01/14 20:06:43
nit: bool flag to an enum? I had to move back to s
loislo
2014/01/15 07:48:51
originaly it was bool and it is the only parameter
|
{ |
- WebInspector.PanelDescriptor.call(this, "audits", WebInspector.UIString("Audits"), "AuditsPanel", "AuditsPanel.js"); |
+ WebInspector.View.call(this); |
+ this._isVertical = isVertical; |
} |
-WebInspector.AuditsPanelDescriptor.prototype = { |
- __proto__: WebInspector.PanelDescriptor.prototype |
-} |
- |
-/** |
- * @interface |
- */ |
-WebInspector.AuditCategory = function() |
-{ |
-} |
- |
-WebInspector.AuditCategory.prototype = { |
+WebInspector.StackView.prototype = { |
/** |
- * @return {string} |
+ * @param {!WebInspector.View} view |
+ * @param {string=} sidebarSizeSettingName |
+ * @param {number=} defaultSidebarWidth |
+ * @param {number=} defaultSidebarHeight |
+ * @return {!WebInspector.SplitView} |
*/ |
- get id() |
+ appendView: function(view, sidebarSizeSettingName, defaultSidebarWidth, defaultSidebarHeight) |
{ |
- }, |
+ var splitView = new WebInspector.SplitView(this._isVertical, sidebarSizeSettingName, defaultSidebarWidth, defaultSidebarHeight); |
+ splitView.setFirstView(view); |
+ splitView.showOnlyFirst(); |
- /** |
- * @return {string} |
- */ |
- get displayName() |
- { |
+ if (!this._currentSplitView) { |
+ splitView.show(this.element); |
+ } else { |
+ this._currentSplitView.setSecondView(splitView); |
+ this._currentSplitView.showBoth(); |
+ } |
+ |
+ this._currentSplitView = splitView; |
+ return splitView; |
}, |
- /** |
- * @param {!Array.<!WebInspector.NetworkRequest>} requests |
- * @param {function(!WebInspector.AuditRuleResult)} ruleResultCallback |
- * @param {function()} categoryDoneCallback |
- * @param {!WebInspector.Progress} progress |
- */ |
- run: function(requests, ruleResultCallback, categoryDoneCallback, progress) |
- { |
- } |
+ __proto__: WebInspector.View.prototype |
} |