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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 // Setting select element for edit mode. | 79 // Setting select element for edit mode. |
80 var select = cr.doc.createElement('select'); | 80 var select = cr.doc.createElement('select'); |
81 var optionAllow = cr.doc.createElement('option'); | 81 var optionAllow = cr.doc.createElement('option'); |
82 optionAllow.textContent = loadTimeData.getString('allowException'); | 82 optionAllow.textContent = loadTimeData.getString('allowException'); |
83 optionAllow.value = 'allow'; | 83 optionAllow.value = 'allow'; |
84 select.appendChild(optionAllow); | 84 select.appendChild(optionAllow); |
85 | 85 |
86 if (this.contentType == 'plugins') { | 86 if (this.contentType == 'plugins') { |
87 var optionDetect = cr.doc.createElement('option'); | 87 var optionDetect = cr.doc.createElement('option'); |
88 optionDetect.textContent = loadTimeData.getString('detectException'); | 88 optionDetect.textContent = loadTimeData.getString('detectException'); |
89 optionDetect.value = 'detect'; | 89 optionDetect.value = 'detect_important_content'; |
90 select.appendChild(optionDetect); | 90 select.appendChild(optionDetect); |
91 } | 91 } |
92 | 92 |
93 if (this.contentType == 'cookies') { | 93 if (this.contentType == 'cookies') { |
94 var optionSession = cr.doc.createElement('option'); | 94 var optionSession = cr.doc.createElement('option'); |
95 optionSession.textContent = loadTimeData.getString('sessionException'); | 95 optionSession.textContent = loadTimeData.getString('sessionException'); |
96 optionSession.value = 'session'; | 96 optionSession.value = 'session_only'; |
97 select.appendChild(optionSession); | 97 select.appendChild(optionSession); |
98 } | 98 } |
99 | 99 |
100 if (this.contentType != 'fullscreen') { | 100 if (this.contentType != 'fullscreen') { |
101 var optionBlock = cr.doc.createElement('option'); | 101 var optionBlock = cr.doc.createElement('option'); |
102 optionBlock.textContent = loadTimeData.getString('blockException'); | 102 optionBlock.textContent = loadTimeData.getString('blockException'); |
103 optionBlock.value = 'block'; | 103 optionBlock.value = 'block'; |
104 select.appendChild(optionBlock); | 104 select.appendChild(optionBlock); |
105 } | 105 } |
106 | 106 |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 * @param {string} setting The setting to be displayed. | 258 * @param {string} setting The setting to be displayed. |
259 * @return {string} The display string. | 259 * @return {string} The display string. |
260 */ | 260 */ |
261 getDisplayStringForSetting: function(setting) { | 261 getDisplayStringForSetting: function(setting) { |
262 if (setting == 'allow') | 262 if (setting == 'allow') |
263 return loadTimeData.getString('allowException'); | 263 return loadTimeData.getString('allowException'); |
264 else if (setting == 'block') | 264 else if (setting == 'block') |
265 return loadTimeData.getString('blockException'); | 265 return loadTimeData.getString('blockException'); |
266 else if (setting == 'ask') | 266 else if (setting == 'ask') |
267 return loadTimeData.getString('askException'); | 267 return loadTimeData.getString('askException'); |
268 else if (setting == 'session') | 268 else if (setting == 'session_only') |
269 return loadTimeData.getString('sessionException'); | 269 return loadTimeData.getString('sessionException'); |
270 else if (setting == 'detect') | 270 else if (setting == 'detect_important_content') |
271 return loadTimeData.getString('detectException'); | 271 return loadTimeData.getString('detectException'); |
272 else if (setting == 'default') | 272 else if (setting == 'default') |
273 return ''; | 273 return ''; |
274 | 274 |
275 console.error('Unknown setting: [' + setting + ']'); | 275 console.error('Unknown setting: [' + setting + ']'); |
276 return ''; | 276 return ''; |
277 }, | 277 }, |
278 | 278 |
279 /** | 279 /** |
280 * Update this list item to reflect whether the input is a valid pattern. | 280 * Update this list item to reflect whether the input is a valid pattern. |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
654 } | 654 } |
655 }; | 655 }; |
656 | 656 |
657 return { | 657 return { |
658 ExceptionsListItem: ExceptionsListItem, | 658 ExceptionsListItem: ExceptionsListItem, |
659 ExceptionsAddRowListItem: ExceptionsAddRowListItem, | 659 ExceptionsAddRowListItem: ExceptionsAddRowListItem, |
660 ExceptionsList: ExceptionsList, | 660 ExceptionsList: ExceptionsList, |
661 ContentSettingsExceptionsArea: ContentSettingsExceptionsArea, | 661 ContentSettingsExceptionsArea: ContentSettingsExceptionsArea, |
662 }; | 662 }; |
663 }); | 663 }); |
OLD | NEW |