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 Polymer({ | 10 Polymer({ |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 }.bind(this)); | 66 }.bind(this)); |
67 }, | 67 }, |
68 | 68 |
69 /** | 69 /** |
70 * Handles selection of a single category and navigates to the details for | 70 * Handles selection of a single category and navigates to the details for |
71 * that category. | 71 * that category. |
72 * @param {!Event} event The tap event. | 72 * @param {!Event} event The tap event. |
73 */ | 73 */ |
74 onTapCategory: function(event) { | 74 onTapCategory: function(event) { |
75 var category = event.currentTarget.getAttribute('category'); | 75 var category = event.currentTarget.getAttribute('category'); |
76 if (category == settings.ALL_SITES) { | 76 if (category == settings.ALL_SITES) |
77 this.currentRoute = { | 77 settings.navigateTo(settings.Route.SITE_SETTINGS_ALL); |
78 page: this.currentRoute.page, | 78 else if (category == this.ContentSettingsTypes.PROTOCOL_HANDLERS) |
79 section: 'privacy', | 79 settings.navigateTo(settings.Route.SITE_SETTINGS_HANDLERS); |
80 subpage: ['site-settings', 'all-sites'], | 80 else |
81 }; | 81 settings.navigateTo(this.computeCategoryRoute(category)); |
82 } else if (category == this.ContentSettingsTypes.PROTOCOL_HANDLERS) { | |
83 this.currentRoute = { | |
84 page: this.currentRoute.page, | |
85 section: 'privacy', | |
86 subpage: ['site-settings', 'protocol-handlers'], | |
87 }; | |
88 } else { | |
89 this.categorySelected = this.computeCategoryTextId(category); | |
90 this.currentRoute = { | |
91 page: this.currentRoute.page, | |
92 section: 'privacy', | |
93 subpage: ['site-settings', 'site-settings-category-' + | |
94 this.categorySelected], | |
95 }; | |
96 } | |
97 }, | 82 }, |
98 }); | 83 }); |
OLD | NEW |