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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 select.appendChild(optionAsk); | 75 select.appendChild(optionAsk); |
76 } | 76 } |
77 | 77 |
78 if (this.contentType == 'cookies') { | 78 if (this.contentType == 'cookies') { |
79 var optionSession = cr.doc.createElement('option'); | 79 var optionSession = cr.doc.createElement('option'); |
80 optionSession.textContent = templateData.sessionException; | 80 optionSession.textContent = templateData.sessionException; |
81 optionSession.value = 'session'; | 81 optionSession.value = 'session'; |
82 select.appendChild(optionSession); | 82 select.appendChild(optionSession); |
83 } | 83 } |
84 | 84 |
85 var optionBlock = cr.doc.createElement('option'); | 85 if (this.contentType != 'fullscreen') { |
86 optionBlock.textContent = templateData.blockException; | 86 var optionBlock = cr.doc.createElement('option'); |
87 optionBlock.value = 'block'; | 87 optionBlock.textContent = templateData.blockException; |
88 select.appendChild(optionBlock); | 88 optionBlock.value = 'block'; |
| 89 select.appendChild(optionBlock); |
| 90 } |
89 | 91 |
90 this.contentElement.appendChild(select); | 92 this.contentElement.appendChild(select); |
91 select.className = 'exception-setting'; | 93 select.className = 'exception-setting'; |
92 if (this.pattern) | 94 if (this.pattern) |
93 select.setAttribute('displaymode', 'edit'); | 95 select.setAttribute('displaymode', 'edit'); |
94 | 96 |
95 // Used to track whether the URL pattern in the input is valid. | 97 // Used to track whether the URL pattern in the input is valid. |
96 // This will be true if the browser process has informed us that the | 98 // This will be true if the browser process has informed us that the |
97 // current text in the input is valid. Changing the text resets this to | 99 // current text in the input is valid. Changing the text resets this to |
98 // false, and getting a response from the browser sets it back to true. | 100 // false, and getting a response from the browser sets it back to true. |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 } | 356 } |
355 } | 357 } |
356 | 358 |
357 this.mode = this.getAttribute('mode'); | 359 this.mode = this.getAttribute('mode'); |
358 | 360 |
359 var exceptionList = this; | 361 var exceptionList = this; |
360 | 362 |
361 // Whether the exceptions in this list allow an 'Ask every time' option. | 363 // Whether the exceptions in this list allow an 'Ask every time' option. |
362 this.enableAskOption = (this.contentType == 'plugins' && | 364 this.enableAskOption = (this.contentType == 'plugins' && |
363 templateData.enable_click_to_play); | 365 templateData.enable_click_to_play); |
364 | 366 this.enableAskOption = (this.enableAskOption || |
| 367 this.contentType == 'fullscreen'); |
365 this.autoExpands = true; | 368 this.autoExpands = true; |
366 this.reset(); | 369 this.reset(); |
367 }, | 370 }, |
368 | 371 |
369 /** | 372 /** |
370 * Creates an item to go in the list. | 373 * Creates an item to go in the list. |
371 * @param {Object} entry The element from the data model for this row. | 374 * @param {Object} entry The element from the data model for this row. |
372 */ | 375 */ |
373 createItem: function(entry) { | 376 createItem: function(entry) { |
374 if (entry) { | 377 if (entry) { |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 } | 543 } |
541 }; | 544 }; |
542 | 545 |
543 return { | 546 return { |
544 ExceptionsListItem: ExceptionsListItem, | 547 ExceptionsListItem: ExceptionsListItem, |
545 ExceptionsAddRowListItem: ExceptionsAddRowListItem, | 548 ExceptionsAddRowListItem: ExceptionsAddRowListItem, |
546 ExceptionsList: ExceptionsList, | 549 ExceptionsList: ExceptionsList, |
547 ContentSettingsExceptionsArea: ContentSettingsExceptionsArea, | 550 ContentSettingsExceptionsArea: ContentSettingsExceptionsArea, |
548 }; | 551 }; |
549 }); | 552 }); |
OLD | NEW |