OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 Page = cr.ui.pageManager.Page; | 6 /** @const */ var Page = cr.ui.pageManager.Page; |
7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; | 7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; |
8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; | 8 /** @const */ var ArrayDataModel = cr.ui.ArrayDataModel; |
9 | 9 |
10 // Lookup table to generate the i18n strings. | 10 // Lookup table to generate the i18n strings. |
11 /** @const */ var permissionsLookup = { | 11 /** @const */ var permissionsLookup = { |
12 'geolocation': 'location', | 12 'geolocation': 'location', |
13 'notifications': 'notifications', | 13 'notifications': 'notifications', |
14 'media-stream': 'mediaStream', | 14 'media-stream': 'mediaStream', |
15 'cookies': 'cookies', | 15 'cookies': 'cookies', |
16 'multiple-automatic-downloads': 'multipleAutomaticDownloads', | 16 'multiple-automatic-downloads': 'multipleAutomaticDownloads', |
17 'images': 'images', | 17 'images': 'images', |
18 'plugins': 'plugins', | 18 'plugins': 'plugins', |
19 'popups': 'popups', | 19 'popups': 'popups', |
20 'javascript': 'javascript' | 20 'javascript': 'javascript' |
21 }; | 21 }; |
22 | 22 |
23 ///////////////////////////////////////////////////////////////////////////// | 23 ///////////////////////////////////////////////////////////////////////////// |
24 // WebsiteSettingsManager class: | 24 // WebsiteSettingsManager class: |
25 | 25 |
26 /** | 26 /** |
27 * Encapsulated handling of the website settings page. | 27 * Encapsulated handling of the website settings page. |
28 * @constructor | 28 * @constructor |
| 29 * @extends {cr.ui.pageManager.Page} |
29 */ | 30 */ |
30 function WebsiteSettingsManager() { | 31 function WebsiteSettingsManager() { |
31 Page.call(this, 'websiteSettings', | 32 Page.call(this, 'websiteSettings', |
32 loadTimeData.getString('websitesOptionsPageTabTitle'), | 33 loadTimeData.getString('websitesOptionsPageTabTitle'), |
33 'website-settings-page'); | 34 'website-settings-page'); |
34 } | 35 } |
35 | 36 |
36 cr.addSingletonGetter(WebsiteSettingsManager); | 37 cr.addSingletonGetter(WebsiteSettingsManager); |
37 | 38 |
38 WebsiteSettingsManager.prototype = { | 39 WebsiteSettingsManager.prototype = { |
39 __proto__: Page.prototype, | 40 __proto__: Page.prototype, |
40 | 41 |
41 /** | 42 /** |
42 * The saved allowed origins list. | 43 * The saved allowed origins list. |
43 * @type {OriginList} | 44 * @type {options.OriginList} |
44 * @private | 45 * @private |
45 */ | 46 */ |
46 allowedList_: null, | 47 allowedList_: null, |
47 | 48 |
48 /** | 49 /** |
49 * The saved blocked origins list. | 50 * The saved blocked origins list. |
50 * @type {OriginList} | 51 * @type {OriginList} |
51 * @private | 52 * @private |
52 */ | 53 */ |
53 blockedList_: null, | 54 blockedList_: null, |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 | 249 |
249 WebsiteSettingsManager.updateDefault = function(dict) { | 250 WebsiteSettingsManager.updateDefault = function(dict) { |
250 WebsiteSettingsManager.getInstance().updateDefault(dict); | 251 WebsiteSettingsManager.getInstance().updateDefault(dict); |
251 }; | 252 }; |
252 | 253 |
253 // Export | 254 // Export |
254 return { | 255 return { |
255 WebsiteSettingsManager: WebsiteSettingsManager | 256 WebsiteSettingsManager: WebsiteSettingsManager |
256 }; | 257 }; |
257 }); | 258 }); |
OLD | NEW |