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

Side by Side Diff: Source/devtools/front_end/resources/ResourcesPanel.js

Issue 944343002: DevTools: migrate treeoutline from hasChildren to is/setExpandable(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * Copyright (C) 2013 Samsung Electronics. All rights reserved. 4 * Copyright (C) 2013 Samsung Electronics. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 816 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 return Promise.resolve(); 827 return Promise.resolve();
828 } 828 }
829 } 829 }
830 830
831 /** 831 /**
832 * @constructor 832 * @constructor
833 * @extends {TreeElement} 833 * @extends {TreeElement}
834 * @param {!WebInspector.ResourcesPanel} storagePanel 834 * @param {!WebInspector.ResourcesPanel} storagePanel
835 * @param {string} title 835 * @param {string} title
836 * @param {?Array.<string>=} iconClasses 836 * @param {?Array.<string>=} iconClasses
837 * @param {boolean=} hasChildren 837 * @param {boolean=} expandable
838 * @param {boolean=} noIcon 838 * @param {boolean=} noIcon
839 */ 839 */
840 WebInspector.BaseStorageTreeElement = function(storagePanel, title, iconClasses, hasChildren, noIcon) 840 WebInspector.BaseStorageTreeElement = function(storagePanel, title, iconClasses, expandable, noIcon)
841 { 841 {
842 TreeElement.call(this, "", hasChildren); 842 TreeElement.call(this, "", expandable);
843 this._storagePanel = storagePanel; 843 this._storagePanel = storagePanel;
844 this._titleText = title; 844 this._titleText = title;
845 this._iconClasses = iconClasses; 845 this._iconClasses = iconClasses;
846 this._noIcon = noIcon; 846 this._noIcon = noIcon;
847 } 847 }
848 848
849 WebInspector.BaseStorageTreeElement.prototype = { 849 WebInspector.BaseStorageTreeElement.prototype = {
850 onattach: function() 850 onattach: function()
851 { 851 {
852 this.listItemElement.removeChildren(); 852 this.listItemElement.removeChildren();
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 if (!indexNames[indexName]) 1977 if (!indexNames[indexName])
1978 this._indexRemoved(indexName); 1978 this._indexRemoved(indexName);
1979 } 1979 }
1980 for (var indexName in this._idbIndexTreeElements) { 1980 for (var indexName in this._idbIndexTreeElements) {
1981 if (!indexNames[indexName]) { 1981 if (!indexNames[indexName]) {
1982 this.removeChild(this._idbIndexTreeElements[indexName]); 1982 this.removeChild(this._idbIndexTreeElements[indexName]);
1983 delete this._idbIndexTreeElements[indexName]; 1983 delete this._idbIndexTreeElements[indexName];
1984 } 1984 }
1985 } 1985 }
1986 1986
1987 if (this.childCount()) { 1987 if (this.childCount())
1988 this.hasChildren = true;
1989 this.expand(); 1988 this.expand();
1990 }
1991 1989
1992 if (this._view) 1990 if (this._view)
1993 this._view.update(this._objectStore); 1991 this._view.update(this._objectStore);
1994 1992
1995 this._updateTooltip(); 1993 this._updateTooltip();
1996 }, 1994 },
1997 1995
1998 _updateTooltip: function() 1996 _updateTooltip: function()
1999 { 1997 {
2000 1998
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
2396 WebInspector.ResourcesPanelFactory.prototype = { 2394 WebInspector.ResourcesPanelFactory.prototype = {
2397 /** 2395 /**
2398 * @override 2396 * @override
2399 * @return {!WebInspector.Panel} 2397 * @return {!WebInspector.Panel}
2400 */ 2398 */
2401 createPanel: function() 2399 createPanel: function()
2402 { 2400 {
2403 return WebInspector.ResourcesPanel._instance(); 2401 return WebInspector.ResourcesPanel._instance();
2404 } 2402 }
2405 } 2403 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698