Chromium Code Reviews| 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 251 this._removeMessageFromSource(message); | 251 this._removeMessageFromSource(message); |
| 252 Common.EventTarget.removeEventListeners(this._messageAndDecorationListeners) ; | 252 Common.EventTarget.removeEventListeners(this._messageAndDecorationListeners) ; |
| 253 | 253 |
| 254 this._persistenceBinding = binding; | 254 this._persistenceBinding = binding; |
| 255 | 255 |
| 256 for (var message of this._allMessages()) | 256 for (var message of this._allMessages()) |
| 257 this._addMessageToSource(message); | 257 this._addMessageToSource(message); |
| 258 this._installMessageAndDecorationListeners(); | 258 this._installMessageAndDecorationListeners(); |
| 259 this._updateStyle(); | 259 this._updateStyle(); |
| 260 this._decorateAllTypes(); | 260 this._decorateAllTypes(); |
| 261 this.onBindingChanged(); | |
| 262 } | |
| 263 | |
| 264 onBindingChanged() { | |
|
dgozman
2016/12/06 01:14:27
@protected
lushnikov
2016/12/06 02:21:05
Done.
| |
| 265 // Overriden in subclasses. | |
| 261 } | 266 } |
| 262 | 267 |
| 263 _updateStyle() { | 268 _updateStyle() { |
| 264 this.element.classList.toggle( | 269 this.element.classList.toggle( |
| 265 'source-frame-unsaved-committed-changes', | 270 'source-frame-unsaved-committed-changes', |
| 266 Persistence.persistence.hasUnsavedCommittedChanges(this._uiSourceCode)); | 271 Persistence.persistence.hasUnsavedCommittedChanges(this._uiSourceCode)); |
| 267 this.setEditable(!this._canEditSource()); | 272 this.setEditable(!this._canEditSource()); |
| 268 } | 273 } |
| 269 | 274 |
| 270 onUISourceCodeContentChanged() { | 275 onUISourceCodeContentChanged() { |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 686 | 691 |
| 687 /** | 692 /** |
| 688 * @param {!Workspace.UISourceCode.Message} a | 693 * @param {!Workspace.UISourceCode.Message} a |
| 689 * @param {!Workspace.UISourceCode.Message} b | 694 * @param {!Workspace.UISourceCode.Message} b |
| 690 * @return {number} | 695 * @return {number} |
| 691 */ | 696 */ |
| 692 Workspace.UISourceCode.Message.messageLevelComparator = function(a, b) { | 697 Workspace.UISourceCode.Message.messageLevelComparator = function(a, b) { |
| 693 return Workspace.UISourceCode.Message._messageLevelPriority[a.level()] - | 698 return Workspace.UISourceCode.Message._messageLevelPriority[a.level()] - |
| 694 Workspace.UISourceCode.Message._messageLevelPriority[b.level()]; | 699 Workspace.UISourceCode.Message._messageLevelPriority[b.level()]; |
| 695 }; | 700 }; |
| OLD | NEW |