Chromium Code Reviews| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 settings.navigateTo(settings.Route.SITE_SETTINGS_ALL); | 77 settings.navigateTo(settings.Route.SITE_SETTINGS_ALL); |
| 78 else | 78 else |
| 79 settings.navigateTo(this.computeCategoryRoute(category)); | 79 settings.navigateTo(this.computeCategoryRoute(category)); |
| 80 }, | 80 }, |
| 81 | |
| 82 /** | |
| 83 * Navigate to the route specified in the event dataset. | |
| 84 * @param {!Event} event The tap event. | |
| 85 */ | |
| 86 onTapNavigate: function(event) { | |
|
dpapad
2016/11/15 00:32:46
Can this be private?
dschuyler
2016/11/15 01:29:43
Done.
| |
| 87 var dataSet = /** @type {{route: string}} */(event.currentTarget.dataset); | |
| 88 settings.navigateTo(settings.Route[dataSet.route]); | |
| 89 }, | |
| 81 }); | 90 }); |
| OLD | NEW |