webengine/osswebengine/WebCore/bindings/js/kjs_navigator.cpp
changeset 10 a359256acfc6
parent 0 dd21522fd290
--- a/webengine/osswebengine/WebCore/bindings/js/kjs_navigator.cpp	Fri Jul 03 15:54:40 2009 +0100
+++ b/webengine/osswebengine/WebCore/bindings/js/kjs_navigator.cpp	Thu Aug 27 07:44:59 2009 +0300
@@ -155,7 +155,7 @@
 
 const ClassInfo Navigator::info = { "Navigator", 0, &NavigatorTable, 0 };
 /*
-@begin NavigatorTable 13
+@begin NavigatorTable 17
   appCodeName   Navigator::AppCodeName  DontDelete|ReadOnly
   appName       Navigator::AppName      DontDelete|ReadOnly
   appVersion    Navigator::AppVersion   DontDelete|ReadOnly
@@ -170,6 +170,10 @@
   vendorSub     Navigator::VendorSub    DontDelete|ReadOnly
   cookieEnabled Navigator::CookieEnabled DontDelete|ReadOnly
   javaEnabled   Navigator::JavaEnabled  DontDelete|Function 0
+  NetworkNotAllowed     Navigator::NetworkNotAllowed    DontDelete|ReadOnly
+  NetworkAccessAllowed  Navigator::NetworkAccessAllowed DontDelete|ReadOnly
+  NetworkAccessible     Navigator::NetworkAccessible    DontDelete|ReadOnly
+  onLine                Navigator::Online               DontDelete|ReadOnly
 @end
 */
 KJS_IMPLEMENT_PROTOTYPE_FUNCTION(NavigatorFunc)
@@ -217,6 +221,14 @@
     return new MimeTypes(exec);
   case CookieEnabled:
     return jsBoolean(cookiesEnabled());
+  case NetworkNotAllowed:
+    return jsNumber(m_frame->loader()->widgetNetworkConstants(0));
+  case NetworkAccessAllowed:
+    return jsNumber(m_frame->loader()->widgetNetworkConstants(1));
+  case NetworkAccessible:
+    return jsNumber(m_frame->loader()->widgetNetworkConstants(2));
+  case Online:
+    return jsNumber(m_frame->loader()->widgetNetworkState());
   }
   return 0;
 }