| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 this._boundWindowFocused = this._windowFocused.bind(this); | 84 this._boundWindowFocused = this._windowFocused.bind(this); |
| 85 this.element.ownerDocument.defaultView.addEventListener("focus", this._b
oundWindowFocused, false); | 85 this.element.ownerDocument.defaultView.addEventListener("focus", this._b
oundWindowFocused, false); |
| 86 this._checkContentUpdated(); | 86 this._checkContentUpdated(); |
| 87 // We need CodeMirrorTextEditor to be initialized prior to this call as
it calls |cursorPositionToCoordinates| internally. @see crbug.com/506566 | 87 // We need CodeMirrorTextEditor to be initialized prior to this call as
it calls |cursorPositionToCoordinates| internally. @see crbug.com/506566 |
| 88 setImmediate(this._updateBucketDecorations.bind(this)); | 88 setImmediate(this._updateBucketDecorations.bind(this)); |
| 89 }, | 89 }, |
| 90 | 90 |
| 91 willHide: function() | 91 willHide: function() |
| 92 { | 92 { |
| 93 WebInspector.SourceFrame.prototype.willHide.call(this); | 93 WebInspector.SourceFrame.prototype.willHide.call(this); |
| 94 WebInspector.context.setFlavor(WebInspector.UISourceCodeFrame, null); |
| 94 this.element.ownerDocument.defaultView.removeEventListener("focus", this
._boundWindowFocused, false); | 95 this.element.ownerDocument.defaultView.removeEventListener("focus", this
._boundWindowFocused, false); |
| 95 delete this._boundWindowFocused; | 96 delete this._boundWindowFocused; |
| 96 this._uiSourceCode.removeWorkingCopyGetter(); | 97 this._uiSourceCode.removeWorkingCopyGetter(); |
| 97 }, | 98 }, |
| 98 | 99 |
| 99 /** | 100 /** |
| 100 * @override | 101 * @override |
| 102 */ |
| 103 editorFocused: function() |
| 104 { |
| 105 WebInspector.SourceFrame.prototype.editorFocused.call(this); |
| 106 WebInspector.context.setFlavor(WebInspector.UISourceCodeFrame, this); |
| 107 }, |
| 108 |
| 109 /** |
| 110 * @override |
| 111 */ |
| 112 editorBlurred: function() |
| 113 { |
| 114 WebInspector.context.setFlavor(WebInspector.UISourceCodeFrame, null); |
| 115 WebInspector.SourceFrame.prototype.editorBlurred.call(this); |
| 116 }, |
| 117 |
| 118 /** |
| 119 * @override |
| 101 * @return {boolean} | 120 * @return {boolean} |
| 102 */ | 121 */ |
| 103 canEditSource: function() | 122 canEditSource: function() |
| 104 { | 123 { |
| 105 var projectType = this._uiSourceCode.project().type(); | 124 var projectType = this._uiSourceCode.project().type(); |
| 106 if (projectType === WebInspector.projectTypes.Service || projectType ===
WebInspector.projectTypes.Debugger || projectType === WebInspector.projectTypes
.Formatter) | 125 if (projectType === WebInspector.projectTypes.Service || projectType ===
WebInspector.projectTypes.Debugger || projectType === WebInspector.projectTypes
.Formatter) |
| 107 return false; | 126 return false; |
| 108 if (projectType === WebInspector.projectTypes.Network && this._uiSourceC
ode.contentType() === WebInspector.resourceTypes.Document) | 127 if (projectType === WebInspector.projectTypes.Network && this._uiSourceC
ode.contentType() === WebInspector.resourceTypes.Document) |
| 109 return false; | 128 return false; |
| 110 return true; | 129 return true; |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 | 666 |
| 648 /** | 667 /** |
| 649 * @param {!WebInspector.UISourceCode.Message} a | 668 * @param {!WebInspector.UISourceCode.Message} a |
| 650 * @param {!WebInspector.UISourceCode.Message} b | 669 * @param {!WebInspector.UISourceCode.Message} b |
| 651 * @return {number} | 670 * @return {number} |
| 652 */ | 671 */ |
| 653 WebInspector.UISourceCode.Message.messageLevelComparator = function(a, b) | 672 WebInspector.UISourceCode.Message.messageLevelComparator = function(a, b) |
| 654 { | 673 { |
| 655 return WebInspector.UISourceCode.Message._messageLevelPriority[a.level()] -
WebInspector.UISourceCode.Message._messageLevelPriority[b.level()]; | 674 return WebInspector.UISourceCode.Message._messageLevelPriority[a.level()] -
WebInspector.UISourceCode.Message._messageLevelPriority[b.level()]; |
| 656 } | 675 } |
| OLD | NEW |