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

Unified Diff: Source/devtools/front_end/components/SearchData.js

Issue 1264133002: Devtools: [WIP] Implement enhanced devtools extension language APIs Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Small cleanups - prefer URIs to contentURLs, revert protocol unifications, remove lambdas Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
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;
+ }
+}
« no previous file with comments | « Source/devtools/front_end/components/ExecutionContextSelector.js ('k') | Source/devtools/front_end/components/module.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698