| OLD | NEW |
| 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.contentSettings', function() { | 5 cr.define('options.contentSettings', function() { |
| 6 /** @const */ var ControlledSettingIndicator = | 6 /** @const */ var ControlledSettingIndicator = |
| 7 options.ControlledSettingIndicator; | 7 options.ControlledSettingIndicator; |
| 8 /** @const */ var InlineEditableItemList = options.InlineEditableItemList; | 8 /** @const */ var InlineEditableItemList = options.InlineEditableItemList; |
| 9 /** @const */ var InlineEditableItem = options.InlineEditableItem; | 9 /** @const */ var InlineEditableItem = options.InlineEditableItem; |
| 10 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; | 10 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 var addRowItem = new ExceptionsAddRowListItem(this.contentType, | 492 var addRowItem = new ExceptionsAddRowListItem(this.contentType, |
| 493 this.mode); | 493 this.mode); |
| 494 addRowItem.deletable = false; | 494 addRowItem.deletable = false; |
| 495 return addRowItem; | 495 return addRowItem; |
| 496 } | 496 } |
| 497 }, | 497 }, |
| 498 | 498 |
| 499 /** | 499 /** |
| 500 * Sets the exceptions in the js model. | 500 * Sets the exceptions in the js model. |
| 501 * | 501 * |
| 502 * @param {Array.<options.Exception>} entries A list of dictionaries of | 502 * @param {Array<options.Exception>} entries A list of dictionaries of |
| 503 * values, each dictionary represents an exception. | 503 * values, each dictionary represents an exception. |
| 504 */ | 504 */ |
| 505 setExceptions: function(entries) { | 505 setExceptions: function(entries) { |
| 506 var deleteCount = this.dataModel.length; | 506 var deleteCount = this.dataModel.length; |
| 507 | 507 |
| 508 if (this.isEditable()) { | 508 if (this.isEditable()) { |
| 509 // We don't want to remove the Add New Exception row. | 509 // We don't want to remove the Add New Exception row. |
| 510 deleteCount = deleteCount - 1; | 510 deleteCount = deleteCount - 1; |
| 511 } | 511 } |
| 512 | 512 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 669 } | 669 } |
| 670 }; | 670 }; |
| 671 | 671 |
| 672 return { | 672 return { |
| 673 ExceptionsListItem: ExceptionsListItem, | 673 ExceptionsListItem: ExceptionsListItem, |
| 674 ExceptionsAddRowListItem: ExceptionsAddRowListItem, | 674 ExceptionsAddRowListItem: ExceptionsAddRowListItem, |
| 675 ExceptionsList: ExceptionsList, | 675 ExceptionsList: ExceptionsList, |
| 676 ContentSettingsExceptionsArea: ContentSettingsExceptionsArea, | 676 ContentSettingsExceptionsArea: ContentSettingsExceptionsArea, |
| 677 }; | 677 }; |
| 678 }); | 678 }); |
| OLD | NEW |