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

Unified Diff: Source/devtools/front_end/sources/SourcesView.js

Issue 1264133002: Devtools: [WIP] Implement enhanced devtools extension language APIs Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Modify override dropdown to apply to console completions & transpile Created 5 years, 4 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/sources/SourcesView.js
diff --git a/Source/devtools/front_end/sources/SourcesView.js b/Source/devtools/front_end/sources/SourcesView.js
index 1d3bf4588ee37412457949aa1b26b25deba2dbdf..753c612522dfc147ad18d0b411b52dac032e0a32 100644
--- a/Source/devtools/front_end/sources/SourcesView.js
+++ b/Source/devtools/front_end/sources/SourcesView.js
@@ -78,6 +78,8 @@ WebInspector.SourcesView = function(workspace, sourcesPanel)
this._shortcuts = {};
this.element.addEventListener("keydown", this._handleKeyDown.bind(this), false);
+
+ this.addEventListener(WebInspector.SourcesView.Events.EditorSelected, WebInspector.languageService.updateInferredMime, WebInspector.languageService);
}
WebInspector.SourcesView.Events = {
@@ -95,7 +97,7 @@ WebInspector.SourcesView.uiSourceCodeHighlighterType = function(uiSourceCode)
if (networkContentType)
return networkContentType.canonicalMimeType();
- var mimeType = WebInspector.ResourceType.mimeTypesForExtensions[uiSourceCode.extension().toLowerCase()];
+ var mimeType = WebInspector.ResourceType.mimeFromUrl(uiSourceCode.uri());
wes 2015/08/14 00:55:05 I've been wavering about this for awhile - is .uri
pfeldman 2015/08/17 21:15:52 uri is the URI within workspace, contentURL is whe
wes 2015/08/25 18:13:18 Alright - I think I've gone through and changed al
return mimeType || uiSourceCode.contentType().canonicalMimeType();
}

Powered by Google App Engine
This is Rietveld 408576698