Chromium Code Reviews| 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 55% |
| copy from Source/devtools/front_end/AuditsPanelDescriptor.js |
| copy to Source/devtools/front_end/StackView.js |
| index 196a3cf782a25439a8246c61fd7432b6756bf9cf..a58b761d2355ee038e3002c2ccc03ba1be403fdc 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,38 @@ |
| /** |
| * @constructor |
| - * @extends {WebInspector.PanelDescriptor} |
| + * @extends {WebInspector.View} |
| */ |
| -WebInspector.AuditsPanelDescriptor = function() |
| +WebInspector.StackView = function() |
|
pfeldman
2014/01/14 16:32:33
isVertical should be here.
loislo
2014/01/14 16:38:11
Done.
|
| { |
| - WebInspector.PanelDescriptor.call(this, "audits", WebInspector.UIString("Audits"), "AuditsPanel", "AuditsPanel.js"); |
| + WebInspector.View.call(this); |
| } |
| -WebInspector.AuditsPanelDescriptor.prototype = { |
| - __proto__: WebInspector.PanelDescriptor.prototype |
| -} |
| - |
| -/** |
| - * @interface |
| - */ |
| -WebInspector.AuditCategory = function() |
| -{ |
| -} |
| - |
| -WebInspector.AuditCategory.prototype = { |
| +WebInspector.StackView.prototype = { |
| /** |
| - * @return {string} |
| + * @param {!WebInspector.View} view |
| + * @param {boolean} isVertical |
| + * @param {string=} sidebarSizeSettingName |
| + * @param {number=} defaultSidebarWidth |
| + * @param {number=} defaultSidebarHeight |
| + * @return {!WebInspector.SplitView} |
| */ |
| - get id() |
| + appendView: function(view, isVertical, sidebarSizeSettingName, defaultSidebarWidth, defaultSidebarHeight) |
| { |
| - }, |
| + var splitView = new WebInspector.SplitView(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 |
| } |