| 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 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 if (this._toggled === toggled) | 612 if (this._toggled === toggled) |
| 613 return; | 613 return; |
| 614 this._toggled = toggled; | 614 this._toggled = toggled; |
| 615 this.element.classList.toggle('toolbar-state-on', toggled); | 615 this.element.classList.toggle('toolbar-state-on', toggled); |
| 616 this.element.classList.toggle('toolbar-state-off', !toggled); | 616 this.element.classList.toggle('toolbar-state-off', !toggled); |
| 617 if (this._toggledGlyph && this._untoggledGlyph) | 617 if (this._toggledGlyph && this._untoggledGlyph) |
| 618 this.setGlyph(toggled ? this._toggledGlyph : this._untoggledGlyph); | 618 this.setGlyph(toggled ? this._toggledGlyph : this._untoggledGlyph); |
| 619 } | 619 } |
| 620 | 620 |
| 621 /** | 621 /** |
| 622 * @param {boolean} withRedColor |
| 623 */ |
| 624 setDefaultWithRedColor(withRedColor) { |
| 625 this.element.classList.toggle('toolbar-default-with-red-color', withRedColor
); |
| 626 } |
| 627 |
| 628 /** |
| 622 * @param {boolean} toggleWithRedColor | 629 * @param {boolean} toggleWithRedColor |
| 623 */ | 630 */ |
| 624 setToggleWithRedColor(toggleWithRedColor) { | 631 setToggleWithRedColor(toggleWithRedColor) { |
| 625 this.element.classList.toggle('toolbar-toggle-with-red-color', toggleWithRed
Color); | 632 this.element.classList.toggle('toolbar-toggle-with-red-color', toggleWithRed
Color); |
| 626 } | 633 } |
| 627 }; | 634 }; |
| 628 | 635 |
| 629 | 636 |
| 630 /** | 637 /** |
| 631 * @unrestricted | 638 * @unrestricted |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 return this.inputElement.checked; | 912 return this.inputElement.checked; |
| 906 } | 913 } |
| 907 | 914 |
| 908 /** | 915 /** |
| 909 * @param {boolean} value | 916 * @param {boolean} value |
| 910 */ | 917 */ |
| 911 setChecked(value) { | 918 setChecked(value) { |
| 912 this.inputElement.checked = value; | 919 this.inputElement.checked = value; |
| 913 } | 920 } |
| 914 }; | 921 }; |
| OLD | NEW |