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

Unified Diff: Source/devtools/front_end/StackView.js

Issue 137853005: TimelinePanel: introduce StackView and use it instead of _timelineMemorySplitter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comments addressed 2 Created 6 years, 11 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/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
}

Powered by Google App Engine
This is Rietveld 408576698