| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @constructor | 6 * @constructor |
| 7 * @implements {WebInspector.TabbedEditorContainerDelegate} | 7 * @implements {WebInspector.TabbedEditorContainerDelegate} |
| 8 * @implements {WebInspector.Searchable} | 8 * @implements {WebInspector.Searchable} |
| 9 * @implements {WebInspector.Replaceable} | 9 * @implements {WebInspector.Replaceable} |
| 10 * @extends {WebInspector.VBox} | 10 * @extends {WebInspector.VBox} |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 /** | 88 /** |
| 89 * @param {!WebInspector.UISourceCode} uiSourceCode | 89 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 90 * @return {string} | 90 * @return {string} |
| 91 */ | 91 */ |
| 92 WebInspector.SourcesView.uiSourceCodeHighlighterType = function(uiSourceCode) | 92 WebInspector.SourcesView.uiSourceCodeHighlighterType = function(uiSourceCode) |
| 93 { | 93 { |
| 94 var networkContentType = WebInspector.NetworkProject.uiSourceCodeContentType
(uiSourceCode); | 94 var networkContentType = WebInspector.NetworkProject.uiSourceCodeContentType
(uiSourceCode); |
| 95 if (networkContentType) | 95 if (networkContentType) |
| 96 return networkContentType.canonicalMimeType(); | 96 return networkContentType.canonicalMimeType(); |
| 97 | 97 |
| 98 var mimeType = WebInspector.ResourceType.mimeTypesForExtensions[uiSourceCode
.extension().toLowerCase()]; | 98 var mimeType = WebInspector.ResourceType.mimeFromURL(uiSourceCode.uri()); |
| 99 return mimeType || uiSourceCode.contentType().canonicalMimeType(); | 99 return mimeType || uiSourceCode.contentType().canonicalMimeType(); |
| 100 } | 100 } |
| 101 | 101 |
| 102 WebInspector.SourcesView.prototype = { | 102 WebInspector.SourcesView.prototype = { |
| 103 /** | 103 /** |
| 104 * @param {function(!Array.<!WebInspector.KeyboardShortcut.Descriptor>, func
tion(!Event=):boolean)} registerShortcutDelegate | 104 * @param {function(!Array.<!WebInspector.KeyboardShortcut.Descriptor>, func
tion(!Event=):boolean)} registerShortcutDelegate |
| 105 */ | 105 */ |
| 106 registerShortcuts: function(registerShortcutDelegate) | 106 registerShortcuts: function(registerShortcutDelegate) |
| 107 { | 107 { |
| 108 /** | 108 /** |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView); | 816 var sourcesView = WebInspector.context.flavor(WebInspector.SourcesView); |
| 817 var currentUISourceCode = sourcesView.currentUISourceCode(); | 817 var currentUISourceCode = sourcesView.currentUISourceCode(); |
| 818 if (!currentUISourceCode) | 818 if (!currentUISourceCode) |
| 819 return; | 819 return; |
| 820 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate
._nextFile(currentUISourceCode); | 820 var nextUISourceCode = WebInspector.SourcesView.SwitchFileActionDelegate
._nextFile(currentUISourceCode); |
| 821 if (!nextUISourceCode) | 821 if (!nextUISourceCode) |
| 822 return; | 822 return; |
| 823 sourcesView.showSourceLocation(nextUISourceCode); | 823 sourcesView.showSourceLocation(nextUISourceCode); |
| 824 } | 824 } |
| 825 } | 825 } |
| OLD | NEW |