Commit a54ae4ff authored by beaufort.francois's avatar beaufort.francois Committed by Commit bot

Added missing Privacy And Security Settings to Content Settings Sample extension.

R=mkwst@chromium.org

Review URL: https://codereview.chromium.org/971323002

Cr-Commit-Position: refs/heads/master@{#319030}
parent d94168ec
......@@ -2,45 +2,83 @@
<html>
<head>
<title>Popup</title>
<style>
dt { white-space: nowrap }
</style>
<script src="popup.js"></script>
</head>
<body>
<fieldset>
<dl>
<dt><label for="cookies">Cookies: </label></dt>
<dd><select id="cookies">
<dd><select id="cookies" disabled>
<option value="allow">Allow</option>
<option value="session_only">Session only</option>
<option value="block">Block</option>
</select></dd>
<dt><label for="images">Images: </label></dt>
<dd><select id="images">
<dd><select id="images" disabled>
<option value="allow">Allow</option>
<option value="block">Block</option>
</select>
<dt><label for="javascript">Javascript: </label></dt>
<dd><select id="javascript">
<dd><select id="javascript" disabled>
<option value="allow">Allow</option>
<option value="block">Block</option>
</select></dd>
<dt><label for="location">Location: </label></dt>
<dd><select id="location" disabled>
<option value="allow">Allow</option>
<option value="ask">Ask</option>
<option value="block">Block</option>
</select></dd>
<dt><label for="plugins">Plug-ins: </label></dt>
<dd><select id="plugins">
<dd><select id="plugins" disabled>
<option value="allow">Allow</option>
<option value="block">Block</option>
</select></dd>
<dt><label for="popups">Pop-ups: </label></dt>
<dd><select id="popups">
<dd><select id="popups" disabled>
<option value="allow">Allow</option>
<option value="block">Block</option>
</select></dd>
<dt><label for="location">Location: </label></dt>
<dd><select id="location" disabled>
<dt><label for="notifications">Notifications: </label></dt>
<dd><select id="notifications" disabled>
<option value="allow">Allow</option>
<option value="ask">Ask</option>
<option value="block">Block</option>
</select></dd>
<dt><label for="notifications">Notifications: </label></dt>
<dd><select id="notifications">
<dt><label for="fullscreen">Fullscreen: </label></dt>
<dd><select id="fullscreen" disabled>
<option value="allow">Allow</option>
<option value="ask">Ask</option>
</select></dd>
<dt><label for="mouselock">Mouse cursor: </label></dt>
<dd><select id="mouselock" disabled>
<option value="allow">Allow</option>
<option value="ask">Ask</option>
<option value="block">Block</option>
</select></dd>
<dt><label for="microphone">Microphone: </label></dt>
<dd><select id="microphone" disabled>
<option value="allow">Allow</option>
<option value="ask">Ask</option>
<option value="block">Block</option>
</select></dd>
<dt><label for="camera">Camera: </label></dt>
<dd><select id="camera" disabled>
<option value="allow">Allow</option>
<option value="ask">Ask</option>
<option value="block">Block</option>
</select></dd>
<dt><label for="unsandboxedPlugins">Unsandboxed plug-in access: </label></dt>
<dd><select id="unsandboxedPlugins" disabled>
<option value="allow">Allow</option>
<option value="ask">Ask</option>
<option value="block">Block</option>
</select></dd>
<dt><label for="automaticDownloads">Automatic Downloads: </label></dt>
<dd><select id="automaticDownloads" disabled>
<option value="allow">Allow</option>
<option value="ask">Ask</option>
<option value="block">Block</option>
......
......@@ -25,17 +25,20 @@ document.addEventListener('DOMContentLoaded', function () {
var current = tabs[0];
incognito = current.incognito;
url = current.url;
var types = ['cookies', 'images', 'javascript', 'plugins', 'popups',
'notifications'];
var types = ['cookies', 'images', 'javascript', 'location', 'plugins',
'popups', 'notifications', 'fullscreen', 'mouselock',
'microphone', 'camera', 'unsandboxedPlugins',
'automaticDownloads'];
types.forEach(function(type) {
// HACK: [type] is not recognised by the docserver's sample crawler, so
// mention an explicit
// type: chrome.contentSettings.cookies.get - See http://crbug.com/299634
chrome.contentSettings[type].get({
chrome.contentSettings[type] && chrome.contentSettings[type].get({
'primaryUrl': url,
'incognito': incognito
},
function(details) {
document.getElementById(type).disabled = false;
document.getElementById(type).value = details.setting;
});
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment