Simplify backend enum naming, we do not need separate values for gtk and osx webkit backends. Simplify factory creation code.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/SOC2011_WEBVIEW@68169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -97,11 +97,8 @@ enum wxWebViewBackend
|
|||||||
* engine for the current platform*/
|
* engine for the current platform*/
|
||||||
wxWEB_VIEW_BACKEND_DEFAULT,
|
wxWEB_VIEW_BACKEND_DEFAULT,
|
||||||
|
|
||||||
/** The OSX-native WebKit web engine */
|
/** The WebKit web engine */
|
||||||
wxWEB_VIEW_BACKEND_OSX_WEBKIT,
|
wxWEB_VIEW_BACKEND_WEBKIT,
|
||||||
|
|
||||||
/** The GTK port of the WebKit engine */
|
|
||||||
wxWEB_VIEW_BACKEND_GTK_WEBKIT,
|
|
||||||
|
|
||||||
/** Use Microsoft Internet Explorer as web engine */
|
/** Use Microsoft Internet Explorer as web engine */
|
||||||
wxWEB_VIEW_BACKEND_IE
|
wxWEB_VIEW_BACKEND_IE
|
||||||
|
@@ -79,11 +79,8 @@ enum wxWebViewBackend
|
|||||||
* engine for the current platform*/
|
* engine for the current platform*/
|
||||||
wxWEB_VIEW_BACKEND_DEFAULT,
|
wxWEB_VIEW_BACKEND_DEFAULT,
|
||||||
|
|
||||||
/** The OSX-native WebKit web engine */
|
/** The WebKit web engine */
|
||||||
wxWEB_VIEW_BACKEND_OSX_WEBKIT,
|
wxWEB_VIEW_BACKEND_WEBKIT,
|
||||||
|
|
||||||
/** The GTK port of the WebKit engine */
|
|
||||||
wxWEB_VIEW_BACKEND_GTK_WEBKIT,
|
|
||||||
|
|
||||||
/** Use Microsoft Internet Explorer as web engine */
|
/** Use Microsoft Internet Explorer as web engine */
|
||||||
wxWEB_VIEW_BACKEND_IE
|
wxWEB_VIEW_BACKEND_IE
|
||||||
|
@@ -42,13 +42,9 @@ wxWebView* wxWebView::New(wxWebViewBackend backend)
|
|||||||
{
|
{
|
||||||
switch (backend)
|
switch (backend)
|
||||||
{
|
{
|
||||||
#if defined(wxUSE_WEBVIEW_WEBKIT) && defined(__WXOSX__)
|
#if defined(wxUSE_WEBVIEW_WEBKIT) && \
|
||||||
case wxWEB_VIEW_BACKEND_OSX_WEBKIT:
|
(defined(__WXGTK__) || defined(__WXOSX__))
|
||||||
return new wxWebViewWebKit();
|
case wxWEB_VIEW_BACKEND_WEBKIT:
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(wxUSE_WEBVIEW_WEBKIT) && defined(__WXGTK__)
|
|
||||||
case wxWEB_VIEW_BACKEND_GTK_WEBKIT:
|
|
||||||
return new wxWebViewWebKit();
|
return new wxWebViewWebKit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -59,11 +55,8 @@ wxWebView* wxWebView::New(wxWebViewBackend backend)
|
|||||||
|
|
||||||
case wxWEB_VIEW_BACKEND_DEFAULT:
|
case wxWEB_VIEW_BACKEND_DEFAULT:
|
||||||
|
|
||||||
#if defined(wxUSE_WEBVIEW_WEBKIT) && defined(__WXOSX__)
|
#if defined(wxUSE_WEBVIEW_WEBKIT) && \
|
||||||
return new wxWebViewWebKit();
|
(defined(__WXGTK__) || defined(__WXOSX__))
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(wxUSE_WEBVIEW_WEBKIT) && defined(__WXGTK__)
|
|
||||||
return new wxWebViewWebKit();
|
return new wxWebViewWebKit();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -89,16 +82,10 @@ wxWebView* wxWebView::New(wxWindow* parent,
|
|||||||
{
|
{
|
||||||
switch (backend)
|
switch (backend)
|
||||||
{
|
{
|
||||||
#if defined(wxUSE_WEBVIEW_WEBKIT) && defined(__WXOSX__)
|
#if defined(wxUSE_WEBVIEW_WEBKIT) && \
|
||||||
case wxWEB_VIEW_BACKEND_OSX_WEBKIT:
|
(defined(__WXGTK__) || defined(__WXOSX__))
|
||||||
return new wxWebViewWebKit(parent, id, url, pos, size, style,
|
case wxWEB_VIEW_BACKEND_WEBKIT:
|
||||||
name);
|
return new wxWebViewWebKit(parent, id, url, pos, size, style, name);
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(wxUSE_WEBVIEW_WEBKIT) && defined(__WXGTK__)
|
|
||||||
case wxWEB_VIEW_BACKEND_GTK_WEBKIT:
|
|
||||||
return new wxWebViewWebKit(parent, id, url, pos, size, style,
|
|
||||||
name);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_WEBVIEW_IE
|
#if wxUSE_WEBVIEW_IE
|
||||||
@@ -108,11 +95,8 @@ wxWebView* wxWebView::New(wxWindow* parent,
|
|||||||
|
|
||||||
case wxWEB_VIEW_BACKEND_DEFAULT:
|
case wxWEB_VIEW_BACKEND_DEFAULT:
|
||||||
|
|
||||||
#if defined(wxUSE_WEBVIEW_WEBKIT) && defined(__WXOSX__)
|
#if defined(wxUSE_WEBVIEW_WEBKIT) && \
|
||||||
return new wxWebViewWebKit(parent, id, url, pos, size, style, name);
|
(defined(__WXGTK__) || defined(__WXOSX__))
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(wxUSE_WEBVIEW_WEBKIT) && defined(__WXGTK__)
|
|
||||||
return new wxWebViewWebKit(parent, id, url, pos, size, style, name);
|
return new wxWebViewWebKit(parent, id, url, pos, size, style, name);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user