| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * | 10 * |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 for (var i = 0; i < uiSourceCodes.length; ++i) { | 159 for (var i = 0; i < uiSourceCodes.length; ++i) { |
| 160 if (!uiSourceCodes[i].isDirty()) | 160 if (!uiSourceCodes[i].isDirty()) |
| 161 continue; | 161 continue; |
| 162 var path = uiSourceCodes[i].path(); | 162 var path = uiSourceCodes[i].path(); |
| 163 if (!matchingFiles.contains(path) && this._searchConfig.filePath
MatchesFileQuery(path)) | 163 if (!matchingFiles.contains(path) && this._searchConfig.filePath
MatchesFileQuery(path)) |
| 164 files.push(path); | 164 files.push(path); |
| 165 } | 165 } |
| 166 } | 166 } |
| 167 | 167 |
| 168 /** | 168 /** |
| 169 * @param {!string} path | 169 * @param {string} path |
| 170 * @this {WebInspector.SourcesSearchScope} | 170 * @this {WebInspector.SourcesSearchScope} |
| 171 */ | 171 */ |
| 172 function searchInNextFile(path) | 172 function searchInNextFile(path) |
| 173 { | 173 { |
| 174 var uiSourceCode = project.uiSourceCode(path); | 174 var uiSourceCode = project.uiSourceCode(path); |
| 175 if (!uiSourceCode) { | 175 if (!uiSourceCode) { |
| 176 --callbacksLeft; | 176 --callbacksLeft; |
| 177 progress.worked(1); | 177 progress.worked(1); |
| 178 scheduleSearchInNextFileOrFinish.call(this); | 178 scheduleSearchInNextFileOrFinish.call(this); |
| 179 return; | 179 return; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 206 } | 206 } |
| 207 return; | 207 return; |
| 208 } | 208 } |
| 209 | 209 |
| 210 ++callbacksLeft; | 210 ++callbacksLeft; |
| 211 var path = files[fileIndex++]; | 211 var path = files[fileIndex++]; |
| 212 setTimeout(searchInNextFile.bind(this, path), 0); | 212 setTimeout(searchInNextFile.bind(this, path), 0); |
| 213 } | 213 } |
| 214 | 214 |
| 215 /** | 215 /** |
| 216 * @param {!string} path | 216 * @param {string} path |
| 217 * @param {?string} content | 217 * @param {?string} content |
| 218 * @this {WebInspector.SourcesSearchScope} | 218 * @this {WebInspector.SourcesSearchScope} |
| 219 */ | 219 */ |
| 220 function contentLoaded(path, content) | 220 function contentLoaded(path, content) |
| 221 { | 221 { |
| 222 /** | 222 /** |
| 223 * @param {!WebInspector.ContentProvider.SearchMatch} a | 223 * @param {!WebInspector.ContentProvider.SearchMatch} a |
| 224 * @param {!WebInspector.ContentProvider.SearchMatch} b | 224 * @param {!WebInspector.ContentProvider.SearchMatch} b |
| 225 */ | 225 */ |
| 226 function matchesComparator(a, b) | 226 function matchesComparator(a, b) |
| (...skipping 28 matching lines...) Expand all Loading... |
| 255 | 255 |
| 256 /** | 256 /** |
| 257 * @param {!WebInspector.ProjectSearchConfig} searchConfig | 257 * @param {!WebInspector.ProjectSearchConfig} searchConfig |
| 258 * @return {!WebInspector.FileBasedSearchResultsPane} | 258 * @return {!WebInspector.FileBasedSearchResultsPane} |
| 259 */ | 259 */ |
| 260 createSearchResultsPane: function(searchConfig) | 260 createSearchResultsPane: function(searchConfig) |
| 261 { | 261 { |
| 262 return new WebInspector.FileBasedSearchResultsPane(searchConfig); | 262 return new WebInspector.FileBasedSearchResultsPane(searchConfig); |
| 263 } | 263 } |
| 264 } | 264 } |
| OLD | NEW |