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

Unified Diff: Source/devtools/front_end/NetworkUISourceCodeProvider.js

Issue 18341003: DevTools: [CodeMirror] Add syntax highlighting for some other languages. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 7 years, 6 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: Source/devtools/front_end/NetworkUISourceCodeProvider.js
diff --git a/Source/devtools/front_end/NetworkUISourceCodeProvider.js b/Source/devtools/front_end/NetworkUISourceCodeProvider.js
index a3c641f4cd379c3a521979c785550964f0669145..3dd1c8c1211e550318ecd47d03a662c36998c19e 100644
--- a/Source/devtools/front_end/NetworkUISourceCodeProvider.js
+++ b/Source/devtools/front_end/NetworkUISourceCodeProvider.js
@@ -131,9 +131,11 @@ WebInspector.NetworkUISourceCodeProvider.prototype = {
return;
if (this._processedURLs[url])
return;
+ var mimeType = type.canonicalMimeType();
+ var overridingContentProvider = new WebInspector.ContentProviderOverridingMimeType(contentProvider, mimeType);
this._processedURLs[url] = true;
var isEditable = type !== WebInspector.resourceTypes.Document;
- this._networkWorkspaceProvider.addFileForURL(url, contentProvider, isEditable, isContentScript);
+ this._networkWorkspaceProvider.addFileForURL(url, overridingContentProvider, isEditable, isContentScript);
},
_reset: function()

Powered by Google App Engine
This is Rietveld 408576698