| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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.contentSettings', function() { | 5 cr.define('options.contentSettings', function() { |
| 6 const InlineEditableItemList = options.InlineEditableItemList; | 6 const InlineEditableItemList = options.InlineEditableItemList; |
| 7 const InlineEditableItem = options.InlineEditableItem; | 7 const InlineEditableItem = options.InlineEditableItem; |
| 8 const ArrayDataModel = cr.ui.ArrayDataModel; | 8 const ArrayDataModel = cr.ui.ArrayDataModel; |
| 9 | 9 |
| 10 /** | 10 /** |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 return this.input.value != ''; | 313 return this.input.value != ''; |
| 314 }, | 314 }, |
| 315 | 315 |
| 316 /** | 316 /** |
| 317 * Editing is complete; update the model. As long as the pattern isn't | 317 * Editing is complete; update the model. As long as the pattern isn't |
| 318 * empty, we'll just add it. | 318 * empty, we'll just add it. |
| 319 * @param {string} newPattern The pattern that the user entered. | 319 * @param {string} newPattern The pattern that the user entered. |
| 320 * @param {string} newSetting The setting the user chose. | 320 * @param {string} newSetting The setting the user chose. |
| 321 */ | 321 */ |
| 322 finishEdit: function(newPattern, newSetting) { | 322 finishEdit: function(newPattern, newSetting) { |
| 323 this.resetInput(); |
| 323 chrome.send('setException', | 324 chrome.send('setException', |
| 324 [this.contentType, this.mode, newPattern, newSetting]); | 325 [this.contentType, this.mode, newPattern, newSetting]); |
| 325 }, | 326 }, |
| 326 }; | 327 }; |
| 327 | 328 |
| 328 /** | 329 /** |
| 329 * Creates a new exceptions list. | 330 * Creates a new exceptions list. |
| 330 * @constructor | 331 * @constructor |
| 331 * @extends {cr.ui.List} | 332 * @extends {cr.ui.List} |
| 332 */ | 333 */ |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 } | 538 } |
| 538 }; | 539 }; |
| 539 | 540 |
| 540 return { | 541 return { |
| 541 ExceptionsListItem: ExceptionsListItem, | 542 ExceptionsListItem: ExceptionsListItem, |
| 542 ExceptionsAddRowListItem: ExceptionsAddRowListItem, | 543 ExceptionsAddRowListItem: ExceptionsAddRowListItem, |
| 543 ExceptionsList: ExceptionsList, | 544 ExceptionsList: ExceptionsList, |
| 544 ContentSettingsExceptionsArea: ContentSettingsExceptionsArea, | 545 ContentSettingsExceptionsArea: ContentSettingsExceptionsArea, |
| 545 }; | 546 }; |
| 546 }); | 547 }); |
| OLD | NEW |