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

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

Issue 2649923006: [DevTools] Add filtering to DOM storages (Closed)
Patch Set: [DevTools] Add filtering to DOM storages Created 3 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
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 this.cacheStorageListTreeElement = new Resources.ServiceWorkerCacheTreeEleme nt(this); 72 this.cacheStorageListTreeElement = new Resources.ServiceWorkerCacheTreeEleme nt(this);
73 cacheTreeElement.appendChild(this.cacheStorageListTreeElement); 73 cacheTreeElement.appendChild(this.cacheStorageListTreeElement);
74 this.applicationCacheListTreeElement = new Resources.StorageCategoryTreeElem ent( 74 this.applicationCacheListTreeElement = new Resources.StorageCategoryTreeElem ent(
75 this, Common.UIString('Application Cache'), 'ApplicationCache', 75 this, Common.UIString('Application Cache'), 'ApplicationCache',
76 ['appcache-tree-item', 'table-tree-item', 'resource-tree-item']); 76 ['appcache-tree-item', 'table-tree-item', 'resource-tree-item']);
77 cacheTreeElement.appendChild(this.applicationCacheListTreeElement); 77 cacheTreeElement.appendChild(this.applicationCacheListTreeElement);
78 78
79 this.resourcesListTreeElement = this._addSidebarSection(Common.UIString('Fra mes')); 79 this.resourcesListTreeElement = this._addSidebarSection(Common.UIString('Fra mes'));
80 80
81 var mainContainer = new UI.VBox(); 81 var mainContainer = new UI.VBox();
82 this.storageViews = mainContainer.element.createChild('div', 'vbox flex-auto ');
82 this._storageViewToolbar = new UI.Toolbar('resources-toolbar', mainContainer .element); 83 this._storageViewToolbar = new UI.Toolbar('resources-toolbar', mainContainer .element);
83 this.storageViews = mainContainer.element.createChild('div', 'vbox flex-auto ');
84 this.splitWidget().setMainWidget(mainContainer); 84 this.splitWidget().setMainWidget(mainContainer);
85 85
86 /** @type {!Map.<!Resources.Database, !Object.<string, !Resources.DatabaseTa bleView>>} */ 86 /** @type {!Map.<!Resources.Database, !Object.<string, !Resources.DatabaseTa bleView>>} */
87 this._databaseTableViews = new Map(); 87 this._databaseTableViews = new Map();
88 /** @type {!Map.<!Resources.Database, !Resources.DatabaseQueryView>} */ 88 /** @type {!Map.<!Resources.Database, !Resources.DatabaseQueryView>} */
89 this._databaseQueryViews = new Map(); 89 this._databaseQueryViews = new Map();
90 /** @type {!Map.<!Resources.Database, !Resources.DatabaseTreeElement>} */ 90 /** @type {!Map.<!Resources.Database, !Resources.DatabaseTreeElement>} */
91 this._databaseTreeElements = new Map(); 91 this._databaseTreeElements = new Map();
92 /** @type {!Map.<!Resources.DOMStorage, !Resources.DOMStorageItemsView>} */ 92 /** @type {!Map.<!Resources.DOMStorage, !Resources.DOMStorageItemsView>} */
93 this._domStorageViews = new Map(); 93 this._domStorageViews = new Map();
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 view = new Resources.DOMStorageItemsView(domStorage); 578 view = new Resources.DOMStorageItemsView(domStorage);
579 this._domStorageViews.set(domStorage, view); 579 this._domStorageViews.set(domStorage, view);
580 } 580 }
581 581
582 this._innerShowView(view); 582 this._innerShowView(view);
583 } 583 }
584 584
585 /** 585 /**
586 * @param {!Resources.CookieTreeElement} treeElement 586 * @param {!Resources.CookieTreeElement} treeElement
587 * @param {string} cookieDomain 587 * @param {string} cookieDomain
588 * @param {!SDK.ResourceTreeFrame} cookieFrameTarget 588 * @param {!SDK.Target} cookieFrameTarget
dgozman 2017/01/30 21:53:48 Nice :-)
589 */ 589 */
590 showCookies(treeElement, cookieDomain, cookieFrameTarget) { 590 showCookies(treeElement, cookieDomain, cookieFrameTarget) {
591 var view = this._cookieViews[cookieDomain]; 591 var view = this._cookieViews[cookieDomain];
592 if (!view) { 592 if (!view) {
593 view = new Resources.CookieItemsView(treeElement, cookieFrameTarget, cooki eDomain); 593 view = new Resources.CookieItemsView(treeElement, cookieFrameTarget, cooki eDomain);
594 this._cookieViews[cookieDomain] = view; 594 this._cookieViews[cookieDomain] = view;
595 } 595 }
596 596
597 this._innerShowView(view); 597 this._innerShowView(view);
598 } 598 }
599 599
600 /** 600 /**
601 * @param {string} cookieDomain 601 * @param {string} cookieDomain
602 */ 602 */
603 clearCookies(cookieDomain) { 603 clearCookies(cookieDomain) {
604 if (this._cookieViews[cookieDomain]) 604 if (this._cookieViews[cookieDomain])
605 this._cookieViews[cookieDomain].clear(); 605 this._cookieViews[cookieDomain].deleteAllItems();
606 } 606 }
607 607
608 showApplicationCache(frameId) { 608 showApplicationCache(frameId) {
609 if (!this._applicationCacheViews[frameId]) { 609 if (!this._applicationCacheViews[frameId]) {
610 this._applicationCacheViews[frameId] = 610 this._applicationCacheViews[frameId] =
611 new Resources.ApplicationCacheItemsView(this._applicationCacheModel, f rameId); 611 new Resources.ApplicationCacheItemsView(this._applicationCacheModel, f rameId);
612 } 612 }
613 613
614 this._innerShowView(this._applicationCacheViews[frameId]); 614 this._innerShowView(this._applicationCacheViews[frameId]);
615 } 615 }
(...skipping 1446 matching lines...) Expand 10 before | Expand all | Expand 10 after
2062 2062
2063 this.element.classList.add('storage-view'); 2063 this.element.classList.add('storage-view');
2064 this._emptyWidget = new UI.EmptyWidget(''); 2064 this._emptyWidget = new UI.EmptyWidget('');
2065 this._emptyWidget.show(this.element); 2065 this._emptyWidget.show(this.element);
2066 } 2066 }
2067 2067
2068 setText(text) { 2068 setText(text) {
2069 this._emptyWidget.text = text; 2069 this._emptyWidget.text = text;
2070 } 2070 }
2071 }; 2071 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698