| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 * @override | 546 * @override |
| 547 * @return {!WebInspector.ResourceType} | 547 * @return {!WebInspector.ResourceType} |
| 548 */ | 548 */ |
| 549 contentType: function() | 549 contentType: function() |
| 550 { | 550 { |
| 551 return WebInspector.resourceTypes.Script; | 551 return WebInspector.resourceTypes.Script; |
| 552 }, | 552 }, |
| 553 | 553 |
| 554 /** | 554 /** |
| 555 * @override | 555 * @override |
| 556 * @param {function(?string)} callback | 556 * @return {!Promise<?string>} |
| 557 */ | 557 */ |
| 558 requestContent: function(callback) | 558 requestContent: function() |
| 559 { | 559 { |
| 560 callback(this._snippet.content); | 560 return Promise.resolve(/** @type {?string} */(this._snippet.content)); |
| 561 }, | 561 }, |
| 562 | 562 |
| 563 /** | 563 /** |
| 564 * @override | 564 * @override |
| 565 * @param {string} query | 565 * @param {string} query |
| 566 * @param {boolean} caseSensitive | 566 * @param {boolean} caseSensitive |
| 567 * @param {boolean} isRegex | 567 * @param {boolean} isRegex |
| 568 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal
lback | 568 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal
lback |
| 569 */ | 569 */ |
| 570 searchInContent: function(query, caseSensitive, isRegex, callback) | 570 searchInContent: function(query, caseSensitive, isRegex, callback) |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 this._model.deleteScriptSnippet(url); | 667 this._model.deleteScriptSnippet(url); |
| 668 }, | 668 }, |
| 669 | 669 |
| 670 __proto__: WebInspector.ContentProviderBasedProject.prototype | 670 __proto__: WebInspector.ContentProviderBasedProject.prototype |
| 671 } | 671 } |
| 672 | 672 |
| 673 /** | 673 /** |
| 674 * @type {!WebInspector.ScriptSnippetModel} | 674 * @type {!WebInspector.ScriptSnippetModel} |
| 675 */ | 675 */ |
| 676 WebInspector.scriptSnippetModel = new WebInspector.ScriptSnippetModel(WebInspect
or.workspace); | 676 WebInspector.scriptSnippetModel = new WebInspector.ScriptSnippetModel(WebInspect
or.workspace); |
| OLD | NEW |