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