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

Unified Diff: third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js

Issue 1989123002: DevTools: application panel should restore previous pane (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
index 43df4dd5c596ebe1314e4780f048783a1c9291a2..91b924216878725ee785d9c92e6248c008bac15c 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
@@ -116,12 +116,6 @@ WebInspector.ResourcesPanel.prototype = {
return treeElement;
},
- wasShown: function()
- {
- if (!this._sidebarTree.selectedTreeElement)
- this._manifestTreeElement.select();
- },
-
/**
* @override
* @param {!WebInspector.Target} target
@@ -137,7 +131,6 @@ WebInspector.ResourcesPanel.prototype = {
if (target.resourceTreeModel.cachedResourcesLoaded())
this._initialize();
- target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.Load, this._loadEventFired, this);
target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.CachedResourcesLoaded, this._initialize, this);
target.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.WillLoadCachedResources, this._resetWithFrames, this);
this._databaseModel.addEventListener(WebInspector.DatabaseModel.Events.DatabaseAdded, this._databaseAdded, this);
@@ -154,7 +147,6 @@ WebInspector.ResourcesPanel.prototype = {
return;
delete this._target;
- target.resourceTreeModel.removeEventListener(WebInspector.ResourceTreeModel.EventTypes.Load, this._loadEventFired, this);
target.resourceTreeModel.removeEventListener(WebInspector.ResourceTreeModel.EventTypes.CachedResourcesLoaded, this._initialize, this);
target.resourceTreeModel.removeEventListener(WebInspector.ResourceTreeModel.EventTypes.WillLoadCachedResources, this._resetWithFrames, this);
this._databaseModel.removeEventListener(WebInspector.DatabaseModel.Events.DatabaseAdded, this._databaseAdded, this);
@@ -182,19 +174,10 @@ WebInspector.ResourcesPanel.prototype = {
this.indexedDBListTreeElement._initialize();
this.cacheStorageListTreeElement._initialize();
this._initDefaultSelection();
- this._initialized = true;
- },
-
- _loadEventFired: function()
- {
- this._initDefaultSelection();
},
_initDefaultSelection: function()
{
- if (!this._initialized)
- return;
-
var itemURL = this._resourcesLastSelectedItemSetting.get();
if (itemURL) {
var rootElement = this._sidebarTree.rootElement();
@@ -205,12 +188,7 @@ WebInspector.ResourcesPanel.prototype = {
}
}
}
-
- var mainResource = this._target.resourceTreeModel.inspectedPageURL() && this.resourcesListTreeElement && this.resourcesListTreeElement.expanded
- ? this._target.resourceTreeModel.resourceForURL(this._target.resourceTreeModel.inspectedPageURL())
- : null;
- if (mainResource)
- this.showResource(mainResource);
+ this._manifestTreeElement.select();
},
_resetWithFrames: function()
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698