diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2013-08-19 15:17:56 +0200 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2013-08-20 18:15:57 +0200 |
commit | c1c7c3cfa9d8c3e6f05095d0880a84a13a0d9e01 (patch) | |
tree | 1a77807a994125236fc6631e84cdad83d9e3897e /shared | |
parent | abd17e1583e8e13b1a46d599fb695c1189550226 (diff) |
Centralize type conversion functions.
This adds the common GURL->QUrl and string16->QString conversions
into a common header and use those functions throughout the code.
Move the qStringToStringType into the same header and rename it
to a name consistent with the others.
This also cleans up shared_globals.h by moving content:: forward
declarations in the cpp, where they are used.
Change-Id: I19527ea7de1f6047aae8b44c97eb4d7c3e5a0e54
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'shared')
-rw-r--r-- | shared/shared_globals.cpp | 5 | ||||
-rw-r--r-- | shared/shared_globals.h | 20 |
2 files changed, 5 insertions, 20 deletions
diff --git a/shared/shared_globals.cpp b/shared/shared_globals.cpp index bb2fcfb39..08d2368db 100644 --- a/shared/shared_globals.cpp +++ b/shared/shared_globals.cpp @@ -64,6 +64,11 @@ void GetScreenInfoFromNativeWindow(QWindow* window, WebKit::WebScreenInfo* resul } namespace content { +class WebContentsImpl; +class WebContentsViewPort; +class WebContentsViewDelegate; +class RenderViewHostDelegateView; + WebContentsViewPort* CreateWebContentsView(WebContentsImpl*, WebContentsViewDelegate*, RenderViewHostDelegateView**) diff --git a/shared/shared_globals.h b/shared/shared_globals.h index c0b167269..314c7fbf1 100644 --- a/shared/shared_globals.h +++ b/shared/shared_globals.h @@ -42,11 +42,8 @@ #ifndef SHARED_GLOBALS_H #define SHARED_GLOBALS_H -#include "base/files/file_path.h" #include "third_party/WebKit/public/platform/WebScreenInfo.h" -#include <QString> - #ifdef QT_WEBENGINE_LOGGING #define QT_NOT_YET_IMPLEMENTED fprintf(stderr, "function %s not implemented! - %s:%d\n", __func__, __FILE__, __LINE__); #define QT_NOT_USED fprintf(stderr, "# function %s should not be used! - %s:%d\n", __func__, __FILE__, __LINE__); Q_UNREACHABLE(); @@ -55,25 +52,8 @@ #define QT_NOT_USED Q_UNREACHABLE(); // This will assert in debug. #endif -namespace content { -class WebContentsImpl; -class WebContentsViewPort; -class WebContentsViewDelegate; -class RenderViewHostDelegateView; -} // namespace content - class QWindow; void GetScreenInfoFromNativeWindow(QWindow* window, WebKit::WebScreenInfo* results); - -inline base::FilePath::StringType qStringToStringType(const QString &str) -{ -#if defined(OS_POSIX) - return str.toStdString(); -#elif defined(OS_WIN) - return str.toStdWString(); -#endif -} - #endif |