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

Side by Side Diff: chrome/browser/resources/options/content_settings.js

Issue 1156983002: Remove unused "Website Settings" view of content settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.exportPath('options'); 5 cr.exportPath('options');
6 6
7 /** 7 /**
8 * @typedef {{appId: string, 8 * @typedef {{appId: string,
9 * appName: (string|undefined), 9 * appName: (string|undefined),
10 * embeddingOrigin: (string|undefined), 10 * embeddingOrigin: (string|undefined),
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 var exceptionsButtons = 59 var exceptionsButtons =
60 this.pageDiv.querySelectorAll('.exceptions-list-button'); 60 this.pageDiv.querySelectorAll('.exceptions-list-button');
61 for (var i = 0; i < exceptionsButtons.length; i++) { 61 for (var i = 0; i < exceptionsButtons.length; i++) {
62 exceptionsButtons[i].onclick = function(event) { 62 exceptionsButtons[i].onclick = function(event) {
63 var hash = event.currentTarget.getAttribute('contentType'); 63 var hash = event.currentTarget.getAttribute('contentType');
64 PageManager.showPageByName('contentExceptions', true, 64 PageManager.showPageByName('contentExceptions', true,
65 {hash: '#' + hash}); 65 {hash: '#' + hash});
66 }; 66 };
67 } 67 }
68 68
69 var experimentalExceptionsButtons =
70 this.pageDiv.querySelectorAll('.website-settings-permission-button');
71 for (var i = 0; i < experimentalExceptionsButtons.length; i++) {
72 experimentalExceptionsButtons[i].onclick = function(event) {
73 var hash = event.currentTarget.getAttribute('contentType');
74 WebsiteSettingsManager.showWebsiteSettings(hash);
75 };
76 }
77
78 var manageHandlersButton = $('manage-handlers-button'); 69 var manageHandlersButton = $('manage-handlers-button');
79 if (manageHandlersButton) { 70 if (manageHandlersButton) {
80 manageHandlersButton.onclick = function(event) { 71 manageHandlersButton.onclick = function(event) {
81 PageManager.showPageByName('handlers'); 72 PageManager.showPageByName('handlers');
82 }; 73 };
83 } 74 }
84 75
85 if (cr.isChromeOS) { 76 if (cr.isChromeOS) {
86 // Disable some controls for Guest in Chrome OS. 77 // Disable some controls for Guest in Chrome OS.
87 UIAccountTweaks.applyGuestSessionVisibility(document); 78 UIAccountTweaks.applyGuestSessionVisibility(document);
(...skipping 11 matching lines...) Expand all
99 $('content-settings-overlay-confirm').onclick = 90 $('content-settings-overlay-confirm').onclick =
100 PageManager.closeOverlay.bind(PageManager); 91 PageManager.closeOverlay.bind(PageManager);
101 92
102 $('media-pepper-flash-default').hidden = true; 93 $('media-pepper-flash-default').hidden = true;
103 $('media-pepper-flash-exceptions').hidden = true; 94 $('media-pepper-flash-exceptions').hidden = true;
104 95
105 $('media-select-mic').addEventListener('change', 96 $('media-select-mic').addEventListener('change',
106 ContentSettings.setDefaultMicrophone_); 97 ContentSettings.setDefaultMicrophone_);
107 $('media-select-camera').addEventListener('change', 98 $('media-select-camera').addEventListener('change',
108 ContentSettings.setDefaultCamera_); 99 ContentSettings.setDefaultCamera_);
109
110 if (loadTimeData.getBoolean('websiteSettingsManagerEnabled')) {
111 var oldUI =
112 this.pageDiv.querySelectorAll('.replace-with-website-settings');
113 for (var i = 0; i < oldUI.length; i++) {
114 oldUI[i].hidden = true;
115 }
116
117 var newUI =
118 this.pageDiv.querySelectorAll('.experimental-website-settings');
119 for (var i = 0; i < newUI.length; i++) {
120 newUI[i].hidden = false;
121 }
122 }
123 }, 100 },
124 }; 101 };
125 102
126 ContentSettings.updateHandlersEnabledRadios = function(enabled) { 103 ContentSettings.updateHandlersEnabledRadios = function(enabled) {
127 var selector = '#content-settings-page input[type=radio][value=' + 104 var selector = '#content-settings-page input[type=radio][value=' +
128 (enabled ? 'allow' : 'block') + '].handler-radio'; 105 (enabled ? 'allow' : 'block') + '].handler-radio';
129 document.querySelector(selector).checked = true; 106 document.querySelector(selector).checked = true;
130 }; 107 };
131 108
132 /** 109 /**
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 var deviceSelect = $('media-select-camera'); 329 var deviceSelect = $('media-select-camera');
353 chrome.send('setDefaultCaptureDevice', ['camera', deviceSelect.value]); 330 chrome.send('setDefaultCaptureDevice', ['camera', deviceSelect.value]);
354 }; 331 };
355 332
356 // Export 333 // Export
357 return { 334 return {
358 ContentSettings: ContentSettings 335 ContentSettings: ContentSettings
359 }; 336 };
360 337
361 }); 338 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/options/content_settings.html ('k') | chrome/browser/resources/options/options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698