aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/terminal/gwt/server/WebBrowser.java
diff options
context:
space:
mode:
authorMarc Englund <marc@vaadin.com>2011-12-20 15:34:03 +0200
committerMarc Englund <marc@vaadin.com>2011-12-21 09:21:36 +0200
commitca51ee58ac00257eee4adaf8e92c0195c6a1003c (patch)
tree866fda6e1a90b3995dda580aa74a3987da6091a0 /src/com/vaadin/terminal/gwt/server/WebBrowser.java
parent7e594fb40fd2a9ad1759d422a62a5c4045351e6d (diff)
downloadvaadin-framework-ca51ee58ac00257eee4adaf8e92c0195c6a1003c.tar.gz
vaadin-framework-ca51ee58ac00257eee4adaf8e92c0195c6a1003c.zip
Initial unsupported-browser-warning-page for #7985
Includes support for checking isChromeFrame and isChromeFrameCapable. Warning page can be bypassed with cookie. Works, but needs more thought, and it seems the (V)BrowserDetails and WebBrowser mess should be simplified somehow.
Diffstat (limited to 'src/com/vaadin/terminal/gwt/server/WebBrowser.java')
-rw-r--r--src/com/vaadin/terminal/gwt/server/WebBrowser.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/server/WebBrowser.java b/src/com/vaadin/terminal/gwt/server/WebBrowser.java
index 0a743fcf96..3d9540adad 100644
--- a/src/com/vaadin/terminal/gwt/server/WebBrowser.java
+++ b/src/com/vaadin/terminal/gwt/server/WebBrowser.java
@@ -184,6 +184,34 @@ public class WebBrowser implements Terminal {
}
/**
+ * Tests whether the user is using Chrome Frame.
+ *
+ * @return true if the user is using Chrome Frame, false if the user is not
+ * using Chrome or if no information on the browser is present
+ */
+ public boolean isChromeFrame() {
+ if (browserDetails == null) {
+ return false;
+ }
+
+ return browserDetails.isChromeFrame();
+ }
+
+ /**
+ * Tests whether the user's browser is Chrome Frame capable.
+ *
+ * @return true if the user can use Chrome Frame, false if the user can not
+ * or if no information on the browser is present
+ */
+ public boolean isChromeFrameCapable() {
+ if (browserDetails == null) {
+ return false;
+ }
+
+ return browserDetails.isChromeFrameCapable();
+ }
+
+ /**
* Gets the major version of the browser the user is using.
*
* <p>