| 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 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1261 */ | 1261 */ |
| 1262 updateTitle(ignoreIsDirty) { | 1262 updateTitle(ignoreIsDirty) { |
| 1263 if (!this._treeElement) | 1263 if (!this._treeElement) |
| 1264 return; | 1264 return; |
| 1265 | 1265 |
| 1266 var titleText = this._uiSourceCode.displayName(); | 1266 var titleText = this._uiSourceCode.displayName(); |
| 1267 if (!ignoreIsDirty && | 1267 if (!ignoreIsDirty && |
| 1268 (this._uiSourceCode.isDirty() || Persistence.persistence.hasUnsavedCommi
ttedChanges(this._uiSourceCode))) | 1268 (this._uiSourceCode.isDirty() || Persistence.persistence.hasUnsavedCommi
ttedChanges(this._uiSourceCode))) |
| 1269 titleText = '*' + titleText; | 1269 titleText = '*' + titleText; |
| 1270 | 1270 |
| 1271 this._treeElement.title = titleText; |
| 1272 |
| 1271 var binding = Persistence.persistence.binding(this._uiSourceCode); | 1273 var binding = Persistence.persistence.binding(this._uiSourceCode); |
| 1272 if (binding && Runtime.experiments.isEnabled('persistence2')) { | 1274 if (binding && Runtime.experiments.isEnabled('persistence2')) { |
| 1273 var titleElement = createElement('span'); | 1275 var icon = UI.Icon.create('smallicon-green-checkmark'); |
| 1274 titleElement.textContent = titleText; | |
| 1275 var icon = UI.Icon.create('smallicon-checkmark', 'mapped-file-checkmark'); | |
| 1276 icon.title = Persistence.PersistenceUtils.tooltipForUISourceCode(this._uiS
ourceCode); | 1276 icon.title = Persistence.PersistenceUtils.tooltipForUISourceCode(this._uiS
ourceCode); |
| 1277 titleElement.appendChild(icon); | 1277 this._treeElement.setTrailingIcons([icon]); |
| 1278 this._treeElement.title = titleElement; | |
| 1279 } else { | 1278 } else { |
| 1280 this._treeElement.title = titleText; | 1279 this._treeElement.setTrailingIcons([]); |
| 1281 } | 1280 } |
| 1282 | 1281 |
| 1283 var tooltip = this._uiSourceCode.url(); | 1282 var tooltip = this._uiSourceCode.url(); |
| 1284 if (this._uiSourceCode.contentType().isFromSourceMap()) | 1283 if (this._uiSourceCode.contentType().isFromSourceMap()) |
| 1285 tooltip = Common.UIString('%s (from source map)', this._uiSourceCode.displ
ayName()); | 1284 tooltip = Common.UIString('%s (from source map)', this._uiSourceCode.displ
ayName()); |
| 1286 this._treeElement.tooltip = tooltip; | 1285 this._treeElement.tooltip = tooltip; |
| 1287 } | 1286 } |
| 1288 | 1287 |
| 1289 /** | 1288 /** |
| 1290 * @override | 1289 * @override |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1601 /** | 1600 /** |
| 1602 * @param {string} title | 1601 * @param {string} title |
| 1603 * @override | 1602 * @override |
| 1604 */ | 1603 */ |
| 1605 setTitle(title) { | 1604 setTitle(title) { |
| 1606 this._title = title; | 1605 this._title = title; |
| 1607 if (this._treeElement) | 1606 if (this._treeElement) |
| 1608 this._treeElement.title = this._title; | 1607 this._treeElement.title = this._title; |
| 1609 } | 1608 } |
| 1610 }; | 1609 }; |
| OLD | NEW |