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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 { | 220 { |
221 return this._contentType; | 221 return this._contentType; |
222 }, | 222 }, |
223 | 223 |
224 /** | 224 /** |
225 * @override | 225 * @override |
226 * @param {function(?string)} callback | 226 * @param {function(?string)} callback |
227 */ | 227 */ |
228 requestContent: function(callback) | 228 requestContent: function(callback) |
229 { | 229 { |
230 this._target.networkAgent().loadResourceForFrontend(WebInspector.resourc
eTreeModel.mainFrame.id, this._sourceURL, undefined, contentLoaded.bind(this)); | 230 this._target.networkAgent().loadResourceForFrontend(this._target.resourc
eTreeModel.mainFrame.id, this._sourceURL, undefined, contentLoaded.bind(this)); |
231 | 231 |
232 /** | 232 /** |
233 * @param {?Protocol.Error} error | 233 * @param {?Protocol.Error} error |
234 * @param {number} statusCode | 234 * @param {number} statusCode |
235 * @param {!NetworkAgent.Headers} headers | 235 * @param {!NetworkAgent.Headers} headers |
236 * @param {string} content | 236 * @param {string} content |
237 * @this {WebInspector.CompilerSourceMappingContentProvider} | 237 * @this {WebInspector.CompilerSourceMappingContentProvider} |
238 */ | 238 */ |
239 function contentLoaded(error, statusCode, headers, content) | 239 function contentLoaded(error, statusCode, headers, content) |
240 { | 240 { |
(...skipping 25 matching lines...) Expand all Loading... |
266 { | 266 { |
267 if (typeof content !== "string") { | 267 if (typeof content !== "string") { |
268 callback([]); | 268 callback([]); |
269 return; | 269 return; |
270 } | 270 } |
271 | 271 |
272 callback(WebInspector.ContentProvider.performSearchInContent(content
, query, caseSensitive, isRegex)); | 272 callback(WebInspector.ContentProvider.performSearchInContent(content
, query, caseSensitive, isRegex)); |
273 } | 273 } |
274 } | 274 } |
275 } | 275 } |
OLD | NEW |