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

Unified Diff: third_party/WebKit/Source/devtools/front_end/network_group_lookup/NetworkProductGroupLookup.js

Issue 2807823002: [Devtools] Updated format to store product registry data (Closed)
Patch Set: canges Created 3 years, 8 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/network_group_lookup/NetworkProductGroupLookup.js
diff --git a/third_party/WebKit/Source/devtools/front_end/network_group_lookup/NetworkProductGroupLookup.js b/third_party/WebKit/Source/devtools/front_end/network_group_lookup/NetworkProductGroupLookup.js
index 356b4a104d682a8365af5af4c921d59267a3301f..cdee84955143842f65aec49d6aac1a3c00933470 100644
--- a/third_party/WebKit/Source/devtools/front_end/network_group_lookup/NetworkProductGroupLookup.js
+++ b/third_party/WebKit/Source/devtools/front_end/network_group_lookup/NetworkProductGroupLookup.js
@@ -113,4 +113,29 @@ NetworkGroupLookup.NetworkProductFrameGroupLookup = class {
}
};
+/**
+ * @implements {Network.NetworkRowDecorator}
+ */
+NetworkGroupLookup.NetworkProductTypeGroupLookup = class {
+ /**
+ * @override
+ * @param {!Network.NetworkNode} node
+ */
+ decorate(node) {
+ var request = node.request();
+ var element = node.existingElement();
+ if (!request || !element)
+ return;
+ var typeName = ProductRegistry.typeForUrl(request.parsedURL);
+ if (!typeName)
+ return;
+ var icon = UI.Icon.create('smallicon-network-product');
+ if (typeName === 'Tracking')
+ icon.style.filter = 'hue-rotate(220deg) brightness(1.5)';
+ if (typeName === 'CDN')
+ icon.style.filter = 'hue-rotate(-90deg) brightness(1.5)';
+ node.setIconForColumn('product-extension', icon);
+ }
+};
+
NetworkGroupLookup.NetworkProductFrameGroupLookup._productFrameGroupNameSymbol = Symbol('ProductFrameGroupName');

Powered by Google App Engine
This is Rietveld 408576698