-    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;
-    }
+#ifdef __WXMSW__
+    RegisterFactory(wxWebViewBackendIE, wxSharedPtr<wxWebViewFactory>
+                                                   (new wxWebViewFactoryIE));
+#else
+    RegisterFactory(wxWebViewBackendWebKit, wxSharedPtr<wxWebViewFactory>
+                                                       (new wxWebViewFactoryWebKit));
+#endif