diff options
author | Denis Anisimov <denis@vaadin.com> | 2014-09-07 16:33:30 +0300 |
---|---|---|
committer | Markus Koivisto <markus@vaadin.com> | 2014-10-14 18:03:06 +0300 |
commit | cf0682ab3b5346138659c572b074f09455a15638 (patch) | |
tree | ed89d70b7bc160398b852565e4b8d864194c6945 /server | |
parent | dd6ef048372e441718ecf357066a374f6570ea2f (diff) | |
download | vaadin-framework-cf0682ab3b5346138659c572b074f09455a15638.tar.gz vaadin-framework-cf0682ab3b5346138659c572b074f09455a15638.zip |
isIPad() and isIPhone() methods are added to WebBrowser (#14424,#14423).
Change-Id: I7b3556d5f9c1dd84beec638d7fbff1c5382070a4
Diffstat (limited to 'server')
-rw-r--r-- | server/src/com/vaadin/server/WebBrowser.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/server/src/com/vaadin/server/WebBrowser.java b/server/src/com/vaadin/server/WebBrowser.java index 17ba6756b8..cb5979d612 100644 --- a/server/src/com/vaadin/server/WebBrowser.java +++ b/server/src/com/vaadin/server/WebBrowser.java @@ -291,6 +291,26 @@ public class WebBrowser implements Serializable { } /** + * Tests if the browser is run on IPhone. + * + * @return true if run on IPhone false if the user is not using IPhone or if + * no information on the browser is present + */ + public boolean isIPhone() { + return browserDetails.isIPhone(); + } + + /** + * Tests if the browser is run on IPad. + * + * @return true if run on IPad false if the user is not using IPad or if no + * information on the browser is present + */ + public boolean isIPad() { + return browserDetails.isIPad(); + } + + /** * Returns the browser-reported TimeZone offset in milliseconds from GMT. * This includes possible daylight saving adjustments, to figure out which * TimeZone the user actually might be in, see |