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

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

Issue 2889013002: DevTools: introduce uiSourceCode.mimeType() method (Closed)
Patch Set: address comments Created 3 years, 7 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/sources/SourcesView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
index 13db19a9cb4232de4c69aa65085ea0ed43863765..91fa9b0c9ab750f45739db8c9309617e36a428c2 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesView.js
@@ -356,14 +356,14 @@ Sources.SourcesView = class extends UI.VBox {
else if (contentType.isStyleSheet())
sourceFrame = new Sources.CSSSourceFrame(uiSourceCode);
else if (contentType === Common.resourceTypes.Image)
- sourceView = new SourceFrame.ImageView(Bindings.NetworkProject.uiSourceCodeMimeType(uiSourceCode), uiSourceCode);
+ sourceView = new SourceFrame.ImageView(uiSourceCode.mimeType(), uiSourceCode);
else if (contentType === Common.resourceTypes.Font)
- sourceView = new SourceFrame.FontView(Bindings.NetworkProject.uiSourceCodeMimeType(uiSourceCode), uiSourceCode);
+ sourceView = new SourceFrame.FontView(uiSourceCode.mimeType(), uiSourceCode);
else
sourceFrame = new SourceFrame.UISourceCodeFrame(uiSourceCode);
if (sourceFrame) {
- sourceFrame.setHighlighterType(Bindings.NetworkProject.uiSourceCodeMimeType(uiSourceCode));
+ sourceFrame.setHighlighterType(uiSourceCode.mimeType());
this._historyManager.trackSourceFrameCursorJumps(sourceFrame);
}
var widget = /** @type {!UI.Widget} */ (sourceFrame || sourceView);
@@ -402,7 +402,7 @@ Sources.SourcesView = class extends UI.VBox {
return;
var oldSourceFrame = /** @type {!SourceFrame.UISourceCodeFrame} */ (oldSourceView);
if (this._sourceFrameMatchesUISourceCode(oldSourceFrame, uiSourceCode)) {
- oldSourceFrame.setHighlighterType(Bindings.NetworkProject.uiSourceCodeMimeType(uiSourceCode));
+ oldSourceFrame.setHighlighterType(uiSourceCode.mimeType());
} else {
this._editorContainer.removeUISourceCode(uiSourceCode);
this._removeSourceFrame(uiSourceCode);

Powered by Google App Engine
This is Rietveld 408576698