webengine/osswebengine/WebCore/bindings/js/kjs_navigator.cpp
changeset 10 a359256acfc6
parent 0 dd21522fd290
equal deleted inserted replaced
5:10e98eab6f85 10:a359256acfc6
   153 Vector<MimeClassInfo*> *KJS::PluginBase::mimes = 0;
   153 Vector<MimeClassInfo*> *KJS::PluginBase::mimes = 0;
   154 int KJS::PluginBase::m_plugInCacheRefCount = 0;
   154 int KJS::PluginBase::m_plugInCacheRefCount = 0;
   155 
   155 
   156 const ClassInfo Navigator::info = { "Navigator", 0, &NavigatorTable, 0 };
   156 const ClassInfo Navigator::info = { "Navigator", 0, &NavigatorTable, 0 };
   157 /*
   157 /*
   158 @begin NavigatorTable 13
   158 @begin NavigatorTable 17
   159   appCodeName   Navigator::AppCodeName  DontDelete|ReadOnly
   159   appCodeName   Navigator::AppCodeName  DontDelete|ReadOnly
   160   appName       Navigator::AppName      DontDelete|ReadOnly
   160   appName       Navigator::AppName      DontDelete|ReadOnly
   161   appVersion    Navigator::AppVersion   DontDelete|ReadOnly
   161   appVersion    Navigator::AppVersion   DontDelete|ReadOnly
   162   language      Navigator::Language     DontDelete|ReadOnly
   162   language      Navigator::Language     DontDelete|ReadOnly
   163   userAgent     Navigator::UserAgent    DontDelete|ReadOnly
   163   userAgent     Navigator::UserAgent    DontDelete|ReadOnly
   168   productSub    Navigator::ProductSub   DontDelete|ReadOnly
   168   productSub    Navigator::ProductSub   DontDelete|ReadOnly
   169   vendor        Navigator::Vendor       DontDelete|ReadOnly
   169   vendor        Navigator::Vendor       DontDelete|ReadOnly
   170   vendorSub     Navigator::VendorSub    DontDelete|ReadOnly
   170   vendorSub     Navigator::VendorSub    DontDelete|ReadOnly
   171   cookieEnabled Navigator::CookieEnabled DontDelete|ReadOnly
   171   cookieEnabled Navigator::CookieEnabled DontDelete|ReadOnly
   172   javaEnabled   Navigator::JavaEnabled  DontDelete|Function 0
   172   javaEnabled   Navigator::JavaEnabled  DontDelete|Function 0
       
   173   NetworkNotAllowed     Navigator::NetworkNotAllowed    DontDelete|ReadOnly
       
   174   NetworkAccessAllowed  Navigator::NetworkAccessAllowed DontDelete|ReadOnly
       
   175   NetworkAccessible     Navigator::NetworkAccessible    DontDelete|ReadOnly
       
   176   onLine                Navigator::Online               DontDelete|ReadOnly
   173 @end
   177 @end
   174 */
   178 */
   175 KJS_IMPLEMENT_PROTOTYPE_FUNCTION(NavigatorFunc)
   179 KJS_IMPLEMENT_PROTOTYPE_FUNCTION(NavigatorFunc)
   176 
   180 
   177 Navigator::Navigator(ExecState *exec, Frame *f) 
   181 Navigator::Navigator(ExecState *exec, Frame *f) 
   215     return new Plugins(exec);
   219     return new Plugins(exec);
   216   case _MimeTypes:
   220   case _MimeTypes:
   217     return new MimeTypes(exec);
   221     return new MimeTypes(exec);
   218   case CookieEnabled:
   222   case CookieEnabled:
   219     return jsBoolean(cookiesEnabled());
   223     return jsBoolean(cookiesEnabled());
       
   224   case NetworkNotAllowed:
       
   225     return jsNumber(m_frame->loader()->widgetNetworkConstants(0));
       
   226   case NetworkAccessAllowed:
       
   227     return jsNumber(m_frame->loader()->widgetNetworkConstants(1));
       
   228   case NetworkAccessible:
       
   229     return jsNumber(m_frame->loader()->widgetNetworkConstants(2));
       
   230   case Online:
       
   231     return jsNumber(m_frame->loader()->widgetNetworkState());
   220   }
   232   }
   221   return 0;
   233   return 0;
   222 }
   234 }
   223 
   235 
   224 /*******************************************************************/
   236 /*******************************************************************/