Chromium Code Reviews| 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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 187 /** | 187 /** |
| 188 * @param {string} actionId | 188 * @param {string} actionId |
| 189 * @return {!UI.ToolbarToggle} | 189 * @return {!UI.ToolbarToggle} |
| 190 */ | 190 */ |
| 191 static createActionButtonForId(actionId) { | 191 static createActionButtonForId(actionId) { |
| 192 const action = UI.actionRegistry.action(actionId); | 192 const action = UI.actionRegistry.action(actionId); |
| 193 return UI.Toolbar.createActionButton(/** @type {!UI.Action} */ (action)); | 193 return UI.Toolbar.createActionButton(/** @type {!UI.Action} */ (action)); |
| 194 } | 194 } |
| 195 | 195 |
| 196 /** | 196 /** |
| 197 * @return {!Element} | |
| 198 */ | |
| 199 contentElement() { | |
|
pfeldman
2017/06/01 21:26:56
Let's be more specific and name it gripElementForR
luoe
2017/06/01 21:32:07
Done, good idea.
| |
| 200 return this._contentElement; | |
| 201 } | |
| 202 | |
| 203 /** | |
| 197 * @param {boolean=} reverse | 204 * @param {boolean=} reverse |
| 198 * @param {boolean=} growVertically | 205 * @param {boolean=} growVertically |
| 199 */ | 206 */ |
| 200 makeWrappable(reverse, growVertically) { | 207 makeWrappable(reverse, growVertically) { |
| 201 this._contentElement.classList.add('wrappable'); | 208 this._contentElement.classList.add('wrappable'); |
| 202 this._reverse = !!reverse; | 209 this._reverse = !!reverse; |
| 203 if (reverse) | 210 if (reverse) |
| 204 this._contentElement.classList.add('wrappable-reverse'); | 211 this._contentElement.classList.add('wrappable-reverse'); |
| 205 if (growVertically) | 212 if (growVertically) |
| 206 this._contentElement.classList.add('toolbar-grow-vertical'); | 213 this._contentElement.classList.add('toolbar-grow-vertical'); |
| (...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1062 /** | 1069 /** |
| 1063 * @param {!Common.Setting} setting | 1070 * @param {!Common.Setting} setting |
| 1064 * @param {string=} tooltip | 1071 * @param {string=} tooltip |
| 1065 * @param {string=} alternateTitle | 1072 * @param {string=} alternateTitle |
| 1066 */ | 1073 */ |
| 1067 constructor(setting, tooltip, alternateTitle) { | 1074 constructor(setting, tooltip, alternateTitle) { |
| 1068 super(alternateTitle || setting.title() || '', tooltip); | 1075 super(alternateTitle || setting.title() || '', tooltip); |
| 1069 UI.SettingsUI.bindCheckbox(this.inputElement, setting); | 1076 UI.SettingsUI.bindCheckbox(this.inputElement, setting); |
| 1070 } | 1077 } |
| 1071 }; | 1078 }; |
| OLD | NEW |