| 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 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * | 10 * |
| (...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1336 | 1336 |
| 1337 /** | 1337 /** |
| 1338 * @param {!Element} element | 1338 * @param {!Element} element |
| 1339 * @param {string} newTitle | 1339 * @param {string} newTitle |
| 1340 * @param {string} oldTitle | 1340 * @param {string} oldTitle |
| 1341 * @this {Sources.NavigatorUISourceCodeTreeNode} | 1341 * @this {Sources.NavigatorUISourceCodeTreeNode} |
| 1342 */ | 1342 */ |
| 1343 function commitHandler(element, newTitle, oldTitle) { | 1343 function commitHandler(element, newTitle, oldTitle) { |
| 1344 if (newTitle !== oldTitle) { | 1344 if (newTitle !== oldTitle) { |
| 1345 this._treeElement.title = newTitle; | 1345 this._treeElement.title = newTitle; |
| 1346 this._uiSourceCode.rename(newTitle, renameCallback.bind(this)); | 1346 this._uiSourceCode.rename(newTitle).then(renameCallback.bind(this)); |
| 1347 return; | 1347 return; |
| 1348 } | 1348 } |
| 1349 afterEditing.call(this, true); | 1349 afterEditing.call(this, true); |
| 1350 } | 1350 } |
| 1351 | 1351 |
| 1352 /** | 1352 /** |
| 1353 * @param {boolean} success | 1353 * @param {boolean} success |
| 1354 * @this {Sources.NavigatorUISourceCodeTreeNode} | 1354 * @this {Sources.NavigatorUISourceCodeTreeNode} |
| 1355 */ | 1355 */ |
| 1356 function renameCallback(success) { | 1356 function renameCallback(success) { |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1612 /** | 1612 /** |
| 1613 * @param {string} title | 1613 * @param {string} title |
| 1614 * @override | 1614 * @override |
| 1615 */ | 1615 */ |
| 1616 setTitle(title) { | 1616 setTitle(title) { |
| 1617 this._title = title; | 1617 this._title = title; |
| 1618 if (this._treeElement) | 1618 if (this._treeElement) |
| 1619 this._treeElement.title = this._title; | 1619 this._treeElement.title = this._title; |
| 1620 } | 1620 } |
| 1621 }; | 1621 }; |
| OLD | NEW |