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

Unified Diff: chrome/common/extensions/docs/examples/extensions/mappy/popup.html

Issue 8311007: Adding `content_security_policy` to the "Mappy" sample. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Rebasing. Created 9 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/examples/extensions/mappy/popup.html
diff --git a/chrome/common/extensions/docs/examples/extensions/mappy/popup.html b/chrome/common/extensions/docs/examples/extensions/mappy/popup.html
index 29d838d0661bd5182f40bbd198797e5c7ea943c9..c5d27fb02c4e40d5dd85799e2112b3368c31a642 100644
--- a/chrome/common/extensions/docs/examples/extensions/mappy/popup.html
+++ b/chrome/common/extensions/docs/examples/extensions/mappy/popup.html
@@ -1,42 +1,11 @@
-<head>
-<style>
-body {
- margin: 0px;
- padding: 0px;
-}
-#map {
- width: 512px;
- height: 512px;
-}
-</style>
-<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAATfHumDbW3OmRByfquHd3SRTRERdeAiwZ9EeJWta3L_JZVS0bOBRQeZgr4K0xyVKzUdnnuFl8X9PX0w&sensor=false"
- type="text/javascript"></script>
-<script>
-var maps_key = "ABQIAAAATfHumDbW3OmRByfquHd3SRTRERdeAiwZ9EeJWta3L_JZVS0bOBRQeZgr4K0xyVKzUdnnuFl8X9PX0w";
-
-function gclient_geocode(address) {
- var geocoder = new GClientGeocoder();
- geocoder.getLatLng(address, function(point) {
- if (!point) {
- console.log(address + " not found");
- } else {
- var latlng = point.toUrlValue();
- var url = "http://maps.google.com/staticmap?center=" + latlng +
- "&markers=" + latlng + "&zoom=14" +
- "&size=512x512&sensor=false&key=" + maps_key;
- var map = document.getElementById("map");
- map.src = url;
- }
- });
-}
-
-function map() {
- var address = chrome.extension.getBackgroundPage().selectedAddress;
- if (address)
- gclient_geocode(address);
-};
-</script>
-</head>
-<body onload="map()">
-<img id="map" onclick="window.close()">
-</body>
+<!doctype html>
+<html>
+ <head>
+ <title>Popup</title>
+ <link href="popup.css" rel="stylesheet" type="text/css">
+ </head>
+ <body>
+ <img id="map">
+ <script src="popup.js"></script>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698