summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal/gwt/server/WebBrowser.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2011-11-22 17:34:35 +0200
committerArtur Signell <artur@vaadin.com>2011-11-22 17:34:35 +0200
commite65ac1b12020440e0450e51b190af7bd63826ca2 (patch)
treeb5203d60414490db6ebb7540ee5bbfc250e93a74 /src/com/vaadin/terminal/gwt/server/WebBrowser.java
parent7887eee0527b356f24830e0e733aacdc857df9a8 (diff)
downloadvaadin-framework-e65ac1b12020440e0450e51b190af7bd63826ca2.tar.gz
vaadin-framework-e65ac1b12020440e0450e51b190af7bd63826ca2.zip
#7985 Method for checking if browser is too old to work with Vaadin 7
Diffstat (limited to 'src/com/vaadin/terminal/gwt/server/WebBrowser.java')
-rw-r--r--src/com/vaadin/terminal/gwt/server/WebBrowser.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/server/WebBrowser.java b/src/com/vaadin/terminal/gwt/server/WebBrowser.java
index 4835b3c55b..4ac9cb77b2 100644
--- a/src/com/vaadin/terminal/gwt/server/WebBrowser.java
+++ b/src/com/vaadin/terminal/gwt/server/WebBrowser.java
@@ -400,4 +400,25 @@ public class WebBrowser implements Terminal {
}
+ /**
+ * Checks if the browser is so old that it simply won't work with a Vaadin
+ * application. Can be used to redirect to an alternative page, show
+ * alternative content or similar.
+ *
+ * When this method returns true chances are very high that the browser
+ * won't work and it does not make sense to direct the user to the Vaadin
+ * application.
+ *
+ * @return true if the browser won't work, false if not the browser is
+ * supported or might work
+ */
+ public boolean isTooOldToFunctionProperly() {
+ if (browserDetails == null) {
+ // Don't know, so assume it will work
+ return false;
+ }
+
+ return browserDetails.isTooOldToFunctionProperly();
+ }
+
}