summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormkwst@chromium.org <mkwst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-14 19:33:43 +0000
committermkwst@chromium.org <mkwst@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-14 19:33:43 +0000
commitf658a090424e4ac55e4ac3671ea1efb3c3de64d1 (patch)
tree2b1a876d8ff0ce8938e361f255b7676c68501374
parentdfdd575d8ed1a864d64010ba07c334515c3b2616 (diff)
downloadchromium_src-f658a090424e4ac55e4ac3671ea1efb3c3de64d1.zip
chromium_src-f658a090424e4ac55e4ac3671ea1efb3c3de64d1.tar.gz
chromium_src-f658a090424e4ac55e4ac3671ea1efb3c3de64d1.tar.bz2
Adding `content_security_policy` to proxy sample extension.
BUG=92644 TEST= Review URL: http://codereview.chromium.org/8273036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105542 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/common/extensions/docs/examples/extensions/proxy_configuration.zipbin107685 -> 108366 bytes
-rw-r--r--chrome/common/extensions/docs/examples/extensions/proxy_configuration/background.html13
-rw-r--r--chrome/common/extensions/docs/examples/extensions/proxy_configuration/background.js23
-rw-r--r--chrome/common/extensions/docs/examples/extensions/proxy_configuration/manifest.json5
-rw-r--r--chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.css198
-rw-r--r--chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.html197
-rw-r--r--chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.js14
-rw-r--r--chrome/common/extensions/docs/samples.html6
-rw-r--r--chrome/common/extensions/docs/samples.json5
9 files changed, 251 insertions, 210 deletions
diff --git a/chrome/common/extensions/docs/examples/extensions/proxy_configuration.zip b/chrome/common/extensions/docs/examples/extensions/proxy_configuration.zip
index d898e40..1936eaf 100644
--- a/chrome/common/extensions/docs/examples/extensions/proxy_configuration.zip
+++ b/chrome/common/extensions/docs/examples/extensions/proxy_configuration.zip
Binary files differ
diff --git a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/background.html b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/background.html
index be49ea7..adf001f 100644
--- a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/background.html
+++ b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/background.html
@@ -13,17 +13,6 @@
-->
<script src="./proxy_form_controller.js"></script>
<script src="./proxy_error_handler.js"></script>
- <script>
- var errorHandler = new ProxyErrorHandler();
-
- // If this extension has already set the proxy settings, then reset it
- // once as the background page initializes. This is essential, as
- // incognito settings are wiped on restart.
- var persistedSettings = ProxyFormController.getPersistedSettings();
- if (persistedSettings !== null) {
- chrome.proxy.settings.set(
- {'value': persistedSettings.regular});
- }
- </script>
+ <script src="./background.js"></script>
</body>
</html>
diff --git a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/background.js b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/background.js
new file mode 100644
index 0000000..8640d41
--- /dev/null
+++ b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/background.js
@@ -0,0 +1,23 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview This file initializes the background page by loading a
+ * ProxyErrorHandler, and resetting proxy settings if required.
+ *
+ * @author Mike West <mkwst@google.com>
+ */
+
+document.addEventListener("DOMContentLoaded", function () {
+ var errorHandler = new ProxyErrorHandler();
+
+ // If this extension has already set the proxy settings, then reset it
+ // once as the background page initializes. This is essential, as
+ // incognito settings are wiped on restart.
+ var persistedSettings = ProxyFormController.getPersistedSettings();
+ if (persistedSettings !== null) {
+ chrome.proxy.settings.set(
+ {'value': persistedSettings.regular});
+ }
+});
diff --git a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/manifest.json b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/manifest.json
index ac031c5..eee665b 100644
--- a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/manifest.json
+++ b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/manifest.json
@@ -1,6 +1,6 @@
{
"name": "__MSG_extName__",
- "version": "0.3",
+ "version": "0.4",
"description": "__MSG_extDescription__",
"default_locale": "en",
"browser_action": {
@@ -16,5 +16,6 @@
"background_page": "background.html",
"permissions": [
"proxy"
- ]
+ ],
+ "content_security_policy": "default-src 'self'; img-src data:;"
}
diff --git a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.css b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.css
new file mode 100644
index 0000000..5dc17d4
--- /dev/null
+++ b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.css
@@ -0,0 +1,198 @@
+body {
+ margin: 5px 10px 10px;
+}
+
+h1 {
+ color: #53637D;
+ font: 26px/1.2 Helvetica, sans-serif;
+ font-size: 200%;
+ margin: 0;
+ padding-bottom: 4px;
+ text-shadow: white 0 1px 2px;
+}
+
+div[role='main'] {
+ border-radius: 5px;
+ background: #EAEEF3;
+ font: 14px/1 Arial,Sans Serif;
+ padding: 10px;
+ width: 563px;
+ box-shadow: inset 0px 2px 5px rgba(0,0,0,0.5);
+ -webkit-transition: background-color 0.5s ease-out;
+ overflow: hidden;
+}
+
+div[role='main'].incognito {
+ background: #496281 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACUAAAAhCAYAAABeD2IVAAAFz0lEQVRYw8VYC0xcRRQtUEprERQ1VkohSGNpwaCYYNBUjS2K+KEVTUkDiqY0hWD5xxhDINgQqIZviRAkSiiWNDRxWypNpaatEQk/CwvlWyks3+XPAssu7I7nbmabx+suPzfrTU7yljfz5sy95947w5YtpjcLwBLYBuzgsAGs+DuzGZGwBh4BHIDdwHPA8xxuwBOcnIWpPUAL7wQeB54CngYcAWdO4kXgDeBoWFhYSk5OTtmFCxeuxsbGpuBv3sCTwFZTkrLmXtgH+AJ+QAAQCBzz8/P7MiUl5aebN29Kh4eHFVNTU2xoaIgNDAywe/fusYyMj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8vEquKwexpiz5WccrJCTkDO1yLWIILcP474DPgQ8oMahpA9+C0FxJSUk7nr/h2vwMSAfhJWFJQAKN8Xku4tCJveWP3d8gb6zWToh0aGjoJYz/FHgToGYbTMmBUM0RnJyccvE7GkiEVlv1cylhpqenGbI7l4v8UWNVfRsn5efs7Jxx/vz5fr0+VvGWuqysrMbNzS0R88KDgoLyEMo+/XvyDI4tcmHC6GsUSkgL5rxFCWbsxGDFY/oSdn+mt7d3gj5w/fp15VrENmokbvRANTbyBdbbz8/tBgsn1agD/v7+cUh7lfAj2KmGmdAoI9PT0//kOnQ01vesedF8t7+/X27oQ0hbrSmJoXBKucD3GAsd3VS8cDIoY2YykgM6RS4/Zj8kckt+sfTDeaeHmdFwHxzj98Y94qKpOz+5u7ufZGY28haOyOX89rzCW9SZ3YuLi39g/4Mhy4ex/kHejFeQ2tvS0vI79ShqE+YEmjxLSkoK5aQsheGjW6snv8EeBT42Az4C3uP/l3DhyWYhvuPZ84PWbt6tzQFH7pCdvCzoSP0LtBi6oflBr2wAAAAASUVORK5CYII=') no-repeat 533px bottom;
+}
+
+form {
+ width: 563px;
+ -webkit-transition: -webkit-transform 0.25s ease;
+}
+
+form.offscreen {
+ -webkit-transform: translateX(-600px);
+}
+
+fieldset {
+ border: 0;
+ margin: 0;
+ padding: 0;
+ position: relative;
+}
+
+legend {
+ position: absolute;
+ left: -999em;
+}
+
+form > fieldset {
+ border-radius: 5px;
+ border: 1px solid transparent;
+ padding: 10px 10px 10px 30px;
+ margin: 5px 0;
+ -webkit-transition: all 0.5s ease;
+}
+
+form > fieldset:hover {
+ background: rgba(255,255,255,0.1);
+ border-color: rgba(0,0,0,0.1);
+}
+
+form > fieldset.active {
+ background: rgba(255,255,255,0.25);
+ border-color: rgba(0,0,0,0.25);
+}
+
+form > fieldset > input {
+ margin-left: -20px;
+}
+
+section {
+ margin: 5px 0 0;
+}
+
+section fieldset:not(:first-child):not(:last-child) {
+ -webkit-transition: all 0.5s ease;
+ overflow: hidden;
+ max-height: 1.6em;
+}
+
+section.single fieldset:not(:first-child):not(:last-child) {
+ max-height: 0px;
+}
+
+section fieldset:last-child {
+ margin-top: 5px;
+}
+
+section fieldset:last-child label {
+ display: block;
+}
+
+section fieldset:last-child textarea {
+ width: 412px;
+}
+
+section > fieldset {
+ position: relative;
+ padding-left: 60px;
+}
+
+section > fieldset > legend {
+ left: 0;
+ top: 4px;
+ width: 53px;
+ text-align: right;
+}
+
+input[type='url']:invalid:not(:active):not(:focus) {
+ border-color: rgba(255,0,0,0.5);
+ background: rgba(255,0,0,0.25);
+}
+
+input:invalid:not(:active):not(:focus):after {
+ content: "This isn't a valid URL!";
+ display:block;
+}
+
+input[type="checkbox"] {
+ margin: 5px 0 5px 35px;
+}
+
+input[type="text"] {
+ width: 200px;
+ margin: 0 10px 0 0;
+}
+
+input.port {
+ width: 50px;
+ margin: 2px 10px 0 5px;
+}
+
+section label,
+section legend {
+ color: #999;
+ -webkit-transition: color 0.5s ease;
+}
+
+.incognito section label,
+.incognito section legend {
+ color: #BBB;
+}
+
+.active section label,
+.active section legend,
+form > fieldset > label {
+ color: #000;
+ -webkit-transition: color 0.5s ease;
+}
+
+.incognito .active section label,
+.incognito .active section legend,
+.incognito form > fieldset > label {
+ color: #FFF;
+}
+
+input[type="submit"],
+button {
+ border-radius: 2px;
+ box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
+ -webkit-user-select: none;
+ background: -webkit-linear-gradient(#FAFAFA, #F4F4F4 40%, #E5E5E5);
+ border: 1px solid #AAA;
+ color: #444;
+ margin-bottom: 0;
+ min-width: 4em;
+ padding: 3px 12px;
+ margin-top: 0;
+ font-size: 1.1em;
+}
+
+.overlay {
+ display: block;
+ text-align: center;
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ width: 500px;
+ padding: 20px;
+ margin: -80px 0 0 -270px;
+ opacity: 0;
+ background: rgba(0, 0, 0, 0.75);
+ border-radius: 5px;
+ color: #FFF;
+ font: 1.5em/1.2 Helvetica Neue, sans-serif;
+ -webkit-transition: all 1.0s ease;
+ -webkit-transform: scale(0);
+}
+
+.overlay a {
+ color: #FFF;
+}
+
+.overlay.visible {
+ opacity: 1;
+ -webkit-transform: scale(1);
+}
diff --git a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.html b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.html
index c5772c0..595283c 100644
--- a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.html
+++ b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.html
@@ -2,198 +2,7 @@
<html>
<head>
<title>Popup for Proxy API Test</title>
- <style>
- body {
- margin: 5px 10px 10px;
- }
-
- h1 {
- color: #53637D;
- font: 26px/1.2 Helvetica, sans-serif;
- font-size: 200%;
- margin: 0;
- padding-bottom: 4px;
- text-shadow: white 0 1px 2px;
- }
-
- div[role='main'] {
- border-radius: 5px;
- background: #EAEEF3;
- font: 14px/1 Arial,Sans Serif;
- padding: 10px;
- width: 563px;
- box-shadow: inset 0px 2px 5px rgba(0,0,0,0.5);
- -webkit-transition: background-color 0.5s ease-out;
- overflow: hidden;
- }
-
- div[role='main'].incognito {
- background: #496281 url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACUAAAAhCAYAAABeD2IVAAAFz0lEQVRYw8VYC0xcRRQtUEprERQ1VkohSGNpwaCYYNBUjS2K+KEVTUkDiqY0hWD5xxhDINgQqIZviRAkSiiWNDRxWypNpaatEQk/CwvlWyks3+XPAssu7I7nbmabx+suPzfrTU7yljfz5sy95947w5YtpjcLwBLYBuzgsAGs+DuzGZGwBh4BHIDdwHPA8xxuwBOcnIWpPUAL7wQeB54CngYcAWdO4kXgDeBoWFhYSk5OTtmFCxeuxsbGpuBv3sCTwFZTkrLmXtgH+AJ+QAAQCBzz8/P7MiUl5aebN29Kh4eHFVNTU2xoaIgNDAywe/fusYyMjO858R2mJEUe2ldZWfljd3f3P+3t7bK2trZBuVyuYCJbXFxkXV1drLOzU4e7d++yzMzMasz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JWFJQAKN8Xku4tCJveWP3d8gb6zWToh0aGjoJYz/FHgToGYbTMmBUM0RnJyccvE7GkiEVlv1cylhpqenGbI7l4v8UWNVfRsn5efs7Jxx/vz5fr0+VvGWuqysrMbNzS0R88KDgoLyEMo+/XvyDI4tcmHC6GsUSkgL5rxFCWbsxGDFY/oSdn+mt7d3gj5w/fp15VrENmokbvRANTbyBdbbz8/tBgsn1agD/v7+cUh7lfAj2KmGmdAoI9PT0//kOnQ01vesedF8t7+/X27oQ0hbrSmJoXBKucD3GAsd3VS8cDIoY2YykgM6RS4/Zj8kckt+sfTDeaeHmdFwHxzj98Y94qKpOz+5u7ufZGY28haOyOX89rzCW9SZ3YuLi39g/4Mhy4ex/kHejFeQ2tvS0vI79ShqE+YEmjxLSkoK5aQsheGjW6snv8EeBT42Az4C3uP/l3DhyWYhvuPZ84PWbt6tzQFH7pCdvCzoSP0LtBi6oflBr2wAAAAASUVORK5CYII=') no-repeat 533px bottom;
- }
-
- form {
- width: 563px;
- -webkit-transition: -webkit-transform 0.25s ease;
- }
-
- form.offscreen {
- -webkit-transform: translateX(-600px);
- }
-
- fieldset {
- border: 0;
- margin: 0;
- padding: 0;
- position: relative;
- }
-
- legend {
- position: absolute;
- left: -999em;
- }
-
- form > fieldset {
- border-radius: 5px;
- border: 1px solid transparent;
- padding: 10px 10px 10px 30px;
- margin: 5px 0;
- -webkit-transition: all 0.5s ease;
- }
-
- form > fieldset:hover {
- background: rgba(255,255,255,0.1);
- border-color: rgba(0,0,0,0.1);
- }
-
- form > fieldset.active {
- background: rgba(255,255,255,0.25);
- border-color: rgba(0,0,0,0.25);
- }
-
- form > fieldset > input {
- margin-left: -20px;
- }
-
- section {
- margin: 5px 0 0;
- }
-
- section fieldset:not(:first-child):not(:last-child) {
- -webkit-transition: all 0.5s ease;
- overflow: hidden;
- max-height: 1.6em;
- }
-
- section.single fieldset:not(:first-child):not(:last-child) {
- max-height: 0px;
- }
-
- section fieldset:last-child {
- margin-top: 5px;
- }
-
- section fieldset:last-child label {
- display: block;
- }
-
- section fieldset:last-child textarea {
- width: 412px;
- }
-
- section > fieldset {
- position: relative;
- padding-left: 60px;
- }
-
- section > fieldset > legend {
- left: 0;
- top: 4px;
- width: 53px;
- text-align: right;
- }
-
- input[type='url']:invalid:not(:active):not(:focus) {
- border-color: rgba(255,0,0,0.5);
- background: rgba(255,0,0,0.25);
- }
-
- input:invalid:not(:active):not(:focus):after {
- content: "This isn't a valid URL!";
- display:block;
- }
-
- input[type="checkbox"] {
- margin: 5px 0 5px 35px;
- }
-
- input[type="text"] {
- width: 200px;
- margin: 0 10px 0 0;
- }
-
- input.port {
- width: 50px;
- margin: 2px 10px 0 5px;
- }
-
- section label, section legend {
- color: #999;
- -webkit-transition: color 0.5s ease;
- }
-
- .incognito section label, .incognito section legend {
- color: #BBB;
- }
-
- .active section label, .active section legend, form > fieldset > label {
- color: #000;
- -webkit-transition: color 0.5s ease;
- }
-
- .incognito .active section label, .incognito .active section legend, .incognito form > fieldset > label {
- color: #FFF;
- }
-
- input[type="submit"], button {
- border-radius: 2px;
- box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.1);
- -webkit-user-select: none;
- background: -webkit-linear-gradient(#FAFAFA, #F4F4F4 40%, #E5E5E5);
- border: 1px solid #AAA;
- color: #444;
- margin-bottom: 0;
- min-width: 4em;
- padding: 3px 12px;
- margin-top: 0;
- font-size: 1.1em;
- }
-
- .overlay {
- display: block;
- text-align: center;
- position: absolute;
- left: 50%;
- top: 50%;
- width: 500px;
- padding: 20px;
- margin: -80px 0 0 -270px;
- opacity: 0;
- background: rgba(0, 0, 0, 0.75);
- border-radius: 5px;
- color: #FFF;
- font: 1.5em/1.2 Helvetica Neue, sans-serif;
- -webkit-transition: all 1.0s ease;
- -webkit-transform: scale(0);
- }
- .overlay a {
- color: #FFF;
- }
-
- .overlay.visible {
- opacity: 1;
- -webkit-transform: scale(1);
- }
- </style>
+ <link href="./popup.css" type="text/css" rel="stylesheet">
</head>
<body>
<h1>Proxy Configuration</h1>
@@ -295,8 +104,6 @@
</form>
</div>
<script src="./proxy_form_controller.js"></script>
- <script>
- var c = new ProxyFormController( 'proxyForm' );
- </script>
+ <script src="./popup.js"></script>
</body>
</html>
diff --git a/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.js b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.js
new file mode 100644
index 0000000..1c1f36d
--- /dev/null
+++ b/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.js
@@ -0,0 +1,14 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview This file initializes the extension's popup by creating a
+ * ProxyFormController object.
+ *
+ * @author Mike West <mkwst@google.com>
+ */
+
+document.addEventListener('DOMContentLoaded', function () {
+ var c = new ProxyFormController( 'proxyForm' );
+});
diff --git a/chrome/common/extensions/docs/samples.html b/chrome/common/extensions/docs/samples.html
index 6c02d93..26cdef4 100644
--- a/chrome/common/extensions/docs/samples.html
+++ b/chrome/common/extensions/docs/samples.html
@@ -3384,10 +3384,16 @@
</li><li>
<code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/proxy_configuration/background.html?content-type=text/plain">background.html</a></code>
</li><li>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/proxy_configuration/background.js?content-type=text/plain">background.js</a></code>
+ </li><li>
<code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/proxy_configuration/manifest.json?content-type=text/plain">manifest.json</a></code>
</li><li>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.css?content-type=text/plain">popup.css</a></code>
+ </li><li>
<code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.html?content-type=text/plain">popup.html</a></code>
</li><li>
+ <code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/proxy_configuration/popup.js?content-type=text/plain">popup.js</a></code>
+ </li><li>
<code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/proxy_configuration/proxy_error_handler.js?content-type=text/plain">proxy_error_handler.js</a></code>
</li><li>
<code><a target="_blank" href="http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/examples/extensions/proxy_configuration/proxy_form_controller.js?content-type=text/plain">proxy_form_controller.js</a></code>
diff --git a/chrome/common/extensions/docs/samples.json b/chrome/common/extensions/docs/samples.json
index d5f6dea..82a1d311 100644
--- a/chrome/common/extensions/docs/samples.json
+++ b/chrome/common/extensions/docs/samples.json
@@ -1873,8 +1873,11 @@
"source_files": [
"_locales\/en\/messages.json",
"background.html",
+ "background.js",
"manifest.json",
+ "popup.css",
"popup.html",
+ "popup.js",
"proxy_error_handler.js",
"proxy_form_controller.js",
"test\/jsunittest.js",
@@ -1882,7 +1885,7 @@
"test\/proxy_form_controller_test.js",
"test\/unittest.css"
],
- "source_hash": "9378cbaff5c4aa3def4a92824b88146335feac44",
+ "source_hash": "10dfb898ef11aa9507bb07bcaa7cca5c51879f19",
"zip_path": "examples\/extensions\/proxy_configuration.zip"
},
{