- switch (backend)
- {
- #if wxHAVE_WEB_BACKEND_OSX_WEBKIT
- case wxWEB_VIEW_BACKEND_OSX_WEBKIT:
- return new wxOSXWebKitCtrl(parent, id, url, pos, size, style,
- name);
- #endif
-
- #if wxHAVE_WEB_BACKEND_GTK_WEBKIT
- case wxWEB_VIEW_BACKEND_GTK_WEBKIT:
- return new wxGtkWebKitCtrl(parent, id, url, pos, size, style,
- name);
- #endif
-
- #if wxHAVE_WEB_BACKEND_IE
- case wxWEB_VIEW_BACKEND_IE:
- return new wxIEPanel(parent, id, url, pos, size, style, name);
- #endif
-
- case wxWEB_VIEW_BACKEND_DEFAULT:
-
- #if wxHAVE_WEB_BACKEND_OSX_WEBKIT
- return new wxOSXWebKitCtrl(parent, id, url, pos, size, style, name);
- #endif
-
- #if wxHAVE_WEB_BACKEND_GTK_WEBKIT
- return new wxGtkWebKitCtrl(parent, id, url, pos, size, style, name);
- #endif
-
- #if wxHAVE_WEB_BACKEND_IE
- return new wxIEPanel(parent, id, url, pos, size, style, name);
- #endif
-
- // fall-through intended
- default:
- return NULL;
- }
+ wxStringWebViewFactoryMap::iterator iter = FindFactory(backend);
+
+ if(iter == m_factoryMap.end())
+ return NULL;
+ else
+ return (*iter).second->Create(parent, id, url, pos, size, style, name);
+