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

Unified Diff: third_party/WebKit/Source/devtools/front_end/layers/LayersPane.js

Issue 2307253003: DevTools: enable layers pane outside of experiements. (Closed)
Patch Set: Created 4 years, 3 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: third_party/WebKit/Source/devtools/front_end/layers/LayersPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/layers/LayersPanel.js b/third_party/WebKit/Source/devtools/front_end/layers/LayersPane.js
similarity index 77%
rename from third_party/WebKit/Source/devtools/front_end/layers/LayersPanel.js
rename to third_party/WebKit/Source/devtools/front_end/layers/LayersPane.js
index 0886b2578fc1fd2662b3a17539848763f671d929..90c5b456e0b9902e5d07677e3b4c1240890bf565 100644
--- a/third_party/WebKit/Source/devtools/front_end/layers/LayersPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/layers/LayersPane.js
@@ -30,12 +30,23 @@
/**
* @constructor
- * @extends {WebInspector.PanelWithSidebar}
+ * @extends {WebInspector.VBox}
* @implements {WebInspector.TargetManager.Observer}
*/
-WebInspector.LayersPanel = function()
+WebInspector.LayersPane = function()
{
- WebInspector.PanelWithSidebar.call(this, "layers", 225);
+ WebInspector.VBox.call(this);
+
+ this._panelSplitWidget = new WebInspector.SplitWidget(true, false, "layersPaneSplitViewState", 225);
+ this._panelSplitWidget.show(this.element);
+ this._mainWidget = new WebInspector.VBox();
+ this._panelSplitWidget.setMainWidget(this._mainWidget);
+
+ this._sidebarWidget = new WebInspector.VBox();
+ this._sidebarWidget.setMinimumSize(100, 25);
+ this._panelSplitWidget.setSidebarWidget(this._sidebarWidget);
+ this._sidebarWidget.element.classList.add("sidebar");
+
this.registerRequiredCSS("timeline/timelinePanel.css");
/** @type {?WebInspector.LayerTreeModel} */
@@ -44,11 +55,11 @@ WebInspector.LayersPanel = function()
WebInspector.targetManager.observeTargets(this);
this._layerViewHost = new WebInspector.LayerViewHost();
this._layerTreeOutline = new WebInspector.LayerTreeOutline(this._layerViewHost);
- this.panelSidebarElement().appendChild(this._layerTreeOutline.element);
+ this._sidebarWidget.element.appendChild(this._layerTreeOutline.element);
this.setDefaultFocusedElement(this._layerTreeOutline.element);
this._rightSplitWidget = new WebInspector.SplitWidget(false, true, "layerDetailsSplitViewState");
- this.splitWidget().setMainWidget(this._rightSplitWidget);
+ this._panelSplitWidget.setMainWidget(this._rightSplitWidget);
this._layers3DView = new WebInspector.Layers3DView(this._layerViewHost);
this._rightSplitWidget.setMainWidget(this._layers3DView);
@@ -58,18 +69,18 @@ WebInspector.LayersPanel = function()
this._rightSplitWidget.setSidebarWidget(this._tabbedPane);
this._layerDetailsView = new WebInspector.LayerDetailsView(this._layerViewHost);
- this._tabbedPane.appendTab(WebInspector.LayersPanel.DetailsViewTabs.Details, WebInspector.UIString("Details"), this._layerDetailsView);
+ this._tabbedPane.appendTab(WebInspector.LayersPane.DetailsViewTabs.Details, WebInspector.UIString("Details"), this._layerDetailsView);
this._paintProfilerView = new WebInspector.LayerPaintProfilerView(this._layers3DView.showImageForLayer.bind(this._layers3DView));
- this._tabbedPane.appendTab(WebInspector.LayersPanel.DetailsViewTabs.Profiler, WebInspector.UIString("Profiler"), this._paintProfilerView);
+ this._tabbedPane.appendTab(WebInspector.LayersPane.DetailsViewTabs.Profiler, WebInspector.UIString("Profiler"), this._paintProfilerView);
}
-WebInspector.LayersPanel.DetailsViewTabs = {
+WebInspector.LayersPane.DetailsViewTabs = {
Details: "details",
Profiler: "profiler"
};
-WebInspector.LayersPanel.prototype = {
+WebInspector.LayersPane.prototype = {
focus: function()
{
this._layerTreeOutline.focus();
@@ -153,34 +164,9 @@ WebInspector.LayersPanel.prototype = {
_onSnapshotRequested: function(event)
{
var layer = /** @type {!WebInspector.Layer} */ (event.data);
- this._tabbedPane.selectTab(WebInspector.LayersPanel.DetailsViewTabs.Profiler);
+ this._tabbedPane.selectTab(WebInspector.LayersPane.DetailsViewTabs.Profiler);
this._paintProfilerView.profileLayer(layer);
},
- __proto__: WebInspector.PanelWithSidebar.prototype
-}
-
-/**
- * @constructor
- * @implements {WebInspector.Revealer}
- */
-WebInspector.LayersPanel.LayerTreeRevealer = function()
-{
-}
-
-WebInspector.LayersPanel.LayerTreeRevealer.prototype = {
- /**
- * @override
- * @param {!Object} snapshotData
- * @return {!Promise}
- */
- reveal: function(snapshotData)
- {
- if (!(snapshotData instanceof WebInspector.DeferredLayerTree))
- return Promise.reject(new Error("Internal error: not a WebInspector.DeferredLayerTree"));
- var panel = /** @type {!WebInspector.LayersPanel} */ (self.runtime.sharedInstance(WebInspector.LayersPanel));
- WebInspector.inspectorView.setCurrentPanel(panel);
- panel._showLayerTree(/** @type {!WebInspector.DeferredLayerTree} */ (snapshotData));
- return Promise.resolve();
- }
+ __proto__: WebInspector.VBox.prototype
}

Powered by Google App Engine
This is Rietveld 408576698