| 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 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 { | 356 { |
| 357 WebInspector.fileManager.save(this._url, /** @type {string} */ (content)
, forceSaveAs, callback.bind(this)); | 357 WebInspector.fileManager.save(this._url, /** @type {string} */ (content)
, forceSaveAs, callback.bind(this)); |
| 358 WebInspector.fileManager.close(this._url); | 358 WebInspector.fileManager.close(this._url); |
| 359 | 359 |
| 360 /** | 360 /** |
| 361 * @param {boolean} accepted | 361 * @param {boolean} accepted |
| 362 * @this {WebInspector.UISourceCode} | 362 * @this {WebInspector.UISourceCode} |
| 363 */ | 363 */ |
| 364 function callback(accepted) | 364 function callback(accepted) |
| 365 { | 365 { |
| 366 if (!accepted) | 366 this._savedWithFileManager = accepted; |
| 367 return; | 367 if (accepted) |
| 368 this._savedWithFileManager = true; | 368 this._hasCommittedChanges = false; |
| 369 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.Saved
StateUpdated); | 369 this.dispatchEventToListeners(WebInspector.UISourceCode.Events.Saved
StateUpdated); |
| 370 } | 370 } |
| 371 }, | 371 }, |
| 372 | 372 |
| 373 /** | 373 /** |
| 374 * @param {boolean} forceSaveAs | 374 * @param {boolean} forceSaveAs |
| 375 */ | 375 */ |
| 376 save: function(forceSaveAs) | 376 save: function(forceSaveAs) |
| 377 { | 377 { |
| 378 if (this.project().type() === WebInspector.projectTypes.FileSystem || th
is.project().type() === WebInspector.projectTypes.Snippets) { | 378 if (this.project().type() === WebInspector.projectTypes.FileSystem || th
is.project().type() === WebInspector.projectTypes.Snippets) { |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 * @param {string} query | 702 * @param {string} query |
| 703 * @param {boolean} caseSensitive | 703 * @param {boolean} caseSensitive |
| 704 * @param {boolean} isRegex | 704 * @param {boolean} isRegex |
| 705 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal
lback | 705 * @param {function(!Array.<!WebInspector.ContentProvider.SearchMatch>)} cal
lback |
| 706 */ | 706 */ |
| 707 searchInContent: function(query, caseSensitive, isRegex, callback) | 707 searchInContent: function(query, caseSensitive, isRegex, callback) |
| 708 { | 708 { |
| 709 callback([]); | 709 callback([]); |
| 710 } | 710 } |
| 711 } | 711 } |
| OLD | NEW |