Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(265)

Side by Side Diff: chrome/browser/resources/settings/site_settings_page/site_settings_page.js

Issue 1546993003: Site Settings: Give each category its own route. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Polish Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 * Example: 10 * Example:
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 ready: function() { 52 ready: function() {
53 CrSettingsPrefs.initialized.then(function() { 53 CrSettingsPrefs.initialized.then(function() {
54 // TODO(finnur): Implement 'All Sites' list. 54 // TODO(finnur): Implement 'All Sites' list.
55 this.addCategory(settings.ContentSettingsTypes.COOKIES); 55 this.addCategory(settings.ContentSettingsTypes.COOKIES);
56 this.addCategory(settings.ContentSettingsTypes.GEOLOCATION); 56 this.addCategory(settings.ContentSettingsTypes.GEOLOCATION);
57 this.addCategory(settings.ContentSettingsTypes.CAMERA); 57 this.addCategory(settings.ContentSettingsTypes.CAMERA);
58 this.addCategory(settings.ContentSettingsTypes.MIC); 58 this.addCategory(settings.ContentSettingsTypes.MIC);
59 this.addCategory(settings.ContentSettingsTypes.JAVASCRIPT); 59 this.addCategory(settings.ContentSettingsTypes.JAVASCRIPT);
60 this.addCategory(settings.ContentSettingsTypes.POPUPS); 60 this.addCategory(settings.ContentSettingsTypes.POPUPS);
61 this.addCategory(settings.ContentSettingsTypes.FULLSCREEN); 61 this.addCategory(settings.ContentSettingsTypes.FULLSCREEN);
62 this.addCategory(settings.ContentSettingsTypes.NOTIFICATION); 62 this.addCategory(settings.ContentSettingsTypes.NOTIFICATIONS);
63 this.addCategory(settings.ContentSettingsTypes.IMAGES); 63 this.addCategory(settings.ContentSettingsTypes.IMAGES);
64 }.bind(this)); 64 }.bind(this));
65 }, 65 },
66 66
67 /** 67 /**
68 * Adds a single category to the page. 68 * Adds a single category to the page.
69 * @param {number} category The category to add. 69 * @param {number} category The category to add.
70 */ 70 */
71 addCategory: function(category) { 71 addCategory: function(category) {
72 var root = this.$.list; 72 var root = this.$.list;
(...skipping 29 matching lines...) Expand all
102 var description = event.currentTarget.querySelector('.flex').innerText; 102 var description = event.currentTarget.querySelector('.flex').innerText;
103 this.categorySelected = this.computeCategoryFromDesc(description); 103 this.categorySelected = this.computeCategoryFromDesc(description);
104 104
105 this.currentRoute = { 105 this.currentRoute = {
106 page: this.currentRoute.page, 106 page: this.currentRoute.page,
107 section: 'privacy', 107 section: 'privacy',
108 subpage: ['site-settings', 'site-settings-category'], 108 subpage: ['site-settings', 'site-settings-category'],
109 }; 109 };
110 }, 110 },
111 }); 111 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698