]> err.no Git - varnish/commitdiff
Unfinished Firefox plugin.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 17 Feb 2008 09:32:50 +0000 (09:32 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sun, 17 Feb 2008 09:32:50 +0000 (09:32 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2499 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-tools/firefox/Makefile [new file with mode: 0644]
varnish-tools/firefox/chrome.manifest [new file with mode: 0644]
varnish-tools/firefox/chrome/content/varnish-icon-red-32.gif [new file with mode: 0644]
varnish-tools/firefox/chrome/content/varnish.js [new file with mode: 0644]
varnish-tools/firefox/chrome/content/varnish.xul [new file with mode: 0644]
varnish-tools/firefox/install.rdf [new file with mode: 0644]

diff --git a/varnish-tools/firefox/Makefile b/varnish-tools/firefox/Makefile
new file mode 100644 (file)
index 0000000..0605d3f
--- /dev/null
@@ -0,0 +1,15 @@
+# $Id$
+
+CHROME_CONTENT =                                               \
+       chrome/content/varnish-icon-red-32.gif                  \
+       chrome/content/varnish.xul                              \
+
+FILES =                                                                \
+       install.rdf                                             \
+       chrome.manifest                                         \
+       ${CHROME_CONTENT}
+
+all: varnish.xpi
+
+varnish.xpi: ${FILES}
+       zip $@ ${FILES}
diff --git a/varnish-tools/firefox/chrome.manifest b/varnish-tools/firefox/chrome.manifest
new file mode 100644 (file)
index 0000000..7e44ded
--- /dev/null
@@ -0,0 +1,3 @@
+# $Id$
+content varnish chrome/content/
+overlay chrome://browser/content/browser.xul chrome://varnish/content/varnish.xul
diff --git a/varnish-tools/firefox/chrome/content/varnish-icon-red-32.gif b/varnish-tools/firefox/chrome/content/varnish-icon-red-32.gif
new file mode 100644 (file)
index 0000000..4af1fcb
Binary files /dev/null and b/varnish-tools/firefox/chrome/content/varnish-icon-red-32.gif differ
diff --git a/varnish-tools/firefox/chrome/content/varnish.js b/varnish-tools/firefox/chrome/content/varnish.js
new file mode 100644 (file)
index 0000000..92cb946
--- /dev/null
@@ -0,0 +1,37 @@
+// $Id$
+
+var varnish = {
+       rebuild: function() {
+       }
+};
+
+function varnish_register()
+{
+       window.getBrowser().addProgressListener(varnish_progress_listener);
+}
+
+function varnish_unregister()
+{
+       window.getBrowser().removeProgressListener(varnish_progress_listener);
+}
+
+window.addEventListener("load", varnish_register, false);
+window.addEventListener("unload", varnish_unregister, false);
+
+var varnish_progress_listener = {
+       onLocationChange: function(webProgress, request, location) {
+       },
+
+       onProgressChange: function(webProgress, request, curSelfProgress,
+           maxSelfProgress, curTotalProgress, maxTotalProgress) {
+       },
+
+       onSecurityChange: function(webProgress, request, state) {
+       },
+
+       onStateChange: function(webProgress, request, stateFlags, status) {
+       },
+
+       onStatusChange: function(webProgress, request, status, message) {
+       },
+};
diff --git a/varnish-tools/firefox/chrome/content/varnish.xul b/varnish-tools/firefox/chrome/content/varnish.xul
new file mode 100644 (file)
index 0000000..604925c
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Id$ -->
+<overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
+  <script type="application/x-javascript" src="chrome://varnish/content/varnish.js"/>
+  <statusbar id="status-bar">
+    <statusbarpanel id="varnish-panel" insertafter="statusbar-progresspanel"/>
+  </statusbar>
+</overlay>
diff --git a/varnish-tools/firefox/install.rdf b/varnish-tools/firefox/install.rdf
new file mode 100644 (file)
index 0000000..72c5e53
--- /dev/null
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- $Id$ -->
+<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:em="http://www.mozilla.org/2004/em-rdf#">
+  <Description about="urn:mozilla:install-manifest">
+    <em:id>firefox-extension@varnish-cache.org</em:id>
+    <em:version>1.0</em:version>
+    <em:type>2</em:type>
+
+    <em:targetApplication>
+      <Description>
+       <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
+       <em:minVersion>2.0</em:minVersion>
+       <em:maxVersion>2.0.0.*</em:maxVersion>
+      </Description>
+    </em:targetApplication>
+
+    <em:name>Varnish</em:name>
+    <em:description>Displays information about a Varnish HTTP accelerator</em:description>
+    <em:creator>Dag-Erling Smørgrav</em:creator>
+    <em:homepageURL>http://www.varnish-cache.org/</em:homepageURL>
+    <em:iconURL>chrome://varnish/content/varnish-icon-red-32.gif</em:iconURL>
+  </Description>
+</RDF>