Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @typedef {{afterHighlight: string, | 6 * @typedef {{afterHighlight: string, |
| 7 * beforeHighlight: string, | 7 * beforeHighlight: string, |
| 8 * highlight: string, | 8 * highlight: string, |
| 9 * title: string}} | 9 * title: string}} |
| 10 */ | 10 */ |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 23 div.__proto__ = ExtensionCode.prototype; | 23 div.__proto__ = ExtensionCode.prototype; |
| 24 return div; | 24 return div; |
| 25 } | 25 } |
| 26 | 26 |
| 27 ExtensionCode.prototype = { | 27 ExtensionCode.prototype = { |
| 28 __proto__: HTMLDivElement.prototype, | 28 __proto__: HTMLDivElement.prototype, |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * Populate the content area of the code div with the given code. This will | 31 * Populate the content area of the code div with the given code. This will |
| 32 * highlight the erroneous section (if any). | 32 * highlight the erroneous section (if any). |
| 33 * @param {ExtensionHighlight} code The 'highlight' strings represent the | 33 * @param {?ExtensionHighlight} code The 'highlight' strings represent the |
|
Devlin
2015/03/09 17:35:51
This fixes the compilation error, but why is it ne
| |
| 34 * three portions of the file's content to display - the portion which | 34 * three portions of the file's content to display - the portion which |
| 35 * is most relevant and should be emphasized (highlight), and the parts | 35 * is most relevant and should be emphasized (highlight), and the parts |
| 36 * both before and after this portion. The title is the error message, | 36 * both before and after this portion. The title is the error message, |
| 37 * which will be the mouseover hint for the highlighted region. These | 37 * which will be the mouseover hint for the highlighted region. These |
| 38 * may be empty. | 38 * may be empty. |
| 39 * @param {string} emptyMessage The message to display if the code | 39 * @param {string} emptyMessage The message to display if the code |
| 40 * object is empty (e.g., 'could not load code'). | 40 * object is empty (e.g., 'could not load code'). |
| 41 */ | 41 */ |
| 42 populate: function(code, emptyMessage) { | 42 populate: function(code, emptyMessage) { |
| 43 // Clear any remnant content, so we don't have multiple code listed. | 43 // Clear any remnant content, so we don't have multiple code listed. |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 109 if (errorSpan) | 109 if (errorSpan) |
| 110 this.scrollTop = errorSpan.offsetTop - this.clientHeight / 2; | 110 this.scrollTop = errorSpan.offsetTop - this.clientHeight / 2; |
| 111 } | 111 } |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 // Export | 114 // Export |
| 115 return { | 115 return { |
| 116 ExtensionCode: ExtensionCode | 116 ExtensionCode: ExtensionCode |
| 117 }; | 117 }; |
| 118 }); | 118 }); |
| OLD | NEW |