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', function() { | 5 cr.define('options', function() { |
6 /** @const */ var OptionsPage = options.OptionsPage; | 6 /** @const */ var OptionsPage = options.OptionsPage; |
7 | 7 |
8 ////////////////////////////////////////////////////////////////////////////// | 8 ////////////////////////////////////////////////////////////////////////////// |
9 // ContentSettings class: | 9 // ContentSettings class: |
10 | 10 |
11 /** | 11 /** |
12 * Encapsulated handling of content settings page. | 12 * Encapsulated handling of content settings page. |
13 * @constructor | 13 * @constructor |
14 */ | 14 */ |
15 function ContentSettings() { | 15 function ContentSettings() { |
16 this.activeNavTab = null; | 16 this.activeNavTab = null; |
17 OptionsPage.call(this, 'content', | 17 OptionsPage.call(this, 'content', |
18 loadTimeData.getString('contentSettingsPageTabTitle'), | 18 loadTimeData.getString('contentSettingsPageTabTitle'), |
19 'content-settings-page'); | 19 'content-settings-page'); |
20 } | 20 } |
21 | 21 |
22 cr.addSingletonGetter(ContentSettings); | 22 cr.addSingletonGetter(ContentSettings); |
23 | 23 |
24 ContentSettings.prototype = { | 24 ContentSettings.prototype = { |
25 __proto__: OptionsPage.prototype, | 25 __proto__: OptionsPage.prototype, |
26 | 26 |
| 27 /** @override */ |
27 initializePage: function() { | 28 initializePage: function() { |
28 OptionsPage.prototype.initializePage.call(this); | 29 OptionsPage.prototype.initializePage.call(this); |
29 | 30 |
30 var exceptionsButtons = | 31 var exceptionsButtons = |
31 this.pageDiv.querySelectorAll('.exceptions-list-button'); | 32 this.pageDiv.querySelectorAll('.exceptions-list-button'); |
32 for (var i = 0; i < exceptionsButtons.length; i++) { | 33 for (var i = 0; i < exceptionsButtons.length; i++) { |
33 exceptionsButtons[i].onclick = function(event) { | 34 exceptionsButtons[i].onclick = function(event) { |
34 var page = ContentSettingsExceptionsArea.getInstance(); | 35 var page = ContentSettingsExceptionsArea.getInstance(); |
35 | 36 |
36 // Add on the proper hash for the content type, and store that in the | 37 // Add on the proper hash for the content type, and store that in the |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 var deviceSelect = $('media-select-camera'); | 300 var deviceSelect = $('media-select-camera'); |
300 chrome.send('setDefaultCaptureDevice', ['camera', deviceSelect.value]); | 301 chrome.send('setDefaultCaptureDevice', ['camera', deviceSelect.value]); |
301 }; | 302 }; |
302 | 303 |
303 // Export | 304 // Export |
304 return { | 305 return { |
305 ContentSettings: ContentSettings | 306 ContentSettings: ContentSettings |
306 }; | 307 }; |
307 | 308 |
308 }); | 309 }); |
OLD | NEW |