| 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 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 isDirty: function() | 516 isDirty: function() |
| 517 { | 517 { |
| 518 return typeof this._workingCopy !== "undefined" || typeof this._workingC
opyGetter !== "undefined"; | 518 return typeof this._workingCopy !== "undefined" || typeof this._workingC
opyGetter !== "undefined"; |
| 519 }, | 519 }, |
| 520 | 520 |
| 521 /** | 521 /** |
| 522 * @return {string} | 522 * @return {string} |
| 523 */ | 523 */ |
| 524 extension: function() | 524 extension: function() |
| 525 { | 525 { |
| 526 var lastIndexOfDot = this._name.lastIndexOf("."); | 526 return WebInspector.TextUtils.extension(this._name); |
| 527 var extension = lastIndexOfDot !== -1 ? this._name.substr(lastIndexOfDot
+ 1) : ""; | |
| 528 var indexOfQuestionMark = extension.indexOf("?"); | |
| 529 if (indexOfQuestionMark !== -1) | |
| 530 extension = extension.substr(0, indexOfQuestionMark); | |
| 531 return extension; | |
| 532 }, | 527 }, |
| 533 | 528 |
| 534 /** | 529 /** |
| 535 * @return {?string} | 530 * @return {?string} |
| 536 */ | 531 */ |
| 537 content: function() | 532 content: function() |
| 538 { | 533 { |
| 539 return this._content; | 534 return this._content; |
| 540 }, | 535 }, |
| 541 | 536 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 * @param {string} query | 717 * @param {string} query |
| 723 * @param {boolean} caseSensitive | 718 * @param {boolean} caseSensitive |
| 724 * @param {boolean} isRegex | 719 * @param {boolean} isRegex |
| 725 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal
lback | 720 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal
lback |
| 726 */ | 721 */ |
| 727 searchInContent: function(query, caseSensitive, isRegex, callback) | 722 searchInContent: function(query, caseSensitive, isRegex, callback) |
| 728 { | 723 { |
| 729 callback([]); | 724 callback([]); |
| 730 } | 725 } |
| 731 } | 726 } |
| OLD | NEW |