| 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.ContentProvider} | 7 * @implements {WebInspector.ContentProvider} |
| 8 * @param {!WebInspector.ResourceType} contentType | 8 * @param {!WebInspector.ResourceType} contentType |
| 9 * @param {string} content | 9 * @param {string} content |
| 10 * @param {string=} contentURL | 10 * @param {string} contentURL |
| 11 */ | 11 */ |
| 12 WebInspector.StaticContentProvider = function(contentType, content, contentURL) | 12 WebInspector.StaticContentProvider = function(contentType, content, contentURL) |
| 13 { | 13 { |
| 14 this._content = content; | 14 this._content = content; |
| 15 this._contentType = contentType; | 15 this._contentType = contentType; |
| 16 this._contentURL = contentURL || ""; | 16 this._contentURL = contentURL; |
| 17 } | 17 } |
| 18 | 18 |
| 19 /** | 19 /** |
| 20 * @param {string} content | 20 * @param {string} content |
| 21 * @param {string} query | 21 * @param {string} query |
| 22 * @param {boolean} caseSensitive | 22 * @param {boolean} caseSensitive |
| 23 * @param {boolean} isRegex | 23 * @param {boolean} isRegex |
| 24 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} callbac
k | 24 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} callbac
k |
| 25 */ | 25 */ |
| 26 WebInspector.StaticContentProvider.searchInContent = function(content, query, ca
seSensitive, isRegex, callback) | 26 WebInspector.StaticContentProvider.searchInContent = function(content, query, ca
seSensitive, isRegex, callback) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 * @param {string} query | 67 * @param {string} query |
| 68 * @param {boolean} caseSensitive | 68 * @param {boolean} caseSensitive |
| 69 * @param {boolean} isRegex | 69 * @param {boolean} isRegex |
| 70 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal
lback | 70 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal
lback |
| 71 */ | 71 */ |
| 72 searchInContent: function(query, caseSensitive, isRegex, callback) | 72 searchInContent: function(query, caseSensitive, isRegex, callback) |
| 73 { | 73 { |
| 74 WebInspector.StaticContentProvider.searchInContent(this._content, query,
caseSensitive, isRegex, callback); | 74 WebInspector.StaticContentProvider.searchInContent(this._content, query,
caseSensitive, isRegex, callback); |
| 75 } | 75 } |
| 76 } | 76 } |
| OLD | NEW |