| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 /** | 452 /** |
| 453 * @param {string=} text | 453 * @param {string=} text |
| 454 */ | 454 */ |
| 455 constructor(text) { | 455 constructor(text) { |
| 456 super(createElementWithClass('div', 'toolbar-text')); | 456 super(createElementWithClass('div', 'toolbar-text')); |
| 457 this.element.classList.add('toolbar-text'); | 457 this.element.classList.add('toolbar-text'); |
| 458 this.setText(text || ''); | 458 this.setText(text || ''); |
| 459 } | 459 } |
| 460 | 460 |
| 461 /** | 461 /** |
| 462 * @return {string} |
| 463 */ |
| 464 text() { |
| 465 return this.element.textContent; |
| 466 } |
| 467 |
| 468 /** |
| 462 * @param {string} text | 469 * @param {string} text |
| 463 */ | 470 */ |
| 464 setText(text) { | 471 setText(text) { |
| 465 this.element.textContent = text; | 472 this.element.textContent = text; |
| 466 } | 473 } |
| 467 }; | 474 }; |
| 468 | 475 |
| 469 /** | 476 /** |
| 470 * @unrestricted | 477 * @unrestricted |
| 471 */ | 478 */ |
| (...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 /** | 1075 /** |
| 1069 * @param {!Common.Setting} setting | 1076 * @param {!Common.Setting} setting |
| 1070 * @param {string=} tooltip | 1077 * @param {string=} tooltip |
| 1071 * @param {string=} alternateTitle | 1078 * @param {string=} alternateTitle |
| 1072 */ | 1079 */ |
| 1073 constructor(setting, tooltip, alternateTitle) { | 1080 constructor(setting, tooltip, alternateTitle) { |
| 1074 super(alternateTitle || setting.title() || '', tooltip); | 1081 super(alternateTitle || setting.title() || '', tooltip); |
| 1075 UI.SettingsUI.bindCheckbox(this.inputElement, setting); | 1082 UI.SettingsUI.bindCheckbox(this.inputElement, setting); |
| 1076 } | 1083 } |
| 1077 }; | 1084 }; |
| OLD | NEW |