Index: Source/devtools/front_end/components/SearchData.js |
diff --git a/Source/devtools/front_end/components/SearchData.js b/Source/devtools/front_end/components/SearchData.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..dab2ed4add690718484beb64f0b4a6504fd5a08a |
--- /dev/null |
+++ b/Source/devtools/front_end/components/SearchData.js |
@@ -0,0 +1,62 @@ |
+// Copyright (c) 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+/** |
+ * @typedef {Array<!WebInspector.SearchResult>} |
+ * @property {string} source |
+ */ |
+WebInspector.SearchResultArray; |
+ |
+/** |
+ * @constructor |
+ * @param {number} line |
+ * @param {string} lineContent |
+ */ |
+WebInspector.SearchResult = function(line, lineContent) |
+{ |
+ this._line = line; |
+ this._lineContent = lineContent; |
+} |
+WebInspector.SearchResult.prototype = { |
+ /** |
+ * @return {number} |
+ */ |
+ line: function() { |
+ return this._line; |
+ }, |
+ |
+ /** |
+ * @return {string} |
+ */ |
+ lineContent: function() { |
+ return this._lineContent; |
+ } |
+} |
+ |
+/** |
+ * @constructor |
+ * @param {string} text |
+ * @param {!Array<!WebInspector.SearchResultArray>} results |
+ */ |
+WebInspector.SearchResultsCollection = function(text, results) |
+{ |
+ this._text = text; |
+ this._results = results; |
+} |
+ |
+WebInspector.SearchResultsCollection.prototype = { |
+ /** |
+ * @return {string} |
+ */ |
+ highlightText: function() { |
+ return this._text; |
+ }, |
+ |
+ /** |
+ * @return {!Array<!WebInspector.SearchResultArray>} |
+ */ |
+ results: function() { |
+ return this._results; |
+ } |
+} |