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

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

Issue 2623063003: DevTools: Fix getCookies to report for all resources (Closed)
Patch Set: audit and line length fixes Created 3 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: 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 de4043087fd4342c1da10823079617c4d12179cb..8ed1baf480e91fb0f926844301057d04011201f3 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
@@ -390,15 +390,15 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar {
this.databasesListTreeElement.appendChild(databaseTreeElement);
}
- addDocumentURL(url) {
- var parsedURL = url.asParsedURL();
+ addCookieDocument(frame) {
pfeldman 2017/01/13 02:17:34 Annotation missing - you touched it...
phulce 2017/01/18 00:52:34 Done.
+ var parsedURL = frame.url.asParsedURL();
if (!parsedURL)
return;
var domain = parsedURL.securityOrigin();
if (!this._domains[domain]) {
this._domains[domain] = true;
- var cookieDomainTreeElement = new Resources.CookieTreeElement(this, domain);
+ var cookieDomainTreeElement = new Resources.CookieTreeElement(this, frame, domain);
this.cookieListTreeElement.appendChild(cookieDomainTreeElement);
}
}
@@ -582,11 +582,12 @@ Resources.ResourcesPanel = class extends UI.PanelWithSidebar {
/**
* @param {!Resources.CookieTreeElement} treeElement
* @param {string} cookieDomain
+ * @param {!Object} cookieFrameTarget
*/
- showCookies(treeElement, cookieDomain) {
+ showCookies(treeElement, cookieDomain, cookieFrameTarget) {
var view = this._cookieViews[cookieDomain];
if (!view) {
- view = new Resources.CookieItemsView(treeElement, cookieDomain);
+ view = new Resources.CookieItemsView(treeElement, cookieFrameTarget, cookieDomain);
this._cookieViews[cookieDomain] = view;
}
@@ -945,7 +946,7 @@ Resources.FrameTreeElement = class extends Resources.BaseStorageTreeElement {
this._categoryElements = {};
this._treeElementForResource = {};
- this._storagePanel.addDocumentURL(frame.url);
+ this._storagePanel.addCookieDocument(frame);
}
get itemURL() {
@@ -1908,10 +1909,11 @@ Resources.DOMStorageTreeElement = class extends Resources.BaseStorageTreeElement
* @unrestricted
*/
Resources.CookieTreeElement = class extends Resources.BaseStorageTreeElement {
- constructor(storagePanel, cookieDomain) {
+ constructor(storagePanel, frame, cookieDomain) {
super(
storagePanel, cookieDomain ? cookieDomain : Common.UIString('Local Files'),
['cookie-tree-item', 'resource-tree-item']);
+ this._frame = frame;
this._cookieDomain = cookieDomain;
}
@@ -1949,7 +1951,7 @@ Resources.CookieTreeElement = class extends Resources.BaseStorageTreeElement {
*/
onselect(selectedByUser) {
super.onselect(selectedByUser);
- this._storagePanel.showCookies(this, this._cookieDomain);
+ this._storagePanel.showCookies(this, this._cookieDomain, this._frame.target());
return false;
}
};

Powered by Google App Engine
This is Rietveld 408576698