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

Side by Side Diff: Source/devtools/front_end/sources/SourcesSearchScope.js

Issue 397273005: DevTools: don't fail on advanced search in case opened before workspace is initialized. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/http/tests/inspector/search/sources-search-scope-in-files.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 16 matching lines...) Expand all
27 */ 27 */
28 28
29 /** 29 /**
30 * @constructor 30 * @constructor
31 * @implements {WebInspector.SearchScope} 31 * @implements {WebInspector.SearchScope}
32 */ 32 */
33 WebInspector.SourcesSearchScope = function() 33 WebInspector.SourcesSearchScope = function()
34 { 34 {
35 // FIXME: Add title once it is used by search controller. 35 // FIXME: Add title once it is used by search controller.
36 this._searchId = 0; 36 this._searchId = 0;
37 this._workspace = WebInspector.workspace;
38 } 37 }
39 38
40 WebInspector.SourcesSearchScope.prototype = { 39 WebInspector.SourcesSearchScope.prototype = {
41 /** 40 /**
42 * @param {!WebInspector.Progress} progress 41 * @param {!WebInspector.Progress} progress
43 * @param {function(boolean)} indexingFinishedCallback 42 * @param {function(boolean)} indexingFinishedCallback
44 */ 43 */
45 performIndexing: function(progress, indexingFinishedCallback) 44 performIndexing: function(progress, indexingFinishedCallback)
46 { 45 {
47 this.stopSearch(); 46 this.stopSearch();
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 78
80 /** 79 /**
81 * @param {!WebInspector.Project} project 80 * @param {!WebInspector.Project} project
82 * @return {boolean} 81 * @return {boolean}
83 */ 82 */
84 function filterOutContentScriptsIfNeeded(project) 83 function filterOutContentScriptsIfNeeded(project)
85 { 84 {
86 return WebInspector.settings.searchInContentScripts.get() || project .type() !== WebInspector.projectTypes.ContentScripts; 85 return WebInspector.settings.searchInContentScripts.get() || project .type() !== WebInspector.projectTypes.ContentScripts;
87 } 86 }
88 87
89 return this._workspace.projects().filter(filterOutServiceProjects).filte r(filterOutContentScriptsIfNeeded); 88 return WebInspector.workspace.projects().filter(filterOutServiceProjects ).filter(filterOutContentScriptsIfNeeded);
90 }, 89 },
91 90
92 /** 91 /**
93 * @param {!WebInspector.ProjectSearchConfig} searchConfig 92 * @param {!WebInspector.ProjectSearchConfig} searchConfig
94 * @param {!WebInspector.Progress} progress 93 * @param {!WebInspector.Progress} progress
95 * @param {function(!WebInspector.FileBasedSearchResult)} searchResultCallba ck 94 * @param {function(!WebInspector.FileBasedSearchResult)} searchResultCallba ck
96 * @param {function(boolean)} searchFinishedCallback 95 * @param {function(boolean)} searchFinishedCallback
97 */ 96 */
98 performSearch: function(searchConfig, progress, searchResultCallback, search FinishedCallback) 97 performSearch: function(searchConfig, progress, searchResultCallback, search FinishedCallback)
99 { 98 {
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 264
266 /** 265 /**
267 * @param {!WebInspector.ProjectSearchConfig} searchConfig 266 * @param {!WebInspector.ProjectSearchConfig} searchConfig
268 * @return {!WebInspector.FileBasedSearchResultsPane} 267 * @return {!WebInspector.FileBasedSearchResultsPane}
269 */ 268 */
270 createSearchResultsPane: function(searchConfig) 269 createSearchResultsPane: function(searchConfig)
271 { 270 {
272 return new WebInspector.FileBasedSearchResultsPane(searchConfig); 271 return new WebInspector.FileBasedSearchResultsPane(searchConfig);
273 } 272 }
274 } 273 }
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/inspector/search/sources-search-scope-in-files.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698