Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Side by Side Diff: chrome/browser/resources/options/deletable_item_list.js

Issue 780773002: Fix some closure compilation issues 8n order to update compiler.jar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: roll back *.jar Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 cr.define('options', function() { 5 cr.define('options', function() {
6 /** @const */ var List = cr.ui.List; 6 /** @const */ var List = cr.ui.List;
7 /** @const */ var ListItem = cr.ui.ListItem; 7 /** @const */ var ListItem = cr.ui.ListItem;
8 8
9 /** 9 /**
10 * Creates a deletable list item, which has a button that will trigger a call 10 * Creates a deletable list item, which has a button that will trigger a call
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 /** @override */ 145 /** @override */
146 decorate: function() { 146 decorate: function() {
147 List.prototype.decorate.call(this); 147 List.prototype.decorate.call(this);
148 this.addEventListener('click', this.handleClick); 148 this.addEventListener('click', this.handleClick);
149 this.addEventListener('keydown', this.handleKeyDown_); 149 this.addEventListener('keydown', this.handleKeyDown_);
150 }, 150 },
151 151
152 /** 152 /**
153 * Callback for onclick events. 153 * Callback for onclick events.
154 * @param {Event} e The click event object. 154 * @param {Event} e The click event object.
155 * @override 155 * @protected
156 */ 156 */
157 handleClick: function(e) { 157 handleClick: function(e) {
158 if (this.disabled) 158 if (this.disabled)
159 return; 159 return;
160 160
161 var target = e.target; 161 var target = e.target;
162 if (target.classList.contains('row-delete-button')) { 162 if (target.classList.contains('row-delete-button')) {
163 var listItem = this.getListItemAncestor( 163 var listItem = this.getListItemAncestor(
164 /** @type {HTMLElement} */(target)); 164 /** @type {HTMLElement} */(target));
165 var idx = this.getIndexOfListItem(listItem); 165 var idx = this.getIndexOfListItem(listItem);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 */ 205 */
206 deleteItemAtIndex: function(index) { 206 deleteItemAtIndex: function(index) {
207 }, 207 },
208 }; 208 };
209 209
210 return { 210 return {
211 DeletableItemList: DeletableItemList, 211 DeletableItemList: DeletableItemList,
212 DeletableItem: DeletableItem, 212 DeletableItem: DeletableItem,
213 }; 213 };
214 }); 214 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/controlled_setting.js ('k') | chrome/browser/resources/options/editable_text_field.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698