package com.ait.toolkit.core.client;

/**
 * Detects in wich platform that app is running
 */
public class Platform {

	private Platform() {

	}

	/**
	 * Returns true if we are running inside NodeWebkit
	 */
	public static native boolean isNodeWebkit()/*-{
		try {
			var nw = $wnd.require('nw.gui');
			if (nw) {
				return true;
			}
			return false;
		} catch (e) {
			return false;
		}

	}-*/;

}

@@ -35,64 +35,8 @@
 t;%0A%0A
-/**%0A * Detects in wich platform that app is running%0A */%0A
 publ
@@ -56,17 +56,20 @@
 form %7B%0A%0A
-%09
+    
 private 
@@ -86,18 +86,26 @@
  %7B%0A%0A
-%09%7D%0A%0A%09
+    %7D%0A%0A    
 /**%0A
-%09
+   
  * R
@@ -156,14 +156,19 @@
 kit%0A
-%09
+   
  */%0A
-%09
+    
 publ
@@ -217,64 +217,70 @@
 %7B%0A%09%09
-try %7B%0A%09%09%09var nw =
+if ($wnd.nw &&
  $wnd.
-require('nw.gui');%0A%09%09%09if (nw
+nw.process && $wnd.nw.process.versions
 ) %7B%0A
-%09
 %09%09%09r
@@ -295,16 +295,14 @@
 ue;%0A
-%09
 %09%09%7D%0A%09%09
-%09
 retu
@@ -315,47 +315,12 @@
 se;%0A
-%09%09%7D catch (e) %7B%0A%09%09%09return false;%0A%09%09%7D%0A%0A%09
+    
 %7D-*/

move api to 0.13