OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 /** |
| 6 * @typedef {Array<!WebInspector.SearchResult>} |
| 7 * @property {string} source |
| 8 */ |
| 9 WebInspector.SearchResultArray; |
| 10 |
| 11 /** |
| 12 * @constructor |
| 13 * @param {number} line |
| 14 * @param {string} lineContent |
| 15 */ |
| 16 WebInspector.SearchResult = function(line, lineContent) |
| 17 { |
| 18 this._line = line; |
| 19 this._lineContent = lineContent; |
| 20 } |
| 21 WebInspector.SearchResult.prototype = { |
| 22 /** |
| 23 * @return {number} |
| 24 */ |
| 25 line: function() { |
| 26 return this._line; |
| 27 }, |
| 28 |
| 29 /** |
| 30 * @return {string} |
| 31 */ |
| 32 lineContent: function() { |
| 33 return this._lineContent; |
| 34 } |
| 35 } |
| 36 |
| 37 /** |
| 38 * @constructor |
| 39 * @param {string} text |
| 40 * @param {!Array<!WebInspector.SearchResultArray>} results |
| 41 */ |
| 42 WebInspector.SearchResultsCollection = function(text, results) |
| 43 { |
| 44 this._text = text; |
| 45 this._results = results; |
| 46 } |
| 47 |
| 48 WebInspector.SearchResultsCollection.prototype = { |
| 49 /** |
| 50 * @return {string} |
| 51 */ |
| 52 highlightText: function() { |
| 53 return this._text; |
| 54 }, |
| 55 |
| 56 /** |
| 57 * @return {!Array<!WebInspector.SearchResultArray>} |
| 58 */ |
| 59 results: function() { |
| 60 return this._results; |
| 61 } |
| 62 } |
OLD | NEW |