| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 * @unrestricted | 5 * @unrestricted |
| 6 */ | 6 */ |
| 7 UI.ListWidget = class extends UI.VBox { | 7 UI.ListWidget = class extends UI.VBox { |
| 8 /** | 8 /** |
| 9 * @param {!UI.ListWidget.Delegate} delegate | 9 * @param {!UI.ListWidget.Delegate} delegate |
| 10 */ | 10 */ |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 this._updatePlaceholder(); | 107 this._updatePlaceholder(); |
| 108 } | 108 } |
| 109 | 109 |
| 110 /** | 110 /** |
| 111 * @param {*} item | 111 * @param {*} item |
| 112 * @param {!Element} element | 112 * @param {!Element} element |
| 113 * @return {!Element} | 113 * @return {!Element} |
| 114 */ | 114 */ |
| 115 _createControls(item, element) { | 115 _createControls(item, element) { |
| 116 var controls = createElementWithClass('div', 'controls-container fill'); | 116 var controls = createElementWithClass('div', 'controls-container fill'); |
| 117 var gradient = controls.createChild('div', 'controls-gradient'); | 117 controls.createChild('div', 'controls-gradient'); |
| 118 var buttons = controls.createChild('div', 'controls-buttons'); | 118 var buttons = controls.createChild('div', 'controls-buttons'); |
| 119 | 119 |
| 120 var editButton = buttons.createChild('div', 'edit-button'); | 120 var editButton = buttons.createChild('div', 'edit-button'); |
| 121 editButton.title = Common.UIString('Edit'); | 121 editButton.title = Common.UIString('Edit'); |
| 122 editButton.addEventListener('click', onEditClicked.bind(this), false); | 122 editButton.addEventListener('click', onEditClicked.bind(this), false); |
| 123 | 123 |
| 124 var removeButton = buttons.createChild('div', 'remove-button'); | 124 var removeButton = buttons.createChild('div', 'remove-button'); |
| 125 removeButton.title = Common.UIString('Remove'); | 125 removeButton.title = Common.UIString('Remove'); |
| 126 removeButton.addEventListener('click', onRemoveClicked.bind(this), false); | 126 removeButton.addEventListener('click', onRemoveClicked.bind(this), false); |
| 127 | 127 |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 | 399 |
| 400 _cancelClicked() { | 400 _cancelClicked() { |
| 401 var cancel = this._cancel; | 401 var cancel = this._cancel; |
| 402 this._commit = null; | 402 this._commit = null; |
| 403 this._cancel = null; | 403 this._cancel = null; |
| 404 this._item = null; | 404 this._item = null; |
| 405 this._index = -1; | 405 this._index = -1; |
| 406 cancel(); | 406 cancel(); |
| 407 } | 407 } |
| 408 }; | 408 }; |
| OLD | NEW |