OLD | NEW |
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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 */ | 107 */ |
108 contentChanged: function(newContent) | 108 contentChanged: function(newContent) |
109 { | 109 { |
110 console.assert(this._contentLoaded); | 110 console.assert(this._contentLoaded); |
111 this._content = newContent; | 111 this._content = newContent; |
112 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ContentCh
anged); | 112 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.ContentCh
anged); |
113 }, | 113 }, |
114 | 114 |
115 /** | 115 /** |
116 * @param {string} query | 116 * @param {string} query |
117 * @param {function(Array.<Object>)} callback | 117 * @param {boolean} caseSensitive |
| 118 * @param {boolean} isRegex |
| 119 * @param {function(Array.<WebInspector.ContentProvider.SearchMatch>)} callb
ack |
118 */ | 120 */ |
119 searchInContent: function(query, callback) | 121 searchInContent: function(query, caseSensitive, isRegex, callback) |
120 { | 122 { |
121 this._contentProvider.searchInContent(query, callback); | 123 this._contentProvider.searchInContent(query, caseSensitive, isRegex, cal
lback); |
122 }, | 124 }, |
123 | 125 |
124 /** | 126 /** |
125 * @param {string} mimeType | 127 * @param {string} mimeType |
126 * @param {string} content | 128 * @param {string} content |
127 */ | 129 */ |
128 _didRequestContent: function(mimeType, content) | 130 _didRequestContent: function(mimeType, content) |
129 { | 131 { |
130 this._contentLoaded = true; | 132 this._contentLoaded = true; |
131 this._mimeType = mimeType; | 133 this._mimeType = mimeType; |
(...skipping 11 matching lines...) Expand all Loading... |
143 */ | 145 */ |
144 WebInspector.ContentProvider = function() { } | 146 WebInspector.ContentProvider = function() { } |
145 WebInspector.ContentProvider.prototype = { | 147 WebInspector.ContentProvider.prototype = { |
146 /** | 148 /** |
147 * @param {function(string,string)} callback | 149 * @param {function(string,string)} callback |
148 */ | 150 */ |
149 requestContent: function(callback) { }, | 151 requestContent: function(callback) { }, |
150 | 152 |
151 /** | 153 /** |
152 * @param {string} query | 154 * @param {string} query |
| 155 * @param {boolean} caseSensitive |
| 156 * @param {boolean} isRegex |
153 * @param {function(Array.<WebInspector.ContentProvider.SearchMatch>)} callb
ack | 157 * @param {function(Array.<WebInspector.ContentProvider.SearchMatch>)} callb
ack |
154 */ | 158 */ |
155 searchInContent: function(query, callback) { } | 159 searchInContent: function(query, caseSensitive, isRegex, callback) { } |
156 } | 160 } |
157 | 161 |
158 /** | 162 /** |
159 * @constructor | 163 * @constructor |
160 * @param {number} lineNumber | 164 * @param {number} lineNumber |
161 * @param {string} lineContent | 165 * @param {string} lineContent |
162 */ | 166 */ |
163 WebInspector.ContentProvider.SearchMatch = function(lineNumber, lineContent) { | 167 WebInspector.ContentProvider.SearchMatch = function(lineNumber, lineContent) { |
164 this.lineNumber = lineNumber; | 168 this.lineNumber = lineNumber; |
165 this.lineContent = lineContent; | 169 this.lineContent = lineContent; |
166 } | 170 } |
OLD | NEW |