OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * 'settings-site-settings-page' is the settings page containing privacy and | 7 * 'settings-site-settings-page' is the settings page containing privacy and |
8 * security site settings. | 8 * security site settings. |
9 */ | 9 */ |
10 | 10 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 * @private | 64 * @private |
65 */ | 65 */ |
66 focusConfigChanged_: function(newConfig, oldConfig) { | 66 focusConfigChanged_: function(newConfig, oldConfig) { |
67 // focusConfig is set only once on the parent, so this observer should only | 67 // focusConfig is set only once on the parent, so this observer should only |
68 // fire once. | 68 // fire once. |
69 assert(!oldConfig); | 69 assert(!oldConfig); |
70 | 70 |
71 // Populate the |focusConfig| map of the parent <settings-animated-pages> | 71 // Populate the |focusConfig| map of the parent <settings-animated-pages> |
72 // element, with additional entries that correspond to subpage trigger | 72 // element, with additional entries that correspond to subpage trigger |
73 // elements residing in this element's Shadow DOM. | 73 // elements residing in this element's Shadow DOM. |
74 var R = settings.Route; | 74 var R = settings.routes; |
75 [[R.SITE_SETTINGS_COOKIES, 'cookies'], | 75 [[R.SITE_SETTINGS_COOKIES, 'cookies'], |
76 [R.SITE_SETTINGS_LOCATION, 'location'], [R.SITE_SETTINGS_CAMERA, 'camera'], | 76 [R.SITE_SETTINGS_LOCATION, 'location'], [R.SITE_SETTINGS_CAMERA, 'camera'], |
77 [R.SITE_SETTINGS_MICROPHONE, 'microphone'], | 77 [R.SITE_SETTINGS_MICROPHONE, 'microphone'], |
78 [R.SITE_SETTINGS_NOTIFICATIONS, 'notifications'], | 78 [R.SITE_SETTINGS_NOTIFICATIONS, 'notifications'], |
79 [R.SITE_SETTINGS_JAVASCRIPT, 'javascript'], | 79 [R.SITE_SETTINGS_JAVASCRIPT, 'javascript'], |
80 [R.SITE_SETTINGS_FLASH, 'flash'], [R.SITE_SETTINGS_IMAGES, 'images'], | 80 [R.SITE_SETTINGS_FLASH, 'flash'], [R.SITE_SETTINGS_IMAGES, 'images'], |
81 [R.SITE_SETTINGS_POPUPS, 'popups'], | 81 [R.SITE_SETTINGS_POPUPS, 'popups'], |
82 [R.SITE_SETTINGS_BACKGROUND_SYNC, 'background-sync'], | 82 [R.SITE_SETTINGS_BACKGROUND_SYNC, 'background-sync'], |
83 [R.SITE_SETTINGS_AUTOMATIC_DOWNLOADS, 'automatic-downloads'], | 83 [R.SITE_SETTINGS_AUTOMATIC_DOWNLOADS, 'automatic-downloads'], |
84 [R.SITE_SETTINGS_UNSANDBOXED_PLUGINS, 'unsandboxed-plugins'], | 84 [R.SITE_SETTINGS_UNSANDBOXED_PLUGINS, 'unsandboxed-plugins'], |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 settings.ContentSetting.BLOCK); | 166 settings.ContentSetting.BLOCK); |
167 }, | 167 }, |
168 | 168 |
169 /** | 169 /** |
170 * Navigate to the route specified in the event dataset. | 170 * Navigate to the route specified in the event dataset. |
171 * @param {!Event} event The tap event. | 171 * @param {!Event} event The tap event. |
172 * @private | 172 * @private |
173 */ | 173 */ |
174 onTapNavigate_: function(event) { | 174 onTapNavigate_: function(event) { |
175 var dataSet = /** @type {{route: string}} */ (event.currentTarget.dataset); | 175 var dataSet = /** @type {{route: string}} */ (event.currentTarget.dataset); |
176 settings.navigateTo(settings.Route[dataSet.route]); | 176 settings.navigateTo(settings.routes[dataSet.route]); |
177 }, | 177 }, |
178 }); | 178 }); |
OLD | NEW |