| 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 * 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 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 } | 545 } |
| 546 | 546 |
| 547 /** | 547 /** |
| 548 * @param {!WebInspector.UISourceCode} uiSourceCode | 548 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 549 */ | 549 */ |
| 550 _updateFileTitle(uiSourceCode) { | 550 _updateFileTitle(uiSourceCode) { |
| 551 var tabId = this._tabIds.get(uiSourceCode); | 551 var tabId = this._tabIds.get(uiSourceCode); |
| 552 if (tabId) { | 552 if (tabId) { |
| 553 var title = this._titleForFile(uiSourceCode); | 553 var title = this._titleForFile(uiSourceCode); |
| 554 this._tabbedPane.changeTabTitle(tabId, title); | 554 this._tabbedPane.changeTabTitle(tabId, title); |
| 555 if (WebInspector.persistence.hasUnsavedCommittedChanges(uiSourceCode)) | 555 if (WebInspector.persistence.hasUnsavedCommittedChanges(uiSourceCode)) { |
| 556 this._tabbedPane.setTabIcon( | 556 this._tabbedPane.setTabIcon( |
| 557 tabId, 'smallicon-warning', WebInspector.UIString('Changes to this f
ile were not saved to file system.')); | 557 tabId, 'smallicon-warning', WebInspector.UIString('Changes to this f
ile were not saved to file system.')); |
| 558 else | 558 } else if (Runtime.experiments.isEnabled('persistence2') && WebInspector.p
ersistence.binding(uiSourceCode)) { |
| 559 var binding = WebInspector.persistence.binding(uiSourceCode); |
| 560 this._tabbedPane.setTabIcon(tabId, 'smallicon-green-checkmark', WebInspe
ctor.PersistenceUtils.tooltipForUISourceCode(binding.fileSystem)); |
| 561 } else { |
| 559 this._tabbedPane.setTabIcon(tabId, ''); | 562 this._tabbedPane.setTabIcon(tabId, ''); |
| 563 } |
| 560 } | 564 } |
| 561 } | 565 } |
| 562 | 566 |
| 563 _uiSourceCodeTitleChanged(event) { | 567 _uiSourceCodeTitleChanged(event) { |
| 564 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.target); | 568 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.target); |
| 565 this._updateFileTitle(uiSourceCode); | 569 this._updateFileTitle(uiSourceCode); |
| 566 this._updateHistory(); | 570 this._updateHistory(); |
| 567 } | 571 } |
| 568 | 572 |
| 569 _uiSourceCodeWorkingCopyChanged(event) { | 573 _uiSourceCodeWorkingCopyChanged(event) { |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 | 818 |
| 815 /** | 819 /** |
| 816 * @override | 820 * @override |
| 817 * @param {string} tabId | 821 * @param {string} tabId |
| 818 * @param {!WebInspector.ContextMenu} contextMenu | 822 * @param {!WebInspector.ContextMenu} contextMenu |
| 819 */ | 823 */ |
| 820 onContextMenu(tabId, contextMenu) { | 824 onContextMenu(tabId, contextMenu) { |
| 821 this._editorContainer._onContextMenu(tabId, contextMenu); | 825 this._editorContainer._onContextMenu(tabId, contextMenu); |
| 822 } | 826 } |
| 823 }; | 827 }; |
| OLD | NEW |