Skip to content

Commit

Permalink
[DevTools] Shows Manifest file in Sources tab
Browse files Browse the repository at this point in the history
 - Adds Manifest resource type in Resource.h and RawResource::fetchManifest().
 - Uses RawResource::fetchManifest() in DocumentThreadableLoader.
 - Adds Manifest resource type in InspectorPageAgent.h.
 - Adds Manifest resource type in protocol.json.
 - Changes InspectorPageAgent::cachedResourceType() and resourceTypeJson() to support Manifest resource type.
 - Changes WebInspector.NetworkProject._addResource() to show the manifest file in Sources tab.
 - Changes WebConsoleMessage.h to support url.
 - Changes manifest_manager.cc to pass the manifest url.

demo: https://drive.google.com/file/d/0B6skYAFVnosEN1UzWktHUTRUdUE/view?usp=sharing

BUG=540493

Review URL: https://codereview.chromium.org/1564913003

Cr-Commit-Position: refs/heads/master@{#368308}
  • Loading branch information
horo-t authored and Commit bot committed Jan 8, 2016
1 parent d205ce8 commit 787e525
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion front_end/bindings/NetworkProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@ WebInspector.NetworkProject.prototype = {
// Only load selected resource types from resources.
if (resourceType !== WebInspector.resourceTypes.Image &&
resourceType !== WebInspector.resourceTypes.Font &&
resourceType !== WebInspector.resourceTypes.Document) {
resourceType !== WebInspector.resourceTypes.Document &&
resourceType !== WebInspector.resourceTypes.Manifest) {
return;
}

Expand Down
2 changes: 2 additions & 0 deletions front_end/common/ResourceType.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ WebInspector.resourceCategories = {
Font: new WebInspector.ResourceCategory("Fonts", "Font"),
Document: new WebInspector.ResourceCategory("Documents", "Doc"),
WebSocket: new WebInspector.ResourceCategory("WebSockets", "WS"),
Manifest: new WebInspector.ResourceCategory("Manifest", "Manifest"),
Other: new WebInspector.ResourceCategory("Other", "Other")
}

Expand All @@ -189,6 +190,7 @@ WebInspector.resourceTypes = {
Other: new WebInspector.ResourceType("other", "Other", WebInspector.resourceCategories.Other, false),
SourceMapScript: new WebInspector.ResourceType("sm-script", "Script", WebInspector.resourceCategories.Script, false),
SourceMapStyleSheet: new WebInspector.ResourceType("sm-stylesheet", "Stylesheet", WebInspector.resourceCategories.Stylesheet, false),
Manifest: new WebInspector.ResourceType("manifest", "Manifest", WebInspector.resourceCategories.Manifest, false),
}

/**
Expand Down
2 changes: 1 addition & 1 deletion protocol.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
{
"id": "ResourceType",
"type": "string",
"enum": ["Document", "Stylesheet", "Image", "Media", "Font", "Script", "TextTrack", "XHR", "Fetch", "EventSource", "WebSocket", "Other"],
"enum": ["Document", "Stylesheet", "Image", "Media", "Font", "Script", "TextTrack", "XHR", "Fetch", "EventSource", "WebSocket", "Manifest", "Other"],
"description": "Resource type as it was perceived by the rendering engine."
},
{
Expand Down

0 comments on commit 787e525

Please sign in to comment.