diff options
author | Denis Anisimov <denis@vaadin.com> | 2014-09-07 16:33:30 +0300 |
---|---|---|
committer | Denis Anisimov <denis@vaadin.com> | 2014-10-09 14:35:48 +0300 |
commit | 709f35aca0f445444c8052015e34113e567a3166 (patch) | |
tree | 3492e967f97681e27ae3e75b43e5f946c37dbebe /server/src/com | |
parent | 29b57f24f735fc529df3487820bc8f2cb513385a (diff) | |
download | vaadin-framework-709f35aca0f445444c8052015e34113e567a3166.tar.gz vaadin-framework-709f35aca0f445444c8052015e34113e567a3166.zip |
isIPad() and isIPhone() methods are added to WebBrowser (#14424,#14423).
Change-Id: I7b3556d5f9c1dd84beec638d7fbff1c5382070a4
Diffstat (limited to 'server/src/com')
-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 |