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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 this.mode, | 502 this.mode, |
503 this.enableAskOption); | 503 this.enableAskOption); |
504 addRowItem.deletable = false; | 504 addRowItem.deletable = false; |
505 return addRowItem; | 505 return addRowItem; |
506 } | 506 } |
507 }, | 507 }, |
508 | 508 |
509 /** | 509 /** |
510 * Sets the exceptions in the js model. | 510 * Sets the exceptions in the js model. |
511 * | 511 * |
512 * @param {Object} entries A list of dictionaries of values, each dictionary | 512 * @param {Array.<options.Exception>} entries A list of dictionaries of |
513 * represents an exception. | 513 * values, each dictionary represents an exception. |
514 */ | 514 */ |
515 setExceptions: function(entries) { | 515 setExceptions: function(entries) { |
516 var deleteCount = this.dataModel.length; | 516 var deleteCount = this.dataModel.length; |
517 | 517 |
518 if (this.isEditable()) { | 518 if (this.isEditable()) { |
519 // We don't want to remove the Add New Exception row. | 519 // We don't want to remove the Add New Exception row. |
520 deleteCount = deleteCount - 1; | 520 deleteCount = deleteCount - 1; |
521 } | 521 } |
522 | 522 |
523 var args = [0, deleteCount]; | 523 var args = [0, deleteCount]; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
679 } | 679 } |
680 }; | 680 }; |
681 | 681 |
682 return { | 682 return { |
683 ExceptionsListItem: ExceptionsListItem, | 683 ExceptionsListItem: ExceptionsListItem, |
684 ExceptionsAddRowListItem: ExceptionsAddRowListItem, | 684 ExceptionsAddRowListItem: ExceptionsAddRowListItem, |
685 ExceptionsList: ExceptionsList, | 685 ExceptionsList: ExceptionsList, |
686 ContentSettingsExceptionsArea: ContentSettingsExceptionsArea, | 686 ContentSettingsExceptionsArea: ContentSettingsExceptionsArea, |
687 }; | 687 }; |
688 }); | 688 }); |
OLD | NEW |