| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 _addFile: function(url, contentProvider, isContentScript) | 124 _addFile: function(url, contentProvider, isContentScript) |
| 125 { | 125 { |
| 126 if (this._workspace.hasMappingForURL(url)) | 126 if (this._workspace.hasMappingForURL(url)) |
| 127 return; | 127 return; |
| 128 | 128 |
| 129 var type = contentProvider.contentType(); | 129 var type = contentProvider.contentType(); |
| 130 if (type !== WebInspector.resourceTypes.Stylesheet && type !== WebInspec
tor.resourceTypes.Document && type !== WebInspector.resourceTypes.Script) | 130 if (type !== WebInspector.resourceTypes.Stylesheet && type !== WebInspec
tor.resourceTypes.Document && type !== WebInspector.resourceTypes.Script) |
| 131 return; | 131 return; |
| 132 if (this._processedURLs[url]) | 132 if (this._processedURLs[url]) |
| 133 return; | 133 return; |
| 134 var mimeType = type.canonicalMimeType(); |
| 135 var overridingContentProvider = new WebInspector.ContentProviderOverridi
ngMimeType(contentProvider, mimeType); |
| 134 this._processedURLs[url] = true; | 136 this._processedURLs[url] = true; |
| 135 var isEditable = type !== WebInspector.resourceTypes.Document; | 137 var isEditable = type !== WebInspector.resourceTypes.Document; |
| 136 this._networkWorkspaceProvider.addFileForURL(url, contentProvider, isEdi
table, isContentScript); | 138 this._networkWorkspaceProvider.addFileForURL(url, overridingContentProvi
der, isEditable, isContentScript); |
| 137 }, | 139 }, |
| 138 | 140 |
| 139 _reset: function() | 141 _reset: function() |
| 140 { | 142 { |
| 141 this._processedURLs = {}; | 143 this._processedURLs = {}; |
| 142 this._networkWorkspaceProvider.reset(); | 144 this._networkWorkspaceProvider.reset(); |
| 143 this._populate(); | 145 this._populate(); |
| 144 } | 146 } |
| 145 } | 147 } |
| 146 | 148 |
| 147 /** | 149 /** |
| 148 * @type {?WebInspector.SimpleWorkspaceProvider} | 150 * @type {?WebInspector.SimpleWorkspaceProvider} |
| 149 */ | 151 */ |
| 150 WebInspector.networkWorkspaceProvider = null; | 152 WebInspector.networkWorkspaceProvider = null; |
| OLD | NEW |