summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-12-12 15:06:29 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-03-02 13:18:46 +0000
commit0c49002d833b6c8ccf822d1ebd29a86b3f15f389 (patch)
treea414da48ea946a97daba4eb9106f0e2387f18a42
parent26ae2ce0a8401698a2b1c1f0a8162ebf83dcafef (diff)
Add namespace to internal QtWebEngine API
Adds the QtWebEngineCore namespace to all internal core API. This ensures we don't export any internal symbols in the global namespace. Change-Id: I26af888ea7c6c4c4d0f04c24a377c1a9d3c92751 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
-rw-r--r--src/core/access_token_store_qt.cpp4
-rw-r--r--src/core/access_token_store_qt.h4
-rw-r--r--src/core/browser_accessibility_qt.cpp1
-rw-r--r--src/core/browser_context_adapter.cpp4
-rw-r--r--src/core/browser_context_adapter.h5
-rw-r--r--src/core/browser_context_adapter_client.h4
-rw-r--r--src/core/browser_context_qt.cpp4
-rw-r--r--src/core/browser_context_qt.h4
-rw-r--r--src/core/certificate_error_controller.cpp6
-rw-r--r--src/core/chromium_overrides.cpp9
-rw-r--r--src/core/chromium_overrides.h2
-rw-r--r--src/core/clipboard_qt.cpp10
-rw-r--r--src/core/clipboard_qt.h4
-rw-r--r--src/core/content_browser_client_qt.cpp6
-rw-r--r--src/core/content_browser_client_qt.h3
-rw-r--r--src/core/content_client_qt.cpp10
-rw-r--r--src/core/content_client_qt.h4
-rw-r--r--src/core/content_main_delegate_qt.cpp3
-rw-r--r--src/core/content_main_delegate_qt.h3
-rw-r--r--src/core/custom_protocol_handler.cpp4
-rw-r--r--src/core/custom_protocol_handler.h10
-rw-r--r--src/core/custom_url_scheme_handler.cpp4
-rw-r--r--src/core/custom_url_scheme_handler.h9
-rw-r--r--src/core/delegated_frame_node.cpp3
-rw-r--r--src/core/delegated_frame_node.h4
-rw-r--r--src/core/desktop_screen_qt.cpp4
-rw-r--r--src/core/desktop_screen_qt.h4
-rw-r--r--src/core/dev_tools_http_handler_delegate_qt.cpp4
-rw-r--r--src/core/dev_tools_http_handler_delegate_qt.h4
-rw-r--r--src/core/download_manager_delegate_qt.cpp4
-rw-r--r--src/core/download_manager_delegate_qt.h5
-rw-r--r--src/core/javascript_dialog_controller.cpp4
-rw-r--r--src/core/javascript_dialog_controller.h4
-rw-r--r--src/core/javascript_dialog_controller_p.h4
-rw-r--r--src/core/javascript_dialog_manager_qt.cpp4
-rw-r--r--src/core/javascript_dialog_manager_qt.h6
-rw-r--r--src/core/location_provider_qt.cpp8
-rw-r--r--src/core/location_provider_qt.h6
-rw-r--r--src/core/media_capture_devices_dispatcher.cpp4
-rw-r--r--src/core/media_capture_devices_dispatcher.h4
-rw-r--r--src/core/network_delegate_qt.cpp6
-rw-r--r--src/core/network_delegate_qt.h4
-rw-r--r--src/core/process_main.cpp4
-rw-r--r--src/core/process_main.h2
-rw-r--r--src/core/qrc_protocol_handler_qt.cpp8
-rw-r--r--src/core/qrc_protocol_handler_qt.h4
-rw-r--r--src/core/qt_render_view_observer_host.cpp4
-rw-r--r--src/core/qt_render_view_observer_host.h4
-rw-r--r--src/core/render_widget_host_view_qt.cpp4
-rw-r--r--src/core/render_widget_host_view_qt.h4
-rw-r--r--src/core/render_widget_host_view_qt_delegate.h4
-rw-r--r--src/core/renderer/content_renderer_client_qt.cpp4
-rw-r--r--src/core/renderer/content_renderer_client_qt.h4
-rw-r--r--src/core/renderer/web_channel_ipc_transport.cpp4
-rw-r--r--src/core/renderer/web_channel_ipc_transport.h4
-rw-r--r--src/core/resource_context_qt.cpp4
-rw-r--r--src/core/resource_context_qt.h6
-rw-r--r--src/core/resource_dispatcher_host_delegate_qt.cpp4
-rw-r--r--src/core/resource_dispatcher_host_delegate_qt.h4
-rw-r--r--src/core/surface_factory_qt.cpp4
-rw-r--r--src/core/surface_factory_qt.h4
-rw-r--r--src/core/type_conversion.h4
-rw-r--r--src/core/url_request_context_getter_qt.cpp4
-rw-r--r--src/core/url_request_context_getter_qt.h4
-rw-r--r--src/core/url_request_custom_job.cpp4
-rw-r--r--src/core/url_request_custom_job.h4
-rw-r--r--src/core/url_request_custom_job_delegate.cpp3
-rw-r--r--src/core/url_request_custom_job_delegate.h4
-rw-r--r--src/core/url_request_qrc_job_qt.cpp3
-rw-r--r--src/core/url_request_qrc_job_qt.h4
-rw-r--r--src/core/user_script.cpp8
-rw-r--r--src/core/user_script.h11
-rw-r--r--src/core/user_script_controller_host.cpp4
-rw-r--r--src/core/user_script_controller_host.h7
-rw-r--r--src/core/web_channel_ipc_transport_host.cpp4
-rw-r--r--src/core/web_channel_ipc_transport_host.h5
-rw-r--r--src/core/web_contents_adapter.cpp6
-rw-r--r--src/core/web_contents_adapter.h16
-rw-r--r--src/core/web_contents_adapter_client.h4
-rw-r--r--src/core/web_contents_adapter_p.h10
-rw-r--r--src/core/web_contents_delegate_qt.cpp4
-rw-r--r--src/core/web_contents_delegate_qt.h4
-rw-r--r--src/core/web_contents_view_qt.cpp4
-rw-r--r--src/core/web_contents_view_qt.h4
-rw-r--r--src/core/web_engine_context.cpp2
-rw-r--r--src/core/web_engine_context.h16
-rw-r--r--src/core/web_engine_library_info.cpp1
-rw-r--r--src/core/web_engine_settings.cpp5
-rw-r--r--src/core/web_engine_settings.h10
-rw-r--r--src/core/web_engine_visited_links_manager.cpp4
-rw-r--r--src/core/web_engine_visited_links_manager.h8
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem.cpp3
-rw-r--r--src/webengine/api/qquickwebenginedownloaditem_p_p.h5
-rw-r--r--src/webengine/api/qquickwebenginehistory.cpp2
-rw-r--r--src/webengine/api/qquickwebenginehistory_p.h2
-rw-r--r--src/webengine/api/qquickwebenginehistory_p_p.h8
-rw-r--r--src/webengine/api/qquickwebenginenewviewrequest_p.h4
-rw-r--r--src/webengine/api/qquickwebengineprofile.cpp2
-rw-r--r--src/webengine/api/qquickwebengineprofile_p.h4
-rw-r--r--src/webengine/api/qquickwebengineprofile_p_p.h12
-rw-r--r--src/webengine/api/qquickwebenginescript.cpp4
-rw-r--r--src/webengine/api/qquickwebenginescript_p.h5
-rw-r--r--src/webengine/api/qquickwebenginescript_p_p.h12
-rw-r--r--src/webengine/api/qquickwebenginesettings.cpp2
-rw-r--r--src/webengine/api/qquickwebenginesettings_p.h4
-rw-r--r--src/webengine/api/qquickwebengineview.cpp1
-rw-r--r--src/webengine/api/qquickwebengineview_p_p.h26
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.cpp4
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quick.h5
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp3
-rw-r--r--src/webengine/render_widget_host_view_qt_delegate_quickwindow.h4
-rw-r--r--src/webengine/ui_delegates_manager.cpp4
-rw-r--r--src/webengine/ui_delegates_manager.h8
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem.cpp2
-rw-r--r--src/webenginewidgets/api/qwebenginedownloaditem_p.h2
-rw-r--r--src/webenginewidgets/api/qwebenginepage.cpp2
-rw-r--r--src/webenginewidgets/api/qwebenginepage_p.h24
-rw-r--r--src/webenginewidgets/api/qwebengineprofile.cpp2
-rw-r--r--src/webenginewidgets/api/qwebengineprofile_p.h12
-rw-r--r--src/webenginewidgets/api/qwebenginescript.cpp2
-rw-r--r--src/webenginewidgets/api/qwebenginescript.h7
-rw-r--r--src/webenginewidgets/api/qwebenginescriptcollection.cpp4
-rw-r--r--src/webenginewidgets/api/qwebenginescriptcollection_p.h8
-rw-r--r--src/webenginewidgets/api/qwebenginesettings.cpp2
-rw-r--r--src/webenginewidgets/api/qwebenginesettings.h4
-rw-r--r--src/webenginewidgets/api/qwebengineurlrequestjob.cpp2
-rw-r--r--src/webenginewidgets/api/qwebengineurlrequestjob_p.h6
-rw-r--r--src/webenginewidgets/api/qwebengineurlschemehandler.cpp2
-rw-r--r--src/webenginewidgets/api/qwebengineurlschemehandler_p_p.h4
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp3
-rw-r--r--src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h4
131 files changed, 546 insertions, 124 deletions
diff --git a/src/core/access_token_store_qt.cpp b/src/core/access_token_store_qt.cpp
index b0bfd6ea..b657a633 100644
--- a/src/core/access_token_store_qt.cpp
+++ b/src/core/access_token_store_qt.cpp
@@ -50,6 +50,8 @@
#include "content_browser_client_qt.h"
#include "web_engine_context.h"
+namespace QtWebEngineCore {
+
using content::AccessTokenStore;
using content::BrowserThread;
@@ -84,3 +86,5 @@ void AccessTokenStoreQt::SaveAccessToken(const GURL& serverUrl, const base::stri
{
m_accessTokenSet[serverUrl] = accessToken;
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/access_token_store_qt.h b/src/core/access_token_store_qt.h
index 2b47e8b0..6b8cfa2a 100644
--- a/src/core/access_token_store_qt.h
+++ b/src/core/access_token_store_qt.h
@@ -48,6 +48,8 @@ namespace net {
class URLRequestContextGetter;
}
+namespace QtWebEngineCore {
+
class AccessTokenStoreQt : public content::AccessTokenStore {
public:
AccessTokenStoreQt();
@@ -67,4 +69,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(AccessTokenStoreQt);
};
+} // namespace QtWebEngineCore
+
#endif // ACCESS_TOKEN_STORE_QT_H
diff --git a/src/core/browser_accessibility_qt.cpp b/src/core/browser_accessibility_qt.cpp
index dfebbadf..204cda63 100644
--- a/src/core/browser_accessibility_qt.cpp
+++ b/src/core/browser_accessibility_qt.cpp
@@ -49,6 +49,7 @@
#include "type_conversion.h"
using namespace blink;
+using QtWebEngineCore::toQt;
namespace content {
diff --git a/src/core/browser_context_adapter.cpp b/src/core/browser_context_adapter.cpp
index f89e671c..cb606a8b 100644
--- a/src/core/browser_context_adapter.cpp
+++ b/src/core/browser_context_adapter.cpp
@@ -64,6 +64,8 @@ inline QString buildLocationFromStandardPath(const QString &standardPath, const
}
}
+namespace QtWebEngineCore {
+
BrowserContextAdapter::BrowserContextAdapter(bool offTheRecord)
: m_offTheRecord(offTheRecord)
, m_browserContext(new BrowserContextQt(this))
@@ -333,3 +335,5 @@ UserScriptControllerHost *BrowserContextAdapter::userScriptController()
m_userScriptController.reset(new UserScriptControllerHost);
return m_userScriptController.data();
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/browser_context_adapter.h b/src/core/browser_context_adapter.h
index 2a7c3465..0e5a3605 100644
--- a/src/core/browser_context_adapter.h
+++ b/src/core/browser_context_adapter.h
@@ -44,7 +44,10 @@
#include <QString>
#include <QVector>
+namespace QtWebEngineCore {
+
class BrowserContextAdapterClient;
+
class BrowserContextQt;
class CustomUrlSchemeHandler;
class DownloadManagerDelegateQt;
@@ -147,4 +150,6 @@ private:
Q_DISABLE_COPY(BrowserContextAdapter)
};
+} // namespace QtWebEngineCore
+
#endif // BROWSER_CONTEXT_ADAPTER_H
diff --git a/src/core/browser_context_adapter_client.h b/src/core/browser_context_adapter_client.h
index 1c61a3c6..4a57b75c 100644
--- a/src/core/browser_context_adapter_client.h
+++ b/src/core/browser_context_adapter_client.h
@@ -41,6 +41,8 @@
#include <QString>
#include <QUrl>
+namespace QtWebEngineCore {
+
class QWEBENGINE_EXPORT BrowserContextAdapterClient
{
public:
@@ -73,4 +75,6 @@ public:
virtual void downloadUpdated(const DownloadItemInfo &info) = 0;
};
+} // namespace
+
#endif // BROWSER_CONTEXT_ADAPTER_CLIENT_H
diff --git a/src/core/browser_context_qt.cpp b/src/core/browser_context_qt.cpp
index 13c23190..3fa0f672 100644
--- a/src/core/browser_context_qt.cpp
+++ b/src/core/browser_context_qt.cpp
@@ -48,6 +48,8 @@
#include "content/public/browser/storage_partition.h"
#include "net/proxy/proxy_config_service.h"
+namespace QtWebEngineCore {
+
BrowserContextQt::BrowserContextQt(BrowserContextAdapter *adapter)
: m_adapter(adapter)
{
@@ -138,3 +140,5 @@ net::URLRequestContextGetter *BrowserContextQt::CreateRequestContext(content::Pr
static_cast<ResourceContextQt*>(GetResourceContext())->set_url_request_context_getter(url_request_getter_.get());
return url_request_getter_.get();
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/browser_context_qt.h b/src/core/browser_context_qt.h
index fb94ddf0..af36b55a 100644
--- a/src/core/browser_context_qt.h
+++ b/src/core/browser_context_qt.h
@@ -44,6 +44,8 @@
#include <QtCore/qcompilerdetection.h> // Needed for Q_DECL_OVERRIDE
+namespace QtWebEngineCore {
+
class BrowserContextAdapter;
class URLRequestContextGetterQt;
@@ -83,4 +85,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(BrowserContextQt);
};
+} // namespace QtWebEngineCore
+
#endif // BROWSER_CONTEXT_QT_H
diff --git a/src/core/certificate_error_controller.cpp b/src/core/certificate_error_controller.cpp
index 4b89de04..3a95458e 100644
--- a/src/core/certificate_error_controller.cpp
+++ b/src/core/certificate_error_controller.cpp
@@ -43,6 +43,10 @@
#include "chrome/grit/generated_resources.h"
#include "type_conversion.h"
+QT_BEGIN_NAMESPACE
+
+using namespace QtWebEngineCore;
+
void CertificateErrorControllerPrivate::accept(bool accepted)
{
callback.Run(accepted);
@@ -154,3 +158,5 @@ QString CertificateErrorController::errorString() const
return getQStringForMessageId(IDS_CERT_ERROR_UNKNOWN_ERROR_DESCRIPTION);
}
+
+QT_END_NAMESPACE
diff --git a/src/core/chromium_overrides.cpp b/src/core/chromium_overrides.cpp
index a098fb0a..bd76025e 100644
--- a/src/core/chromium_overrides.cpp
+++ b/src/core/chromium_overrides.cpp
@@ -63,6 +63,7 @@
#include "ui/gfx/platform_font.h"
#endif
+namespace QtWebEngineCore {
void GetScreenInfoFromNativeWindow(QWindow* window, blink::WebScreenInfo* results)
{
QScreen* screen = window->screen();
@@ -80,6 +81,8 @@ void GetScreenInfoFromNativeWindow(QWindow* window, blink::WebScreenInfo* result
*results = r;
}
+} // namespace QtWebEngineCore
+
#if defined(USE_X11)
XDisplay* GetQtXDisplay()
{
@@ -97,7 +100,7 @@ WebContentsView* CreateWebContentsView(WebContentsImpl *web_contents,
WebContentsViewDelegate *,
RenderViewHostDelegateView **render_view_host_delegate_view)
{
- WebContentsViewQt* rv = new WebContentsViewQt(web_contents);
+ QtWebEngineCore::WebContentsViewQt* rv = new QtWebEngineCore::WebContentsViewQt(web_contents);
*render_view_host_delegate_view = rv;
return rv;
}
@@ -105,10 +108,10 @@ WebContentsView* CreateWebContentsView(WebContentsImpl *web_contents,
// static
void RenderWidgetHostViewBase::GetDefaultScreenInfo(blink::WebScreenInfo* results) {
QWindow dummy;
- GetScreenInfoFromNativeWindow(&dummy, results);
+ QtWebEngineCore::GetScreenInfoFromNativeWindow(&dummy, results);
}
-}
+} // namespace content
#if defined(USE_AURA) && !defined(USE_OZONE)
namespace content {
diff --git a/src/core/chromium_overrides.h b/src/core/chromium_overrides.h
index 9df4b145..6787729a 100644
--- a/src/core/chromium_overrides.h
+++ b/src/core/chromium_overrides.h
@@ -44,6 +44,8 @@ QT_BEGIN_NAMESPACE
class QWindow;
QT_END_NAMESPACE
+namespace QtWebEngineCore {
void GetScreenInfoFromNativeWindow(QWindow* window, blink::WebScreenInfo* results);
+}
#endif
diff --git a/src/core/clipboard_qt.cpp b/src/core/clipboard_qt.cpp
index 21ea457c..f7ca9764 100644
--- a/src/core/clipboard_qt.cpp
+++ b/src/core/clipboard_qt.cpp
@@ -51,6 +51,8 @@
#include <QImage>
#include <QMimeData>
+namespace QtWebEngineCore {
+
Q_GLOBAL_STATIC(ClipboardChangeObserver, clipboardChangeObserver)
ClipboardChangeObserver::ClipboardChangeObserver()
@@ -63,6 +65,10 @@ void ClipboardChangeObserver::trackChange(QClipboard::Mode mode)
++sequenceNumber[mode];
}
+} // namespace QtWebEngineCore
+
+using namespace QtWebEngineCore;
+
namespace {
const char kMimeTypeBitmap[] = "image/bmp";
@@ -188,6 +194,8 @@ bool Clipboard::FormatType::operator<(const FormatType& other) const
} // namespace ui
+namespace QtWebEngineCore {
+
void ClipboardQt::WriteObjects(ui::ClipboardType type, const ObjectMap& objects)
{
DCHECK(CalledOnValidThread());
@@ -358,4 +366,4 @@ uint64 ClipboardQt::GetSequenceNumber(ui::ClipboardType type)
return clipboardChangeObserver()->getSequenceNumber(type == ui::CLIPBOARD_TYPE_COPY_PASTE ? QClipboard::Clipboard : QClipboard::Selection);
}
-
+} // namespace QtWebEngineCore
diff --git a/src/core/clipboard_qt.h b/src/core/clipboard_qt.h
index 0421f84f..4c7e6ab5 100644
--- a/src/core/clipboard_qt.h
+++ b/src/core/clipboard_qt.h
@@ -43,6 +43,8 @@
#include <QMap>
#include <QObject>
+namespace QtWebEngineCore {
+
class ClipboardChangeObserver : public QObject {
Q_OBJECT
public:
@@ -88,4 +90,6 @@ protected:
virtual void WriteData(const FormatType& format, const char* data_data, size_t data_len) Q_DECL_OVERRIDE;
};
+} // namespace QtWebEngineCore
+
#endif
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index 8d254149..b0badde9 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -80,6 +80,8 @@ QT_BEGIN_NAMESPACE
Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context();
QT_END_NAMESPACE
+namespace QtWebEngineCore {
+
namespace {
ContentBrowserClientQt* gBrowserClient = 0; // Owned by ContentMainDelegateQt.
@@ -205,7 +207,7 @@ public:
void PreMainMessageLoopStart() Q_DECL_OVERRIDE
{
- base::MessageLoop::InitMessagePumpForUIFactory(::messagePumpFactory);
+ base::MessageLoop::InitMessagePumpForUIFactory(messagePumpFactory);
}
void PreMainMessageLoopRun() Q_DECL_OVERRIDE
@@ -447,3 +449,5 @@ content::DevToolsManagerDelegate* ContentBrowserClientQt::GetDevToolsManagerDele
{
return new DevToolsManagerDelegateQt;
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h
index 77e3dbdb..bce8f70e 100644
--- a/src/core/content_browser_client_qt.h
+++ b/src/core/content_browser_client_qt.h
@@ -64,6 +64,7 @@ namespace gfx {
class GLShareGroup;
}
+namespace QtWebEngineCore {
class BrowserContextQt;
class BrowserMainPartsQt;
class ResourceDispatcherHostDelegateQt;
@@ -120,4 +121,6 @@ private:
scoped_refptr<ShareGroupQtQuick> m_shareGroupQtQuick;
};
+} // namespace QtWebEngineCore
+
#endif // CONTENT_BROWSER_CLIENT_QT_H
diff --git a/src/core/content_client_qt.cpp b/src/core/content_client_qt.cpp
index 964de008..20a8df75 100644
--- a/src/core/content_client_qt.cpp
+++ b/src/core/content_client_qt.cpp
@@ -42,15 +42,17 @@
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h"
+#include <QCoreApplication>
+#include <QStringBuilder>
+
+namespace QtWebEngineCore {
+
std::string ContentClientQt::getUserAgent()
{
// Mention the Chromium version we're based on to get passed stupid UA-string-based feature detection (several WebRTC demos need this)
return content::BuildUserAgentFromProduct("QtWebEngine/" QTWEBENGINECORE_VERSION_STR " Chrome/" CHROMIUM_VERSION);
}
-#include <QCoreApplication>
-#include <QStringBuilder>
-
base::StringPiece ContentClientQt::GetDataResource(int resource_id, ui::ScaleFactor scale_factor) const {
return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(resource_id, scale_factor);
}
@@ -65,3 +67,5 @@ std::string ContentClientQt::GetProduct() const
QString productName(qApp->applicationName() % '/' % qApp->applicationVersion());
return productName.toStdString();
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/content_client_qt.h b/src/core/content_client_qt.h
index 041a829a..f68282dc 100644
--- a/src/core/content_client_qt.h
+++ b/src/core/content_client_qt.h
@@ -42,6 +42,8 @@
#include "ui/base/layout.h"
#include <QtCore/qcompilerdetection.h> // Needed for Q_DECL_OVERRIDE
+namespace QtWebEngineCore {
+
class ContentClientQt : public content::ContentClient {
public:
static std::string getUserAgent();
@@ -52,4 +54,6 @@ public:
virtual std::string GetProduct() const Q_DECL_OVERRIDE;
};
+} // namespace QtWebEngineCore
+
#endif // CONTENT_CLIENT_QT_H
diff --git a/src/core/content_main_delegate_qt.cpp b/src/core/content_main_delegate_qt.cpp
index f05229b8..b8e40a44 100644
--- a/src/core/content_main_delegate_qt.cpp
+++ b/src/core/content_main_delegate_qt.cpp
@@ -54,6 +54,8 @@
#include <QLocale>
+namespace QtWebEngineCore {
+
static base::StringPiece PlatformResourceProvider(int key) {
if (key == IDR_DIR_HEADER_HTML) {
base::StringPiece html_data = ui::ResourceBundle::GetSharedInstance().GetRawDataResource(IDR_DIR_HEADER_HTML);
@@ -103,3 +105,4 @@ bool ContentMainDelegateQt::BasicStartupComplete(int *exit_code)
return false;
}
+} // namespace QtWebEngineCore
diff --git a/src/core/content_main_delegate_qt.h b/src/core/content_main_delegate_qt.h
index cae21c0b..f2f13d35 100644
--- a/src/core/content_main_delegate_qt.h
+++ b/src/core/content_main_delegate_qt.h
@@ -44,6 +44,7 @@
#include "content_browser_client_qt.h"
+namespace QtWebEngineCore {
class ContentMainDelegateQt : public content::ContentMainDelegate
{
@@ -62,4 +63,6 @@ private:
scoped_ptr<ContentBrowserClientQt> m_browserClient;
};
+} // namespace QtWebEngineCore
+
#endif // CONTENT_MAIN_DELEGATE_QT_H
diff --git a/src/core/custom_protocol_handler.cpp b/src/core/custom_protocol_handler.cpp
index fd8cebb9..5deadf18 100644
--- a/src/core/custom_protocol_handler.cpp
+++ b/src/core/custom_protocol_handler.cpp
@@ -41,6 +41,8 @@
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_error_job.h"
+namespace QtWebEngineCore {
+
CustomProtocolHandler::CustomProtocolHandler(CustomUrlSchemeHandler *schemeHandler)
: m_schemeHandler(schemeHandler)
{
@@ -53,3 +55,5 @@ net::URLRequestJob *CustomProtocolHandler::MaybeCreateJob(net::URLRequest *reque
return new URLRequestCustomJob(request, networkDelegate, m_schemeHandler);
}
+
+} // namespace
diff --git a/src/core/custom_protocol_handler.h b/src/core/custom_protocol_handler.h
index 4b29a82b..923cac79 100644
--- a/src/core/custom_protocol_handler.h
+++ b/src/core/custom_protocol_handler.h
@@ -44,9 +44,6 @@
#include <QtCore/QObject>
#include <QtCore/qcompilerdetection.h> // Needed for Q_DECL_OVERRIDE
-class BrowserContextAdapter;
-class CustomUrlSchemeHandler;
-
QT_FORWARD_DECLARE_CLASS(QIODevice)
namespace net {
@@ -54,6 +51,11 @@ class NetworkDelegate;
class URLRequestJob;
} // namespace
+namespace QtWebEngineCore {
+
+class BrowserContextAdapter;
+class CustomUrlSchemeHandler;
+
// Implements a ProtocolHandler for custom URL schemes.
// If |network_delegate_| is NULL then all file requests will fail with ERR_ACCESS_DENIED.
class QWEBENGINE_EXPORT CustomProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler {
@@ -68,4 +70,6 @@ private:
CustomUrlSchemeHandler *m_schemeHandler;
};
+} // namespace
+
#endif // CUSTOM_PROTOCOL_HANDLER_H_
diff --git a/src/core/custom_url_scheme_handler.cpp b/src/core/custom_url_scheme_handler.cpp
index edc8000c..591cad32 100644
--- a/src/core/custom_url_scheme_handler.cpp
+++ b/src/core/custom_url_scheme_handler.cpp
@@ -37,6 +37,8 @@
#include "custom_url_scheme_handler.h"
#include "custom_protocol_handler.h"
+namespace QtWebEngineCore {
+
CustomUrlSchemeHandler::CustomUrlSchemeHandler(const QByteArray &scheme)
: m_scheme(scheme)
{
@@ -61,3 +63,5 @@ CustomProtocolHandler *CustomUrlSchemeHandler::createProtocolHandler()
// Will be owned by the JobFactory.
return new CustomProtocolHandler(this);
}
+
+} // namespace
diff --git a/src/core/custom_url_scheme_handler.h b/src/core/custom_url_scheme_handler.h
index dbcdf2a6..0079095d 100644
--- a/src/core/custom_url_scheme_handler.h
+++ b/src/core/custom_url_scheme_handler.h
@@ -42,12 +42,14 @@
#include <QtCore/QByteArray>
#include <QtCore/QScopedPointer>
+QT_FORWARD_DECLARE_CLASS(QIODevice)
+
+namespace QtWebEngineCore {
+
class BrowserContextAdapter;
class CustomProtocolHandler;
class URLRequestCustomJobDelegate;
-QT_FORWARD_DECLARE_CLASS(QIODevice)
-
class QWEBENGINE_EXPORT CustomUrlSchemeHandler {
public:
explicit CustomUrlSchemeHandler(const QByteArray &);
@@ -63,4 +65,7 @@ private:
QByteArray m_scheme;
};
+
+} // namespace
+
#endif // CUSTOM_URL_SCHEME_HANDLER_H_
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp
index 6731a6a0..6f79d495 100644
--- a/src/core/delegated_frame_node.cpp
+++ b/src/core/delegated_frame_node.cpp
@@ -76,6 +76,8 @@
#include <EGL/eglext.h>
#endif
+namespace QtWebEngineCore {
+
class MailboxTexture : public QSGTexture, protected QOpenGLFunctions {
public:
MailboxTexture(const gpu::MailboxHolder &mailboxHolder, const QSize textureSize);
@@ -708,3 +710,4 @@ void DelegatedFrameNode::syncPointRetired(DelegatedFrameNode *frameNode, QList<M
base::MessageLoop::current()->PostTask(FROM_HERE, base::Bind(&DelegatedFrameNode::fetchTexturesAndUnlockQt, frameNode, mailboxesToFetch));
}
+} // namespace QtWebEngineCore
diff --git a/src/core/delegated_frame_node.h b/src/core/delegated_frame_node.h
index 5b361e99..60a1535d 100644
--- a/src/core/delegated_frame_node.h
+++ b/src/core/delegated_frame_node.h
@@ -57,6 +57,8 @@ namespace cc {
class DelegatedFrameData;
}
+namespace QtWebEngineCore {
+
class MailboxTexture;
class ResourceHolder;
@@ -98,4 +100,6 @@ private:
QMutex m_mutex;
};
+} // namespace QtWebEngineCore
+
#endif // DELEGATED_FRAME_NODE_H
diff --git a/src/core/desktop_screen_qt.cpp b/src/core/desktop_screen_qt.cpp
index fa1835af..6469ad8c 100644
--- a/src/core/desktop_screen_qt.cpp
+++ b/src/core/desktop_screen_qt.cpp
@@ -36,6 +36,8 @@
#include "desktop_screen_qt.h"
+namespace QtWebEngineCore {
+
gfx::Point DesktopScreenQt::GetCursorScreenPoint()
{
Q_UNREACHABLE();
@@ -98,3 +100,5 @@ void DesktopScreenQt::RemoveObserver(gfx::DisplayObserver* observer)
{
Q_UNREACHABLE();
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/desktop_screen_qt.h b/src/core/desktop_screen_qt.h
index 84397f99..c9768d94 100644
--- a/src/core/desktop_screen_qt.h
+++ b/src/core/desktop_screen_qt.h
@@ -41,6 +41,8 @@
#include <QtGlobal>
+namespace QtWebEngineCore {
+
class DesktopScreenQt : public gfx::Screen {
public:
// Overridden from gfx::Screen:
@@ -57,4 +59,6 @@ public:
virtual void RemoveObserver(gfx::DisplayObserver* observer) Q_DECL_OVERRIDE;
};
+} // namespace QtWebEngineCore
+
#endif // DESKTOP_SCREEN_QT_H
diff --git a/src/core/dev_tools_http_handler_delegate_qt.cpp b/src/core/dev_tools_http_handler_delegate_qt.cpp
index 8a70c3e1..964d6ad3 100644
--- a/src/core/dev_tools_http_handler_delegate_qt.cpp
+++ b/src/core/dev_tools_http_handler_delegate_qt.cpp
@@ -143,6 +143,8 @@ bool Target::Close() const {
} // namespace
+namespace QtWebEngineCore {
+
DevToolsHttpHandlerDelegateQt::DevToolsHttpHandlerDelegateQt()
: m_devtoolsHttpHandler(0)
, m_bindAddress(QLatin1String("127.0.0.1"))
@@ -238,3 +240,5 @@ void DevToolsManagerDelegateQt::EnumerateTargets(TargetCallback callback)
}
callback.Run(targets);
}
+
+} //namespace QtWebEngineCore
diff --git a/src/core/dev_tools_http_handler_delegate_qt.h b/src/core/dev_tools_http_handler_delegate_qt.h
index ec934ce3..902e9950 100644
--- a/src/core/dev_tools_http_handler_delegate_qt.h
+++ b/src/core/dev_tools_http_handler_delegate_qt.h
@@ -53,6 +53,8 @@ class DevToolsHttpHandler;
class RenderViewHost;
}
+namespace QtWebEngineCore {
+
class DevToolsHttpHandlerDelegateQt : public content::DevToolsHttpHandlerDelegate {
public:
@@ -84,4 +86,6 @@ public:
std::string GetPageThumbnailData(const GURL &url) Q_DECL_OVERRIDE;
};
+} // namespace QtWebEngineCore
+
#endif // DEV_TOOLS_HTTP_HANDLER_DELEGATE_QT_H
diff --git a/src/core/download_manager_delegate_qt.cpp b/src/core/download_manager_delegate_qt.cpp
index 40b17da7..e84ca5f2 100644
--- a/src/core/download_manager_delegate_qt.cpp
+++ b/src/core/download_manager_delegate_qt.cpp
@@ -53,6 +53,8 @@
#include "type_conversion.h"
#include "qtwebenginecoreglobal.h"
+namespace QtWebEngineCore {
+
ASSERT_ENUMS_MATCH(content::DownloadItem::IN_PROGRESS, BrowserContextAdapterClient::DownloadInProgress)
ASSERT_ENUMS_MATCH(content::DownloadItem::COMPLETE, BrowserContextAdapterClient::DownloadCompleted)
ASSERT_ENUMS_MATCH(content::DownloadItem::CANCELLED, BrowserContextAdapterClient::DownloadCancelled)
@@ -190,3 +192,5 @@ void DownloadManagerDelegateQt::OnDownloadDestroyed(content::DownloadItem *downl
download->RemoveObserver(this);
download->Cancel(/* user_cancel */ false);
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/download_manager_delegate_qt.h b/src/core/download_manager_delegate_qt.h
index a2511fce..fea96574 100644
--- a/src/core/download_manager_delegate_qt.h
+++ b/src/core/download_manager_delegate_qt.h
@@ -51,8 +51,11 @@ class DownloadItem;
class WebContents;
}
+namespace QtWebEngineCore {
class BrowserContextAdapter;
class DownloadManagerDelegateInstance;
+class DownloadTargetHelper;
+
class DownloadManagerDelegateQt
: public content::DownloadManagerDelegate
, public content::DownloadItem::Observer
@@ -86,4 +89,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(DownloadManagerDelegateQt);
};
+} // namespace QtWebEngineCore
+
#endif //DOWNLOAD_MANAGER_DELEGATE_QT_H
diff --git a/src/core/javascript_dialog_controller.cpp b/src/core/javascript_dialog_controller.cpp
index 43ed262b..c87a6140 100644
--- a/src/core/javascript_dialog_controller.cpp
+++ b/src/core/javascript_dialog_controller.cpp
@@ -40,6 +40,8 @@
#include"javascript_dialog_manager_qt.h"
#include "type_conversion.h"
+namespace QtWebEngineCore {
+
void JavaScriptDialogControllerPrivate::dialogFinished(bool accepted, const base::string16 &promptValue)
{
// Clear the queue first as this could result in the engine asking us to run another dialog,
@@ -111,3 +113,5 @@ JavaScriptDialogController::JavaScriptDialogController(JavaScriptDialogControlle
Q_ASSERT(dd);
d.reset(dd);
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/javascript_dialog_controller.h b/src/core/javascript_dialog_controller.h
index c7eab8f2..8e1f86cd 100644
--- a/src/core/javascript_dialog_controller.h
+++ b/src/core/javascript_dialog_controller.h
@@ -41,6 +41,8 @@
QT_FORWARD_DECLARE_CLASS(QString)
+namespace QtWebEngineCore {
+
class JavaScriptDialogControllerPrivate;
class QWEBENGINE_EXPORT JavaScriptDialogController : public QObject {
@@ -68,4 +70,6 @@ private:
friend class JavaScriptDialogManagerQt;
};
+} // namespace QtWebEngineCore
+
#endif // JAVASCRIPT_DIALOG_CONTROLLER_H
diff --git a/src/core/javascript_dialog_controller_p.h b/src/core/javascript_dialog_controller_p.h
index 670aeaa1..504c5783 100644
--- a/src/core/javascript_dialog_controller_p.h
+++ b/src/core/javascript_dialog_controller_p.h
@@ -45,6 +45,8 @@ namespace content {
class WebContents;
}
+namespace QtWebEngineCore {
+
class JavaScriptDialogControllerPrivate {
public:
@@ -63,4 +65,6 @@ public:
content::WebContents *contents;
};
+} // namespace QtWebEngineCore
+
#endif // JAVASCRIPT_DIALOG_CONTROLLER_P_H
diff --git a/src/core/javascript_dialog_manager_qt.cpp b/src/core/javascript_dialog_manager_qt.cpp
index 603dae90..fdcd7bdb 100644
--- a/src/core/javascript_dialog_manager_qt.cpp
+++ b/src/core/javascript_dialog_manager_qt.cpp
@@ -43,6 +43,8 @@
#include "base/memory/singleton.h"
+namespace QtWebEngineCore {
+
Q_STATIC_ASSERT_X(static_cast<int>(content::JAVASCRIPT_MESSAGE_TYPE_PROMPT) == static_cast<int>(WebContentsAdapterClient::PromptDialog), "These enums should be in sync.");
JavaScriptDialogManagerQt *JavaScriptDialogManagerQt::GetInstance()
@@ -101,3 +103,5 @@ QSharedPointer<JavaScriptDialogController> JavaScriptDialogManagerQt::takeDialog
Q_EMIT dialog->dialogCloseRequested();
return dialog;
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/javascript_dialog_manager_qt.h b/src/core/javascript_dialog_manager_qt.h
index e9b72d21..4682ce5b 100644
--- a/src/core/javascript_dialog_manager_qt.h
+++ b/src/core/javascript_dialog_manager_qt.h
@@ -45,11 +45,13 @@
#include <QMap>
#include <QSharedPointer>
-class JavaScriptDialogController;
namespace content {
class WebContents;
}
+namespace QtWebEngineCore {
+class JavaScriptDialogController;
+
class JavaScriptDialogManagerQt : public content::JavaScriptDialogManager
{
public:
@@ -76,5 +78,7 @@ private:
};
+} // namespace QtWebEngineCore
+
#endif // JAVASCRIPT_DIALOG_MANAGER_QT_H
diff --git a/src/core/location_provider_qt.cpp b/src/core/location_provider_qt.cpp
index a19ffa64..e3317941 100644
--- a/src/core/location_provider_qt.cpp
+++ b/src/core/location_provider_qt.cpp
@@ -50,6 +50,8 @@
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/geolocation_provider.h"
+namespace QtWebEngineCore {
+
using content::BrowserThread;
class QtPositioningHelper : public QObject {
@@ -189,8 +191,6 @@ inline void QtPositioningHelper::postToLocationProvider(const base::Closure &tas
LocationProviderQt::messageLoop()->PostTask(FROM_HERE, task);
}
-#include "location_provider_qt.moc"
-
LocationProviderQt::LocationProviderQt()
: m_positioningHelper(0)
{
@@ -246,3 +246,7 @@ base::MessageLoop *LocationProviderQt::messageLoop()
{
return static_cast<content::GeolocationProviderImpl*>(content::GeolocationProvider::GetInstance())->message_loop();
}
+
+} // namespace QtWebEngineCore
+
+#include "location_provider_qt.moc"
diff --git a/src/core/location_provider_qt.h b/src/core/location_provider_qt.h
index facf4b76..15b2e052 100644
--- a/src/core/location_provider_qt.h
+++ b/src/core/location_provider_qt.h
@@ -43,12 +43,14 @@
#include "content/public/common/geoposition.h"
QT_FORWARD_DECLARE_CLASS(QThread)
-class QtPositioningHelper;
namespace base {
class MessageLoop;
}
+namespace QtWebEngineCore {
+class QtPositioningHelper;
+
class LocationProviderQt : public content::LocationProviderBase
{
public:
@@ -73,4 +75,6 @@ private:
};
//#define QT_USE_POSITIONING 1
+} // namespace QtWebEngineCore
+
#endif // LOCATION_PROVIDER_QT_H
diff --git a/src/core/media_capture_devices_dispatcher.cpp b/src/core/media_capture_devices_dispatcher.cpp
index 55dd9a99..6866afc4 100644
--- a/src/core/media_capture_devices_dispatcher.cpp
+++ b/src/core/media_capture_devices_dispatcher.cpp
@@ -58,6 +58,8 @@
#include "media/audio/audio_manager_base.h"
#include "ui/base/l10n/l10n_util.h"
+namespace QtWebEngineCore {
+
using content::BrowserThread;
using content::MediaStreamDevices;
@@ -455,3 +457,5 @@ void MediaCaptureDevicesDispatcher::updateMediaRequestStateOnUIThread(int render
}
}
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/media_capture_devices_dispatcher.h b/src/core/media_capture_devices_dispatcher.h
index d91c646f..500fe764 100644
--- a/src/core/media_capture_devices_dispatcher.h
+++ b/src/core/media_capture_devices_dispatcher.h
@@ -57,6 +57,8 @@
class DesktopStreamsRegistry;
+namespace QtWebEngineCore {
+
// This singleton is used to receive updates about media events from the content
// layer. Based on Chrome's implementation.
class MediaCaptureDevicesDispatcher : public content::MediaObserver,
@@ -131,4 +133,6 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver,
DISALLOW_COPY_AND_ASSIGN(MediaCaptureDevicesDispatcher);
};
+} // namespace QtWebEngineCore
+
#endif // MEDIA_CAPTURE_DEVICES_DISPATCHER_H
diff --git a/src/core/network_delegate_qt.cpp b/src/core/network_delegate_qt.cpp
index 3ea8bd28..4e726fec 100644
--- a/src/core/network_delegate_qt.cpp
+++ b/src/core/network_delegate_qt.cpp
@@ -47,7 +47,7 @@
#include "web_contents_adapter_client.h"
#include "web_contents_view_qt.h"
-namespace {
+namespace QtWebEngineCore {
int pageTransitionToNavigationType(ui::PageTransition transition)
{
@@ -72,8 +72,6 @@ int pageTransitionToNavigationType(ui::PageTransition transition)
}
}
-}
-
int NetworkDelegateQt::OnBeforeURLRequest(net::URLRequest *request, const net::CompletionCallback &callback, GURL *)
{
Q_ASSERT(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO));
@@ -173,3 +171,5 @@ void NetworkDelegateQt::NotifyNavigationRequestedOnUIThread(net::URLRequest *req
callback)
);
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/network_delegate_qt.h b/src/core/network_delegate_qt.h
index bda90502..4f4097fd 100644
--- a/src/core/network_delegate_qt.h
+++ b/src/core/network_delegate_qt.h
@@ -44,6 +44,8 @@
#include <QSet>
#include <QtCore/qcompilerdetection.h> // Needed for Q_DECL_OVERRIDE
+namespace QtWebEngineCore {
+
class NetworkDelegateQt : public net::NetworkDelegate {
public:
NetworkDelegateQt() {}
@@ -73,4 +75,6 @@ public:
QSet<net::URLRequest *> m_activeRequests;
};
+} // namespace QtWebEngineCore
+
#endif // NETWORK_DELEGATE_QT_H
diff --git a/src/core/process_main.cpp b/src/core/process_main.cpp
index 457d7d83..1a67417f 100644
--- a/src/core/process_main.cpp
+++ b/src/core/process_main.cpp
@@ -47,7 +47,7 @@ namespace QtWebEngine {
int processMain(int argc, const char **argv)
{
- ContentMainDelegateQt delegate;
+ QtWebEngineCore::ContentMainDelegateQt delegate;
content::ContentMainParams params(&delegate);
#if defined(OS_WIN)
@@ -64,4 +64,4 @@ int processMain(int argc, const char **argv)
return content::ContentMain(params);
}
-}
+} // namespace
diff --git a/src/core/process_main.h b/src/core/process_main.h
index 0ab823bd..507d4a84 100644
--- a/src/core/process_main.h
+++ b/src/core/process_main.h
@@ -40,4 +40,4 @@ namespace QtWebEngine {
QWEBENGINE_EXPORT int processMain(int argc, const char **argv);
-}
+} // namespace
diff --git a/src/core/qrc_protocol_handler_qt.cpp b/src/core/qrc_protocol_handler_qt.cpp
index d9e191fd..d1c1ee4b 100644
--- a/src/core/qrc_protocol_handler_qt.cpp
+++ b/src/core/qrc_protocol_handler_qt.cpp
@@ -41,16 +41,18 @@
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_error_job.h"
-using namespace net;
+namespace QtWebEngineCore {
QrcProtocolHandlerQt::QrcProtocolHandlerQt()
{
}
-URLRequestJob *QrcProtocolHandlerQt::MaybeCreateJob(URLRequest *request, NetworkDelegate *networkDelegate) const
+net::URLRequestJob *QrcProtocolHandlerQt::MaybeCreateJob(net::URLRequest *request, net::NetworkDelegate *networkDelegate) const
{
if (!networkDelegate)
- return new URLRequestErrorJob(request, Q_NULLPTR, ERR_ACCESS_DENIED);
+ return new net::URLRequestErrorJob(request, Q_NULLPTR, net::ERR_ACCESS_DENIED);
return new URLRequestQrcJobQt(request, networkDelegate);
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/qrc_protocol_handler_qt.h b/src/core/qrc_protocol_handler_qt.h
index 3d33ee27..ff44bd97 100644
--- a/src/core/qrc_protocol_handler_qt.h
+++ b/src/core/qrc_protocol_handler_qt.h
@@ -48,6 +48,8 @@ class URLRequestJob;
} // namespace
+namespace QtWebEngineCore {
+
// Implements a ProtocolHandler for qrc file jobs. If |network_delegate_| is NULL,
// then all file requests will fail with ERR_ACCESS_DENIED.
class QrcProtocolHandlerQt : public net::URLRequestJobFactory::ProtocolHandler {
@@ -60,4 +62,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(QrcProtocolHandlerQt);
};
+} // namespace QtWebEngineCore
+
#endif // QRC_PROTOCOL_HANDLER_QT_H_
diff --git a/src/core/qt_render_view_observer_host.cpp b/src/core/qt_render_view_observer_host.cpp
index 741bd403..97d001ed 100644
--- a/src/core/qt_render_view_observer_host.cpp
+++ b/src/core/qt_render_view_observer_host.cpp
@@ -42,6 +42,8 @@
#include "type_conversion.h"
#include "web_contents_adapter_client.h"
+namespace QtWebEngineCore {
+
QtRenderViewObserverHost::QtRenderViewObserverHost(content::WebContents *webContents, WebContentsAdapterClient *adapterClient)
: content::WebContentsObserver(webContents)
, m_adapterClient(adapterClient)
@@ -90,3 +92,5 @@ void QtRenderViewObserverHost::onDidFirstVisuallyNonEmptyLayout()
if (rwhv)
rwhv->didFirstVisuallyNonEmptyLayout();
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/qt_render_view_observer_host.h b/src/core/qt_render_view_observer_host.h
index 203cfcf6..148fcb9d 100644
--- a/src/core/qt_render_view_observer_host.h
+++ b/src/core/qt_render_view_observer_host.h
@@ -45,6 +45,8 @@ namespace content {
class WebContents;
}
+namespace QtWebEngineCore {
+
class WebContentsAdapterClient;
class QtRenderViewObserverHost : public content::WebContentsObserver
@@ -63,4 +65,6 @@ private:
WebContentsAdapterClient *m_adapterClient;
};
+} // namespace QtWebEngineCore
+
#endif // QT_RENDER_VIEW_OBSERVER_HOST_H
diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp
index 8be7c5d4..78fcce2d 100644
--- a/src/core/render_widget_host_view_qt.cpp
+++ b/src/core/render_widget_host_view_qt.cpp
@@ -79,6 +79,8 @@
#include <QWindow>
#include <QtGui/qaccessible.h>
+namespace QtWebEngineCore {
+
static inline ui::LatencyInfo CreateLatencyInfo(const blink::WebInputEvent& event) {
ui::LatencyInfo latency_info;
// The latency number should only be added if the timestamp is valid.
@@ -1050,3 +1052,5 @@ void RenderWidgetHostViewQt::didFirstVisuallyNonEmptyLayout()
{
m_didFirstVisuallyNonEmptyLayout = true;
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/render_widget_host_view_qt.h b/src/core/render_widget_host_view_qt.h
index ba2dcb55..19b551b7 100644
--- a/src/core/render_widget_host_view_qt.h
+++ b/src/core/render_widget_host_view_qt.h
@@ -73,6 +73,8 @@ namespace content {
class RenderWidgetHostImpl;
}
+namespace QtWebEngineCore {
+
struct MultipleMouseClickHelper
{
QPoint lastPressPosition;
@@ -240,4 +242,6 @@ private:
gfx::Vector2dF m_lastScrollOffset;
};
+} // namespace QtWebEngineCore
+
#endif // RENDER_WIDGET_HOST_VIEW_QT_H
diff --git a/src/core/render_widget_host_view_qt_delegate.h b/src/core/render_widget_host_view_qt_delegate.h
index 1aae6bed..a12f3055 100644
--- a/src/core/render_widget_host_view_qt_delegate.h
+++ b/src/core/render_widget_host_view_qt_delegate.h
@@ -55,6 +55,8 @@ class QWindow;
class QInputMethodEvent;
QT_END_NAMESPACE
+namespace QtWebEngineCore {
+
class WebContentsAdapterClient;
class QWEBENGINE_EXPORT RenderWidgetHostViewQtDelegateClient {
@@ -94,4 +96,6 @@ public:
virtual void setTooltip(const QString &) = 0;
};
+} // namespace QtWebEngineCore
+
#endif // RENDER_WIDGET_HOST_VIEW_QT_DELEGATE_H
diff --git a/src/core/renderer/content_renderer_client_qt.cpp b/src/core/renderer/content_renderer_client_qt.cpp
index 242c8ef6..e1333144 100644
--- a/src/core/renderer/content_renderer_client_qt.cpp
+++ b/src/core/renderer/content_renderer_client_qt.cpp
@@ -56,6 +56,8 @@
#include "grit/renderer_resources.h"
+namespace QtWebEngineCore {
+
static const char kHttpErrorDomain[] = "http";
ContentRendererClientQt::ContentRendererClientQt()
@@ -139,3 +141,5 @@ bool ContentRendererClientQt::IsLinkVisited(unsigned long long linkHash)
{
return m_visitedLinkSlave->IsVisited(linkHash);
}
+
+} // namespace
diff --git a/src/core/renderer/content_renderer_client_qt.h b/src/core/renderer/content_renderer_client_qt.h
index 0a89e050..dcb4e7fc 100644
--- a/src/core/renderer/content_renderer_client_qt.h
+++ b/src/core/renderer/content_renderer_client_qt.h
@@ -45,6 +45,8 @@ namespace visitedlink {
class VisitedLinkSlave;
}
+namespace QtWebEngineCore {
+
class ContentRendererClientQt : public content::ContentRendererClient {
public:
ContentRendererClientQt();
@@ -64,4 +66,6 @@ private:
QScopedPointer<visitedlink::VisitedLinkSlave> m_visitedLinkSlave;
};
+} // namespace
+
#endif // CONTENT_RENDERER_CLIENT_QT_H
diff --git a/src/core/renderer/web_channel_ipc_transport.cpp b/src/core/renderer/web_channel_ipc_transport.cpp
index ebebb01e..3d844bf0 100644
--- a/src/core/renderer/web_channel_ipc_transport.cpp
+++ b/src/core/renderer/web_channel_ipc_transport.cpp
@@ -48,6 +48,8 @@
#include <QJsonDocument>
+namespace QtWebEngineCore {
+
static const char kWebChannelTransportExtensionName[] = "v8/WebChannelTransport";
static const char kWebChannelTransportApi[] =
@@ -173,3 +175,5 @@ bool WebChannelIPCTransport::OnMessageReceived(const IPC::Message &message)
IPC_END_MESSAGE_MAP()
return handled;
}
+
+} // namespace
diff --git a/src/core/renderer/web_channel_ipc_transport.h b/src/core/renderer/web_channel_ipc_transport.h
index 8074c230..69a02f7e 100644
--- a/src/core/renderer/web_channel_ipc_transport.h
+++ b/src/core/renderer/web_channel_ipc_transport.h
@@ -45,6 +45,8 @@ namespace v8 {
class Extension;
}
+namespace QtWebEngineCore {
+
class WebChannelIPCTransport : public content::RenderViewObserver {
public:
static v8::Extension* getV8Extension();
@@ -56,4 +58,6 @@ private:
virtual bool OnMessageReceived(const IPC::Message &message) Q_DECL_OVERRIDE;
};
+} // namespace
+
#endif // WEB_CHANNEL_IPC_TRANSPORT
diff --git a/src/core/resource_context_qt.cpp b/src/core/resource_context_qt.cpp
index 04ab4715..acd8ba4b 100644
--- a/src/core/resource_context_qt.cpp
+++ b/src/core/resource_context_qt.cpp
@@ -40,6 +40,8 @@
#include "browser_context_qt.h"
+namespace QtWebEngineCore {
+
net::HostResolver *ResourceContextQt::GetHostResolver()
{
CHECK(getter_);
@@ -57,3 +59,5 @@ void ResourceContextQt::set_url_request_context_getter(net::URLRequestContextGet
{
getter_ = getter;
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/resource_context_qt.h b/src/core/resource_context_qt.h
index c0bbbe4c..48dc3d58 100644
--- a/src/core/resource_context_qt.h
+++ b/src/core/resource_context_qt.h
@@ -45,9 +45,11 @@ namespace net {
class URLRequestContextGetter;
}
-class BrowserContextQt;
class GURL;
+namespace QtWebEngineCore {
+class BrowserContextQt;
+
class ResourceContextQt : public content::ResourceContext
{
public:
@@ -69,4 +71,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(ResourceContextQt);
};
+} // namespace QtWebEngineCore
+
#endif // RESOURCE_CONTEXT_QT_H
diff --git a/src/core/resource_dispatcher_host_delegate_qt.cpp b/src/core/resource_dispatcher_host_delegate_qt.cpp
index fe7df996..faed5895 100644
--- a/src/core/resource_dispatcher_host_delegate_qt.cpp
+++ b/src/core/resource_dispatcher_host_delegate_qt.cpp
@@ -49,6 +49,8 @@
#include "type_conversion.h"
#include "web_contents_view_qt.h"
+namespace QtWebEngineCore {
+
ResourceDispatcherHostLoginDelegateQt::ResourceDispatcherHostLoginDelegateQt(net::AuthChallengeInfo *authInfo, net::URLRequest *request)
: m_request(request)
{
@@ -116,3 +118,5 @@ content::ResourceDispatcherHostLoginDelegate *ResourceDispatcherHostDelegateQt::
// ResourceDispatcherHostLoginDelegateQt is ref-counted and will be released after we called ClearLoginDelegateForRequest.
return new ResourceDispatcherHostLoginDelegateQt(authInfo, request);
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/resource_dispatcher_host_delegate_qt.h b/src/core/resource_dispatcher_host_delegate_qt.h
index 7395ec35..2cba210d 100644
--- a/src/core/resource_dispatcher_host_delegate_qt.h
+++ b/src/core/resource_dispatcher_host_delegate_qt.h
@@ -42,6 +42,8 @@
#include "web_contents_adapter_client.h"
+namespace QtWebEngineCore {
+
class ResourceDispatcherHostLoginDelegateQt : public content::ResourceDispatcherHostLoginDelegate {
public:
ResourceDispatcherHostLoginDelegateQt(net::AuthChallengeInfo *authInfo, net::URLRequest *request);
@@ -72,4 +74,6 @@ public:
virtual content::ResourceDispatcherHostLoginDelegate* CreateLoginDelegate(net::AuthChallengeInfo *authInfo, net::URLRequest *request) Q_DECL_OVERRIDE;
};
+} // namespace QtWebEngineCore
+
#endif // RESOURCE_DISPATCHER_HOST_DELEGATE_QT_H
diff --git a/src/core/surface_factory_qt.cpp b/src/core/surface_factory_qt.cpp
index 14e46b94..86a6a92d 100644
--- a/src/core/surface_factory_qt.cpp
+++ b/src/core/surface_factory_qt.cpp
@@ -55,6 +55,8 @@
#define QT_LIBDIR_GLES2 QT_LIBDIR_EGL
#endif
+namespace QtWebEngine {
+
base::NativeLibrary LoadLibrary(const base::FilePath& filename) {
base::NativeLibraryLoadError error;
base::NativeLibrary library = base::LoadNativeLibrary(filename, &error);
@@ -110,5 +112,7 @@ intptr_t SurfaceFactoryQt::GetNativeDisplay()
return reinterpret_cast<intptr_t>(EGL_DEFAULT_DISPLAY);
}
+} // namespace QtWebEngineCore
+
#endif // defined(USE_OZONE) || defined(OS_ANDROID)
diff --git a/src/core/surface_factory_qt.h b/src/core/surface_factory_qt.h
index bd4eba3c..ea906e64 100644
--- a/src/core/surface_factory_qt.h
+++ b/src/core/surface_factory_qt.h
@@ -43,6 +43,8 @@
#include <QtGlobal>
+namespace QtWebEngine {
+
class SurfaceFactoryQt
: public ui::SurfaceFactoryOzone
{
@@ -50,6 +52,8 @@ class SurfaceFactoryQt
virtual intptr_t GetNativeDisplay() Q_DECL_OVERRIDE;
};
+} // namespace QtWebEngineCore
+
#endif // defined(USE_OZONE) || defined(OS_ANDROID)
#endif // SURFACE_FACTORY_QT
diff --git a/src/core/type_conversion.h b/src/core/type_conversion.h
index 0e34c68e..66fcd4dd 100644
--- a/src/core/type_conversion.h
+++ b/src/core/type_conversion.h
@@ -52,6 +52,8 @@
#include "ui/gfx/rect.h"
#include "url/gurl.h"
+namespace QtWebEngineCore {
+
inline QString toQt(const base::string16 &string)
{
#if defined(OS_WIN)
@@ -191,4 +193,6 @@ inline std::vector<T> toVector(const QStringList &fileList)
return selectedFiles;
}
+} // namespace QtWebEngineCore
+
#endif // TYPE_CONVERSION_H
diff --git a/src/core/url_request_context_getter_qt.cpp b/src/core/url_request_context_getter_qt.cpp
index 2536e9dd..dec6b4db 100644
--- a/src/core/url_request_context_getter_qt.cpp
+++ b/src/core/url_request_context_getter_qt.cpp
@@ -69,6 +69,8 @@
#include "qrc_protocol_handler_qt.h"
#include "type_conversion.h"
+namespace QtWebEngineCore {
+
static const char kQrcSchemeQt[] = "qrc";
using content::BrowserThread;
@@ -295,3 +297,5 @@ scoped_refptr<base::SingleThreadTaskRunner> URLRequestContextGetterQt::GetNetwor
{
return content::BrowserThread::GetMessageLoopProxyForThread(content::BrowserThread::IO);
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/url_request_context_getter_qt.h b/src/core/url_request_context_getter_qt.h
index 8e8d9159..d0883671 100644
--- a/src/core/url_request_context_getter_qt.h
+++ b/src/core/url_request_context_getter_qt.h
@@ -57,6 +57,8 @@ class NetworkDelegate;
class ProxyConfigService;
}
+namespace QtWebEngineCore {
+
class BrowserContextAdapter;
class URLRequestContextGetterQt : public net::URLRequestContextGetter {
@@ -95,4 +97,6 @@ private:
scoped_ptr<net::URLRequestJobFactoryImpl> m_jobFactory;
};
+} // namespace QtWebEngineCore
+
#endif // URL_REQUEST_CONTEXT_GETTER_QT_H
diff --git a/src/core/url_request_custom_job.cpp b/src/core/url_request_custom_job.cpp
index f206955f..105f9074 100644
--- a/src/core/url_request_custom_job.cpp
+++ b/src/core/url_request_custom_job.cpp
@@ -51,6 +51,8 @@
using namespace net;
+namespace QtWebEngineCore {
+
URLRequestCustomJob::URLRequestCustomJob(URLRequest *request, NetworkDelegate *networkDelegate, CustomUrlSchemeHandler *schemeHandler)
: URLRequestJob(request, networkDelegate)
, m_device(0)
@@ -141,3 +143,5 @@ void URLRequestCustomJob::startAsync()
m_delegate.reset(new URLRequestCustomJobDelegate(this));
m_schemeHandler->handleJob(m_delegate.get());
}
+
+} // namespace
diff --git a/src/core/url_request_custom_job.h b/src/core/url_request_custom_job.h
index c47358e7..448bfe6a 100644
--- a/src/core/url_request_custom_job.h
+++ b/src/core/url_request_custom_job.h
@@ -44,6 +44,8 @@
QT_FORWARD_DECLARE_CLASS(QIODevice)
+namespace QtWebEngineCore {
+
class CustomUrlSchemeHandler;
class URLRequestCustomJobDelegate;
@@ -77,4 +79,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(URLRequestCustomJob);
};
+} // namespace QtWebEngineCore
+
#endif // URL_REQUEST_CUSTOM_JOB_H_
diff --git a/src/core/url_request_custom_job_delegate.cpp b/src/core/url_request_custom_job_delegate.cpp
index fcb2220b..d324da34 100644
--- a/src/core/url_request_custom_job_delegate.cpp
+++ b/src/core/url_request_custom_job_delegate.cpp
@@ -41,6 +41,8 @@
#include <QByteArray>
+namespace QtWebEngineCore {
+
URLRequestCustomJobDelegate::URLRequestCustomJobDelegate(URLRequestCustomJob *job)
: m_job(job)
{
@@ -61,3 +63,4 @@ void URLRequestCustomJobDelegate::setReply(const QByteArray &contentType, QIODev
m_job->setReplyDevice(device);
}
+} // namespace
diff --git a/src/core/url_request_custom_job_delegate.h b/src/core/url_request_custom_job_delegate.h
index e82debdf..e0b80289 100644
--- a/src/core/url_request_custom_job_delegate.h
+++ b/src/core/url_request_custom_job_delegate.h
@@ -44,6 +44,8 @@
QT_FORWARD_DECLARE_CLASS(QIODevice)
+namespace QtWebEngineCore {
+
class URLRequestCustomJob;
class QWEBENGINE_EXPORT URLRequestCustomJobDelegate : public QObject {
@@ -62,4 +64,6 @@ private:
URLRequestCustomJob *m_job;
};
+} // namespace
+
#endif // URL_REQUEST_CUSTOM_JOB_DELEGATE_H_
diff --git a/src/core/url_request_qrc_job_qt.cpp b/src/core/url_request_qrc_job_qt.cpp
index bd687589..617b894e 100644
--- a/src/core/url_request_qrc_job_qt.cpp
+++ b/src/core/url_request_qrc_job_qt.cpp
@@ -47,6 +47,7 @@
#include <QMimeType>
using namespace net;
+namespace QtWebEngineCore {
URLRequestQrcJobQt::URLRequestQrcJobQt(URLRequest *request, NetworkDelegate *networkDelegate)
: URLRequestJob(request, networkDelegate)
@@ -127,3 +128,5 @@ void URLRequestQrcJobQt::startGetHead()
NotifyStartError(URLRequestStatus(URLRequestStatus::FAILED, ERR_INVALID_URL));
}
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/url_request_qrc_job_qt.h b/src/core/url_request_qrc_job_qt.h
index 973b7731..cd836257 100644
--- a/src/core/url_request_qrc_job_qt.h
+++ b/src/core/url_request_qrc_job_qt.h
@@ -43,6 +43,8 @@
#include <QtCore/qcompilerdetection.h> // Needed for Q_DECL_OVERRIDE
#include <QFile>
+namespace QtWebEngineCore {
+
// A request job that handles reading qrc file URLs
class URLRequestQrcJobQt : public net::URLRequestJob {
@@ -67,4 +69,6 @@ private:
DISALLOW_COPY_AND_ASSIGN(URLRequestQrcJobQt);
};
+} // namespace QtWebEngineCore
+
#endif // URL_REQUEST_QRC_JOB_QT_H_
diff --git a/src/core/user_script.cpp b/src/core/user_script.cpp
index 7e88f922..a94b8f16 100644
--- a/src/core/user_script.cpp
+++ b/src/core/user_script.cpp
@@ -39,6 +39,8 @@
#include "user_script_controller_host.h"
#include "type_conversion.h"
+namespace QtWebEngineCore {
+
ASSERT_ENUMS_MATCH(UserScript::AfterLoad, UserScriptData::AfterLoad)
ASSERT_ENUMS_MATCH(UserScript::DocumentLoadFinished, UserScriptData::DocumentLoadFinished)
ASSERT_ENUMS_MATCH(UserScript::DocumentElementCreation, UserScriptData::DocumentElementCreation)
@@ -175,7 +177,10 @@ UserScriptData &UserScript::data() const
return *(scriptData.data());
}
-uint qHash(const UserScript &script, uint seed)
+} // namespace QtWebEngineCore
+
+QT_BEGIN_NAMESPACE
+uint qHash(const QtWebEngineCore::UserScript &script, uint seed)
{
if (script.isNull())
return 0;
@@ -183,3 +188,4 @@ uint qHash(const UserScript &script, uint seed)
^ (script.injectionPoint() | (script.runsOnSubFrames() << 4))
^ script.worldId();
}
+QT_END_NAMESPACE
diff --git a/src/core/user_script.h b/src/core/user_script.h
index 17de212e..a20ac189 100644
--- a/src/core/user_script.h
+++ b/src/core/user_script.h
@@ -44,9 +44,12 @@
#include <QtCore/QSharedData>
#include <QtCore/QString>
-class UserScriptControllerHost;
struct UserScriptData;
+namespace QtWebEngineCore {
+
+class UserScriptControllerHost;
+
class QWEBENGINE_EXPORT UserScript : public QSharedData {
public:
enum InjectionPoint {
@@ -88,6 +91,10 @@ private:
QString m_name;
};
-uint qHash(const UserScript &, uint seed = 0);
+} // namespace QtWebEngineCore
+
+QT_BEGIN_NAMESPACE
+uint qHash(const QtWebEngineCore::UserScript &, uint seed = 0);
+QT_END_NAMESPACE
#endif // USER_SCRIPT_H
diff --git a/src/core/user_script_controller_host.cpp b/src/core/user_script_controller_host.cpp
index bf124857..69284dbe 100644
--- a/src/core/user_script_controller_host.cpp
+++ b/src/core/user_script_controller_host.cpp
@@ -47,6 +47,8 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
+namespace QtWebEngineCore {
+
class UserScriptControllerHost::WebContentsObserverHelper : public content::WebContentsObserver {
public:
WebContentsObserverHelper(UserScriptControllerHost *, content::WebContents *);
@@ -206,3 +208,5 @@ UserScriptControllerHost::UserScriptControllerHost()
UserScriptControllerHost::~UserScriptControllerHost()
{
}
+
+} // namespace
diff --git a/src/core/user_script_controller_host.h b/src/core/user_script_controller_host.h
index 790d4091..293b5d2d 100644
--- a/src/core/user_script_controller_host.h
+++ b/src/core/user_script_controller_host.h
@@ -43,12 +43,15 @@
#include <QtCore/QScopedPointer>
#include "user_script.h"
-class WebContentsAdapterPrivate;
namespace content {
class RenderProcessHost;
class WebContents;
}
+
+namespace QtWebEngineCore {
+
class WebContentsAdapter;
+class WebContentsAdapterPrivate;
class QWEBENGINE_EXPORT UserScriptControllerHost {
@@ -79,4 +82,6 @@ private:
QScopedPointer<RenderProcessObserverHelper> m_renderProcessObserver;
};
+} // namespace
+
#endif // USER_SCRIPT_CONTROLLER_HOST_H
diff --git a/src/core/web_channel_ipc_transport_host.cpp b/src/core/web_channel_ipc_transport_host.cpp
index ce673494..ecc49ab5 100644
--- a/src/core/web_channel_ipc_transport_host.cpp
+++ b/src/core/web_channel_ipc_transport_host.cpp
@@ -44,6 +44,8 @@
#include <QJsonDocument>
#include <QJsonObject>
+namespace QtWebEngineCore {
+
WebChannelIPCTransportHost::WebChannelIPCTransportHost(content::WebContents *contents, QObject *parent)
: QWebChannelAbstractTransport(parent)
, content::WebContentsObserver(contents)
@@ -78,3 +80,5 @@ bool WebChannelIPCTransportHost::OnMessageReceived(const IPC::Message &message)
IPC_END_MESSAGE_MAP()
return handled;
}
+
+} // namespace
diff --git a/src/core/web_channel_ipc_transport_host.h b/src/core/web_channel_ipc_transport_host.h
index a30cab08..9c21116f 100644
--- a/src/core/web_channel_ipc_transport_host.h
+++ b/src/core/web_channel_ipc_transport_host.h
@@ -44,9 +44,10 @@
#include "qtwebenginecoreglobal.h"
#include <QtCore/QObject>
-
QT_FORWARD_DECLARE_CLASS(QString)
+namespace QtWebEngineCore {
+
class WebChannelIPCTransportHost : public QWebChannelAbstractTransport
, public content::WebContentsObserver
{
@@ -62,4 +63,6 @@ private:
void onWebChannelMessage(const std::vector<char> &message);
};
+} // namespace
+
#endif // WEB_CHANNEL_IPC_TRANSPORT_H
diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp
index 848e8086..c5cd83c6 100644
--- a/src/core/web_contents_adapter.cpp
+++ b/src/core/web_contents_adapter.cpp
@@ -80,6 +80,8 @@
#include <QtGui/qaccessible.h>
#include <QtWebChannel/QWebChannel>
+namespace QtWebEngineCore {
+
static const int kTestWindowWidth = 800;
static const int kTestWindowHeight = 600;
static const int kHistoryStreamVersion = 3;
@@ -653,7 +655,7 @@ void WebContentsAdapter::clearNavigationHistory()
void WebContentsAdapter::serializeNavigationHistory(QDataStream &output)
{
Q_D(WebContentsAdapter);
- ::serializeNavigationHistory(d->webContents->GetController(), output);
+ QtWebEngineCore::serializeNavigationHistory(d->webContents->GetController(), output);
}
void WebContentsAdapter::setZoomFactor(qreal factor)
@@ -860,3 +862,5 @@ void WebContentsAdapter::setWebChannel(QWebChannel *channel)
}
channel->connectTo(d->webChannelTransport.get());
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h
index b4b4e80a..f4b43435 100644
--- a/src/core/web_contents_adapter.h
+++ b/src/core/web_contents_adapter.h
@@ -49,15 +49,18 @@ namespace content {
class WebContents;
struct WebPreferences;
}
-class BrowserContextQt;
-class MessagePassingInterface;
-class WebContentsAdapterPrivate;
QT_BEGIN_NAMESPACE
class QAccessibleInterface;
class QWebChannel;
QT_END_NAMESPACE
+namespace QtWebEngineCore {
+
+class BrowserContextQt;
+class MessagePassingInterface;
+class WebContentsAdapterPrivate;
+
class QWEBENGINE_EXPORT WebContentsAdapter : public QSharedData {
public:
static QExplicitlySharedDataPointer<WebContentsAdapter> createFromSerializedNavigationHistory(QDataStream &input, WebContentsAdapterClient *adapterClient);
@@ -126,9 +129,12 @@ public:
content::WebContents *webContents() const;
private:
- Q_DISABLE_COPY(WebContentsAdapter);
- Q_DECLARE_PRIVATE(WebContentsAdapter);
+ Q_DISABLE_COPY(WebContentsAdapter)
+ Q_DECLARE_PRIVATE(WebContentsAdapter)
QScopedPointer<WebContentsAdapterPrivate> d_ptr;
};
+
+} // namespace QtWebEngineCore
+
#endif // WEB_CONTENTS_ADAPTER_H
diff --git a/src/core/web_contents_adapter_client.h b/src/core/web_contents_adapter_client.h
index 5a199a47..2efacb46 100644
--- a/src/core/web_contents_adapter_client.h
+++ b/src/core/web_contents_adapter_client.h
@@ -50,6 +50,8 @@ QT_FORWARD_DECLARE_CLASS(QKeyEvent)
QT_FORWARD_DECLARE_CLASS(QVariant)
QT_FORWARD_DECLARE_CLASS(CertificateErrorController)
+namespace QtWebEngineCore {
+
class BrowserContextAdapter;
class JavaScriptDialogController;
class RenderWidgetHostViewQt;
@@ -187,4 +189,6 @@ public:
};
+} // namespace QtWebEngineCore
+
#endif // WEB_CONTENTS_ADAPTER_CLIENT_H
diff --git a/src/core/web_contents_adapter_p.h b/src/core/web_contents_adapter_p.h
index 6ddff47a..52bade3a 100644
--- a/src/core/web_contents_adapter_p.h
+++ b/src/core/web_contents_adapter_p.h
@@ -44,14 +44,18 @@
#include <QExplicitlySharedDataPointer>
+QT_FORWARD_DECLARE_CLASS(QWebChannel)
+
+class WebEngineContext;
+
+namespace QtWebEngineCore {
+
class BrowserContextAdapter;
class QtRenderViewObserverHost;
class UserScriptControllerHost;
class WebChannelIPCTransportHost;
class WebContentsAdapterClient;
class WebContentsDelegateQt;
-class WebEngineContext;
-QT_FORWARD_DECLARE_CLASS(QWebChannel)
class WebContentsAdapterPrivate {
public:
@@ -69,4 +73,6 @@ public:
int lastFindRequestId;
};
+} // namespace QtWebEngineCore
+
#endif // WEB_CONTENTS_ADAPTER_P_H
diff --git a/src/core/web_contents_delegate_qt.cpp b/src/core/web_contents_delegate_qt.cpp
index de448757..dd56bf2a 100644
--- a/src/core/web_contents_delegate_qt.cpp
+++ b/src/core/web_contents_delegate_qt.cpp
@@ -61,6 +61,8 @@
#include "content/public/common/url_constants.h"
#include "content/public/common/web_preferences.h"
+namespace QtWebEngineCore {
+
// Maps the LogSeverity defines in base/logging.h to the web engines message levels.
static WebContentsAdapterClient::JavaScriptConsoleMessageLevel mapToJavascriptConsoleMessageLevel(int32 messageLevel) {
if (messageLevel < 1)
@@ -341,3 +343,5 @@ void WebContentsDelegateQt::geolocationPermissionReply(const QUrl &origin, bool
m_geolocationPermissionRequests.remove(origin);
}
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/web_contents_delegate_qt.h b/src/core/web_contents_delegate_qt.h
index 868d3e51..a200ca4d 100644
--- a/src/core/web_contents_delegate_qt.h
+++ b/src/core/web_contents_delegate_qt.h
@@ -56,6 +56,8 @@ namespace content {
struct WebPreferences;
}
+namespace QtWebEngineCore {
+
class WebContentsAdapterClient;
class WebContentsDelegateQt : public content::WebContentsDelegate
@@ -111,4 +113,6 @@ private:
QList<int64> m_loadingErrorFrameList;
};
+} // namespace QtWebEngineCore
+
#endif // WEB_CONTENTS_DELEGATE_QT_H
diff --git a/src/core/web_contents_view_qt.cpp b/src/core/web_contents_view_qt.cpp
index 41417d20..93217063 100644
--- a/src/core/web_contents_view_qt.cpp
+++ b/src/core/web_contents_view_qt.cpp
@@ -45,6 +45,8 @@
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/public/common/context_menu_params.h"
+namespace QtWebEngineCore {
+
void WebContentsViewQt::initialize(WebContentsAdapterClient* client)
{
m_client = client;
@@ -139,3 +141,5 @@ void WebContentsViewQt::TakeFocus(bool reverse)
{
m_client->passOnFocus(reverse);
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/web_contents_view_qt.h b/src/core/web_contents_view_qt.h
index 3a0376a5..896955f7 100644
--- a/src/core/web_contents_view_qt.h
+++ b/src/core/web_contents_view_qt.h
@@ -48,6 +48,8 @@
#include "web_contents_delegate_qt.h"
#include "web_engine_context.h"
+namespace QtWebEngineCore {
+
class WebContentsViewQt
: public content::WebContentsView
, public content::RenderViewHostDelegateView
@@ -123,4 +125,6 @@ private:
bool m_allowOtherViews;
};
+} // namespace QtWebEngineCore
+
#endif // WEB_CONTENTS_VIEW_QT_H
diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp
index 2e6abd69..5d8fe79e 100644
--- a/src/core/web_engine_context.cpp
+++ b/src/core/web_engine_context.cpp
@@ -83,6 +83,8 @@
#include <QVector>
#include <qpa/qplatformnativeinterface.h>
+using namespace QtWebEngineCore;
+
namespace {
scoped_refptr<WebEngineContext> sContext;
diff --git a/src/core/web_engine_context.h b/src/core/web_engine_context.h
index fc9478a9..dbd8f247 100644
--- a/src/core/web_engine_context.h
+++ b/src/core/web_engine_context.h
@@ -51,17 +51,19 @@ class BrowserMainRunner;
class ContentMainRunner;
}
+namespace QtWebEngineCore {
class BrowserContextAdapter;
class ContentMainDelegateQt;
class DevToolsHttpHandlerDelegateQt;
class SurfaceFactoryQt;
+}
class WebEngineContext : public base::RefCounted<WebEngineContext> {
public:
static scoped_refptr<WebEngineContext> current();
- BrowserContextAdapter *defaultBrowserContext();
- BrowserContextAdapter *offTheRecordBrowserContext();
+ QtWebEngineCore::BrowserContextAdapter *defaultBrowserContext();
+ QtWebEngineCore::BrowserContextAdapter *offTheRecordBrowserContext();
private:
friend class base::RefCounted<WebEngineContext>;
@@ -69,15 +71,15 @@ private:
~WebEngineContext();
scoped_ptr<base::RunLoop> m_runLoop;
- scoped_ptr<ContentMainDelegateQt> m_mainDelegate;
+ scoped_ptr<QtWebEngineCore::ContentMainDelegateQt> m_mainDelegate;
scoped_ptr<content::ContentMainRunner> m_contentRunner;
scoped_ptr<content::BrowserMainRunner> m_browserRunner;
#if defined(OS_ANDROID)
- scoped_ptr<SurfaceFactoryQt> m_surfaceFactory;
+ scoped_ptr<QtWebEngine::SurfaceFactoryQt> m_surfaceFactory;
#endif
- QExplicitlySharedDataPointer<BrowserContextAdapter> m_defaultBrowserContext;
- QExplicitlySharedDataPointer<BrowserContextAdapter> m_offTheRecordBrowserContext;
- scoped_ptr<DevToolsHttpHandlerDelegateQt> m_devtools;
+ QExplicitlySharedDataPointer<QtWebEngineCore::BrowserContextAdapter> m_defaultBrowserContext;
+ QExplicitlySharedDataPointer<QtWebEngineCore::BrowserContextAdapter> m_offTheRecordBrowserContext;
+ scoped_ptr<QtWebEngineCore::DevToolsHttpHandlerDelegateQt> m_devtools;
};
#endif // WEB_ENGINE_CONTEXT_H
diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp
index 07c97ef7..ce862aae 100644
--- a/src/core/web_engine_library_info.cpp
+++ b/src/core/web_engine_library_info.cpp
@@ -56,6 +56,7 @@
#error "No name defined for QtWebEngine's process"
#endif
+using namespace QtWebEngineCore;
namespace {
diff --git a/src/core/web_engine_settings.cpp b/src/core/web_engine_settings.cpp
index 3c297575..74c60b77 100644
--- a/src/core/web_engine_settings.cpp
+++ b/src/core/web_engine_settings.cpp
@@ -44,6 +44,8 @@
#include <QTimer>
#include <QTouchDevice>
+namespace QtWebEngineCore {
+
static const int batchTimerTimeout = 0;
class BatchTimer : public QTimer {
@@ -67,7 +69,6 @@ private:
WebEngineSettings *m_settings;
};
-
static inline bool isTouchScreenAvailable() {
static bool initialized = false;
static bool touchScreenAvailable = false;
@@ -310,4 +311,6 @@ void WebEngineSettings::setParentSettings(WebEngineSettings *_parentSettings)
parentSettings->childSettings.insert(this);
}
+} // namespace QtWebEngineCore
+
#include "web_engine_settings.moc"
diff --git a/src/core/web_engine_settings.h b/src/core/web_engine_settings.h
index bffb5b2f..e9d8010a 100644
--- a/src/core/web_engine_settings.h
+++ b/src/core/web_engine_settings.h
@@ -45,13 +45,13 @@
#include <QUrl>
#include <QSet>
-class BatchTimer;
-class WebContentsAdapter;
-class WebEngineSettings;
-
namespace content {
struct WebPreferences;
}
+namespace QtWebEngineCore {
+
+class BatchTimer;
+class WebContentsAdapter;
class QWEBENGINE_EXPORT WebEngineSettings {
public:
@@ -138,4 +138,6 @@ private:
friend class WebContentsAdapter;
};
+} // namespace QtWebEngineCore
+
#endif // WEB_ENGINE_SETTINGS_H
diff --git a/src/core/web_engine_visited_links_manager.cpp b/src/core/web_engine_visited_links_manager.cpp
index 85c8b1e1..deee2652 100644
--- a/src/core/web_engine_visited_links_manager.cpp
+++ b/src/core/web_engine_visited_links_manager.cpp
@@ -45,6 +45,8 @@
#include "components/visitedlink/browser/visitedlink_delegate.h"
#include "components/visitedlink/browser/visitedlink_master.h"
+namespace QtWebEngineCore {
+
namespace {
class BasicUrlIterator : public visitedlink::VisitedLinkMaster::URLIterator {
public:
@@ -104,3 +106,5 @@ void WebEngineVisitedLinksManager::addUrl(const GURL &urlToAdd)
Q_ASSERT(m_visitedLinkMaster);
m_visitedLinkMaster->AddURL(urlToAdd);
}
+
+} // namespace QtWebEngineCore
diff --git a/src/core/web_engine_visited_links_manager.h b/src/core/web_engine_visited_links_manager.h
index f6423777..afbc414a 100644
--- a/src/core/web_engine_visited_links_manager.h
+++ b/src/core/web_engine_visited_links_manager.h
@@ -49,11 +49,13 @@ namespace visitedlink {
class VisitedLinkMaster;
}
+class GURL;
+
+namespace QtWebEngineCore {
+
class BrowserContextAdapter;
class VisitedLinkDelegateQt;
-class GURL;
-
class QWEBENGINE_EXPORT WebEngineVisitedLinksManager {
public:
@@ -73,4 +75,6 @@ private:
QScopedPointer<VisitedLinkDelegateQt> m_delegate;
};
+} // namespace QtWebEngineCore
+
#endif // WEB_ENGINE_VISITED_LINKS_MANAGER_H
diff --git a/src/webengine/api/qquickwebenginedownloaditem.cpp b/src/webengine/api/qquickwebenginedownloaditem.cpp
index c1eaaadb..c38f5ea1 100644
--- a/src/webengine/api/qquickwebenginedownloaditem.cpp
+++ b/src/webengine/api/qquickwebenginedownloaditem.cpp
@@ -36,6 +36,9 @@
#include "qquickwebenginedownloaditem_p.h"
#include "qquickwebenginedownloaditem_p_p.h"
+#include "qquickwebengineprofile_p_p.h"
+
+using QtWebEngineCore::BrowserContextAdapterClient;
QT_BEGIN_NAMESPACE
diff --git a/src/webengine/api/qquickwebenginedownloaditem_p_p.h b/src/webengine/api/qquickwebenginedownloaditem_p_p.h
index 9d054f5e..fe45ca2a 100644
--- a/src/webengine/api/qquickwebenginedownloaditem_p_p.h
+++ b/src/webengine/api/qquickwebenginedownloaditem_p_p.h
@@ -37,12 +37,13 @@
#ifndef QQUICKWEBENGINEDOWNLOADITEM_P_P_H
#define QQUICKWEBENGINEDOWNLOADITEM_P_P_H
+#include "browser_context_adapter_client.h"
#include "qquickwebenginedownloaditem_p.h"
-#include "qquickwebengineprofile_p_p.h"
#include <private/qtwebengineglobal_p.h>
#include <QString>
QT_BEGIN_NAMESPACE
+class QQuickWebEngineProfilePrivate;
class QQuickWebEngineDownloadItemPrivate {
QQuickWebEngineDownloadItem *q_ptr;
@@ -59,7 +60,7 @@ public:
qint64 receivedBytes;
QString downloadPath;
- void update(const BrowserContextAdapterClient::DownloadItemInfo &info);
+ void update(const QtWebEngineCore::BrowserContextAdapterClient::DownloadItemInfo &info);
void updateState(QQuickWebEngineDownloadItem::DownloadState newState);
};
diff --git a/src/webengine/api/qquickwebenginehistory.cpp b/src/webengine/api/qquickwebenginehistory.cpp
index 3b6d7bb2..9a737fbb 100644
--- a/src/webengine/api/qquickwebenginehistory.cpp
+++ b/src/webengine/api/qquickwebenginehistory.cpp
@@ -68,7 +68,7 @@ int QQuickWebEngineHistoryListModelPrivate::offsetForIndex(int index) const
return index - adapter()->currentNavigationEntryIndex();
}
-WebContentsAdapter *QQuickWebEngineHistoryListModelPrivate::adapter() const
+QtWebEngineCore::WebContentsAdapter *QQuickWebEngineHistoryListModelPrivate::adapter() const
{
return view->adapter.data();
}
diff --git a/src/webengine/api/qquickwebenginehistory_p.h b/src/webengine/api/qquickwebenginehistory_p.h
index 02f29b35..cb6aff2b 100644
--- a/src/webengine/api/qquickwebenginehistory_p.h
+++ b/src/webengine/api/qquickwebenginehistory_p.h
@@ -46,8 +46,6 @@
QT_BEGIN_NAMESPACE
-class WebEngineHistory;
-class WebEngineHistoryItem;
class QQuickWebEngineHistory;
class QQuickWebEngineHistoryPrivate;
class QQuickWebEngineHistoryListModelPrivate;
diff --git a/src/webengine/api/qquickwebenginehistory_p_p.h b/src/webengine/api/qquickwebenginehistory_p_p.h
index 2ad2af26..0d714b1b 100644
--- a/src/webengine/api/qquickwebenginehistory_p_p.h
+++ b/src/webengine/api/qquickwebenginehistory_p_p.h
@@ -37,11 +37,13 @@
#ifndef QQUICKWEBENGINEHISTORY_P_P_H
#define QQUICKWEBENGINEHISTORY_P_P_H
+namespace QtWebEngineCore {
class WebContentsAdapter;
-class QQuickWebEngineHistoryListModel;
-class QQuickWebEngineViewPrivate;
+}
QT_BEGIN_NAMESPACE
+class QQuickWebEngineHistoryListModel;
+class QQuickWebEngineViewPrivate;
class QQuickWebEngineHistoryListModelPrivate {
public:
@@ -52,7 +54,7 @@ public:
virtual int index(int) const;
virtual int offsetForIndex(int) const;
- WebContentsAdapter *adapter() const;
+ QtWebEngineCore::WebContentsAdapter *adapter() const;
QQuickWebEngineViewPrivate *view;
};
diff --git a/src/webengine/api/qquickwebenginenewviewrequest_p.h b/src/webengine/api/qquickwebenginenewviewrequest_p.h
index a24ce3b7..062a2fa3 100644
--- a/src/webengine/api/qquickwebenginenewviewrequest_p.h
+++ b/src/webengine/api/qquickwebenginenewviewrequest_p.h
@@ -40,7 +40,9 @@
#include "qtwebengineglobal_p.h"
#include "qquickwebengineview_p.h"
+namespace QtWebEngineCore {
class WebContentsAdapter;
+}
QT_BEGIN_NAMESPACE
@@ -59,7 +61,7 @@ private:
QQuickWebEngineNewViewRequest();
QQuickWebEngineView::NewViewDestination m_destination;
bool m_isUserInitiated;
- QExplicitlySharedDataPointer<WebContentsAdapter> m_adapter;
+ QExplicitlySharedDataPointer<QtWebEngineCore::WebContentsAdapter> m_adapter;
friend class QQuickWebEngineViewPrivate;
};
diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp
index 36992ca9..718007c3 100644
--- a/src/webengine/api/qquickwebengineprofile.cpp
+++ b/src/webengine/api/qquickwebengineprofile.cpp
@@ -46,6 +46,8 @@
#include "browser_context_adapter.h"
#include "web_engine_settings.h"
+using QtWebEngineCore::BrowserContextAdapter;
+
QT_BEGIN_NAMESPACE
QQuickWebEngineProfilePrivate::QQuickWebEngineProfilePrivate(BrowserContextAdapter* browserContext, bool ownsContext)
diff --git a/src/webengine/api/qquickwebengineprofile_p.h b/src/webengine/api/qquickwebengineprofile_p.h
index a18d81be..ee91d772 100644
--- a/src/webengine/api/qquickwebengineprofile_p.h
+++ b/src/webengine/api/qquickwebengineprofile_p.h
@@ -43,6 +43,10 @@
#include <QScopedPointer>
#include <QString>
+namespace QtWebEngineCore {
+class BrowserContextAdapter;
+}
+
QT_BEGIN_NAMESPACE
class QQuickWebEngineDownloadItem;
diff --git a/src/webengine/api/qquickwebengineprofile_p_p.h b/src/webengine/api/qquickwebengineprofile_p_p.h
index 4810cec7..0cf11ace 100644
--- a/src/webengine/api/qquickwebengineprofile_p_p.h
+++ b/src/webengine/api/qquickwebengineprofile_p_p.h
@@ -37,8 +37,6 @@
#ifndef QQUICKWEBENGINEPROFILE_P_P_H
#define QQUICKWEBENGINEPROFILE_P_P_H
-class BrowserContextAdapter;
-
#include "browser_context_adapter_client.h"
#include "qquickwebengineprofile_p.h"
@@ -51,13 +49,13 @@ QT_BEGIN_NAMESPACE
class QQuickWebEngineDownloadItem;
class QQuickWebEngineSettings;
-class QQuickWebEngineProfilePrivate : public BrowserContextAdapterClient {
+class QQuickWebEngineProfilePrivate : public QtWebEngineCore::BrowserContextAdapterClient {
public:
Q_DECLARE_PUBLIC(QQuickWebEngineProfile)
- QQuickWebEngineProfilePrivate(BrowserContextAdapter* browserContext, bool ownsContext);
+ QQuickWebEngineProfilePrivate(QtWebEngineCore::BrowserContextAdapter* browserContext, bool ownsContext);
~QQuickWebEngineProfilePrivate();
- BrowserContextAdapter *browserContext() const { return m_browserContext; }
+ QtWebEngineCore::BrowserContextAdapter *browserContext() const { return m_browserContext; }
QQuickWebEngineSettings *settings() const { return m_settings.data(); }
void cancelDownload(quint32 downloadId);
@@ -70,8 +68,8 @@ private:
friend class QQuickWebEngineViewPrivate;
QQuickWebEngineProfile *q_ptr;
QScopedPointer<QQuickWebEngineSettings> m_settings;
- BrowserContextAdapter *m_browserContext;
- QExplicitlySharedDataPointer<BrowserContextAdapter> m_browserContextRef;
+ QtWebEngineCore::BrowserContextAdapter *m_browserContext;
+ QExplicitlySharedDataPointer<QtWebEngineCore::BrowserContextAdapter> m_browserContextRef;
QMap<quint32, QPointer<QQuickWebEngineDownloadItem> > m_ongoingDownloads;
};
diff --git a/src/webengine/api/qquickwebenginescript.cpp b/src/webengine/api/qquickwebenginescript.cpp
index 872ba153..8d42d77a 100644
--- a/src/webengine/api/qquickwebenginescript.cpp
+++ b/src/webengine/api/qquickwebenginescript.cpp
@@ -41,6 +41,8 @@
#include <QtCore/QTimerEvent>
#include "user_script_controller_host.h"
+using QtWebEngineCore::UserScript;
+
QQuickWebEngineScript::QQuickWebEngineScript()
: d_ptr(new QQuickWebEngineScriptPrivate)
{
@@ -178,7 +180,7 @@ void QQuickWebEngineScript::timerEvent(QTimerEvent *e)
d->m_controllerHost->addUserScript(d->coreScript, d->m_adapter);
}
-void QQuickWebEngineScriptPrivate::bind(UserScriptControllerHost *scriptController, WebContentsAdapter *adapter)
+void QQuickWebEngineScriptPrivate::bind(QtWebEngineCore::UserScriptControllerHost *scriptController, QtWebEngineCore::WebContentsAdapter *adapter)
{
aboutToUpdateUnderlyingScript();
m_adapter = adapter;
diff --git a/src/webengine/api/qquickwebenginescript_p.h b/src/webengine/api/qquickwebenginescript_p.h
index a42aed41..4992105f 100644
--- a/src/webengine/api/qquickwebenginescript_p.h
+++ b/src/webengine/api/qquickwebenginescript_p.h
@@ -40,9 +40,6 @@
#include <private/qtwebengineglobal_p.h>
#include <QtCore/QObject>
-class UserScriptControllerHost;
-class WebContentsAdapter;
-
QT_BEGIN_NAMESPACE
class QQuickWebEngineScriptPrivate;
class QQuickWebEngineView;
@@ -101,7 +98,7 @@ protected:
private:
friend class QQuickWebEngineViewPrivate;
- Q_DECLARE_PRIVATE(QQuickWebEngineScript);
+ Q_DECLARE_PRIVATE(QQuickWebEngineScript)
QScopedPointer<QQuickWebEngineScriptPrivate> d_ptr;
};
QT_END_NAMESPACE
diff --git a/src/webengine/api/qquickwebenginescript_p_p.h b/src/webengine/api/qquickwebenginescript_p_p.h
index 962a04cb..7b5626fd 100644
--- a/src/webengine/api/qquickwebenginescript_p_p.h
+++ b/src/webengine/api/qquickwebenginescript_p_p.h
@@ -43,6 +43,10 @@
#include "user_script.h"
#include "web_contents_adapter.h"
+namespace QtWebEngineCore {
+class UserScriptControllerHost;
+class WebContentsAdapter;
+} // namespace
QT_BEGIN_NAMESPACE
@@ -51,12 +55,12 @@ public:
Q_DECLARE_PUBLIC(QQuickWebEngineScript)
QQuickWebEngineScriptPrivate();
void aboutToUpdateUnderlyingScript();
- void bind(UserScriptControllerHost *, WebContentsAdapter * = 0);
+ void bind(QtWebEngineCore::UserScriptControllerHost *, QtWebEngineCore::WebContentsAdapter * = 0);
- UserScript coreScript;
+ QtWebEngineCore::UserScript coreScript;
QBasicTimer m_basicTimer;
- UserScriptControllerHost *m_controllerHost;
- WebContentsAdapter *m_adapter;
+ QtWebEngineCore::UserScriptControllerHost *m_controllerHost;
+ QtWebEngineCore::WebContentsAdapter *m_adapter;
private:
QQuickWebEngineScript *q_ptr;
diff --git a/src/webengine/api/qquickwebenginesettings.cpp b/src/webengine/api/qquickwebenginesettings.cpp
index 343ffef0..70a9d4b5 100644
--- a/src/webengine/api/qquickwebenginesettings.cpp
+++ b/src/webengine/api/qquickwebenginesettings.cpp
@@ -43,6 +43,8 @@
QT_BEGIN_NAMESPACE
+using QtWebEngineCore::WebEngineSettings;
+
QQuickWebEngineSettings::QQuickWebEngineSettings(QQuickWebEngineSettings *parentSettings)
: d_ptr(new WebEngineSettings(parentSettings ? parentSettings->d_ptr.data() : 0))
{ }
diff --git a/src/webengine/api/qquickwebenginesettings_p.h b/src/webengine/api/qquickwebenginesettings_p.h
index 40d04fdf..68c85ea7 100644
--- a/src/webengine/api/qquickwebenginesettings_p.h
+++ b/src/webengine/api/qquickwebenginesettings_p.h
@@ -41,7 +41,9 @@
#include <QObject>
#include <QScopedPointer>
+namespace QtWebEngineCore {
class WebEngineSettings;
+}
QT_BEGIN_NAMESPACE
@@ -111,7 +113,7 @@ private:
void setParentSettings(QQuickWebEngineSettings *parentSettings);
- QScopedPointer<WebEngineSettings> d_ptr;
+ QScopedPointer<QtWebEngineCore::WebEngineSettings> d_ptr;
};
QT_END_NAMESPACE
diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp
index 13eb63e0..1430d72b 100644
--- a/src/webengine/api/qquickwebengineview.cpp
+++ b/src/webengine/api/qquickwebengineview.cpp
@@ -72,6 +72,7 @@
#endif // QT_NO_ACCESSIBILITY
QT_BEGIN_NAMESPACE
+using namespace QtWebEngineCore;
#ifndef QT_NO_ACCESSIBILITY
static QAccessibleInterface *webAccessibleFactory(const QString &, QObject *object)
diff --git a/src/webengine/api/qquickwebengineview_p_p.h b/src/webengine/api/qquickwebengineview_p_p.h
index faf567d3..0111d4be 100644
--- a/src/webengine/api/qquickwebengineview_p_p.h
+++ b/src/webengine/api/qquickwebengineview_p_p.h
@@ -46,8 +46,10 @@
#include <QtCore/qcompilerdetection.h>
#include <QtGui/qaccessibleobject.h>
+namespace QtWebEngineCore {
class WebContentsAdapter;
class UIDelegatesManager;
+}
QT_BEGIN_NAMESPACE
class QQuickWebEngineView;
@@ -121,7 +123,7 @@ private:
Q_DECLARE_PUBLIC(QQuickWebEngineView)
};
-class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineViewPrivate : public WebContentsAdapterClient
+class Q_WEBENGINE_PRIVATE_EXPORT QQuickWebEngineViewPrivate : public QtWebEngineCore::WebContentsAdapterClient
{
public:
Q_DECLARE_PUBLIC(QQuickWebEngineView)
@@ -131,10 +133,10 @@ public:
QQuickWebEngineViewExperimental *experimental() const;
QQuickWebEngineViewport *viewport() const;
- UIDelegatesManager *ui();
+ QtWebEngineCore::UIDelegatesManager *ui();
- virtual RenderWidgetHostViewQtDelegate* CreateRenderWidgetHostViewQtDelegate(RenderWidgetHostViewQtDelegateClient *client) Q_DECL_OVERRIDE;
- virtual RenderWidgetHostViewQtDelegate* CreateRenderWidgetHostViewQtDelegateForPopup(RenderWidgetHostViewQtDelegateClient *client) Q_DECL_OVERRIDE;
+ virtual QtWebEngineCore::RenderWidgetHostViewQtDelegate* CreateRenderWidgetHostViewQtDelegate(QtWebEngineCore::RenderWidgetHostViewQtDelegateClient *client) Q_DECL_OVERRIDE;
+ virtual QtWebEngineCore::RenderWidgetHostViewQtDelegate* CreateRenderWidgetHostViewQtDelegateForPopup(QtWebEngineCore::RenderWidgetHostViewQtDelegateClient *client) Q_DECL_OVERRIDE;
virtual void titleChanged(const QString&) Q_DECL_OVERRIDE;
virtual void urlChanged(const QUrl&) Q_DECL_OVERRIDE;
virtual void iconChanged(const QUrl&) Q_DECL_OVERRIDE;
@@ -149,13 +151,13 @@ public:
virtual void loadFinished(bool success, const QUrl &url, int errorCode = 0, const QString &errorDescription = QString()) Q_DECL_OVERRIDE;
virtual void focusContainer() Q_DECL_OVERRIDE;
virtual void unhandledKeyEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- virtual void adoptNewWindow(WebContentsAdapter *newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &) Q_DECL_OVERRIDE;
+ virtual void adoptNewWindow(QtWebEngineCore::WebContentsAdapter *newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &) Q_DECL_OVERRIDE;
virtual void close() Q_DECL_OVERRIDE;
virtual void requestFullScreen(bool) Q_DECL_OVERRIDE;
virtual bool isFullScreen() const Q_DECL_OVERRIDE;
- virtual bool contextMenuRequested(const WebEngineContextMenuData &) Q_DECL_OVERRIDE;
+ virtual bool contextMenuRequested(const QtWebEngineCore::WebEngineContextMenuData &) Q_DECL_OVERRIDE;
virtual void navigationRequested(int navigationType, const QUrl &url, int &navigationRequestAction, bool isMainFrame) Q_DECL_OVERRIDE;
- virtual void javascriptDialog(QSharedPointer<JavaScriptDialogController>) Q_DECL_OVERRIDE;
+ virtual void javascriptDialog(QSharedPointer<QtWebEngineCore::JavaScriptDialogController>) Q_DECL_OVERRIDE;
virtual void runFileChooser(FileChooserMode, const QString &defaultFileName, const QStringList &acceptedMimeTypes) Q_DECL_OVERRIDE;
virtual void didRunJavaScript(quint64, const QVariant&) Q_DECL_OVERRIDE;
virtual void didFetchDocumentMarkup(quint64, const QString&) Q_DECL_OVERRIDE { }
@@ -169,14 +171,14 @@ public:
#ifndef QT_NO_ACCESSIBILITY
virtual QObject *accessibilityParentObject() Q_DECL_OVERRIDE;
#endif // QT_NO_ACCESSIBILITY
- virtual WebEngineSettings *webEngineSettings() const Q_DECL_OVERRIDE;
+ virtual QtWebEngineCore::WebEngineSettings *webEngineSettings() const Q_DECL_OVERRIDE;
virtual void allowCertificateError(const QSharedPointer<CertificateErrorController> &errorController);
virtual void runGeolocationPermissionRequest(QUrl const&) Q_DECL_OVERRIDE;
- virtual BrowserContextAdapter *browserContextAdapter() Q_DECL_OVERRIDE;
+ virtual QtWebEngineCore::BrowserContextAdapter *browserContextAdapter() Q_DECL_OVERRIDE;
void setDevicePixelRatio(qreal);
- void adoptWebContents(WebContentsAdapter *webContents);
+ void adoptWebContents(QtWebEngineCore::WebContentsAdapter *webContents);
void setProfile(QQuickWebEngineProfile *profile);
void ensureContentsAdapter();
@@ -186,7 +188,7 @@ public:
static QQuickWebEngineScript *userScripts_at(QQmlListProperty<QQuickWebEngineScript> *p, int idx);
static void userScripts_clear(QQmlListProperty<QQuickWebEngineScript> *p);
- QExplicitlySharedDataPointer<WebContentsAdapter> adapter;
+ QExplicitlySharedDataPointer<QtWebEngineCore::WebContentsAdapter> adapter;
QScopedPointer<QQuickWebEngineViewExperimental> e;
QScopedPointer<QQuickWebEngineViewport> v;
QScopedPointer<QQuickWebEngineHistory> m_history;
@@ -203,7 +205,7 @@ public:
QSharedPointer<CertificateErrorController> m_certificateErrorController;
private:
- QScopedPointer<UIDelegatesManager> m_uIDelegatesManager;
+ QScopedPointer<QtWebEngineCore::UIDelegatesManager> m_uIDelegatesManager;
QList<QQuickWebEngineScript *> m_userScripts;
qreal m_dpiScale;
};
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
index bfcda558..0a534ac2 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp
@@ -46,6 +46,8 @@
#include <private/qquickwindow_p.h>
#include <private/qsgcontext_p.h>
+namespace QtWebEngineCore {
+
RenderWidgetHostViewQtDelegateQuick::RenderWidgetHostViewQtDelegateQuick(RenderWidgetHostViewQtDelegateClient *client, bool isPopup)
: m_client(client)
, m_isPopup(isPopup)
@@ -273,3 +275,5 @@ void RenderWidgetHostViewQtDelegateQuick::onWindowPosChanged()
{
m_client->windowBoundsChanged();
}
+
+} // namespace QtWebEngineCore
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.h b/src/webengine/render_widget_host_view_qt_delegate_quick.h
index cb1b6a83..ddd0e4d9 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quick.h
+++ b/src/webengine/render_widget_host_view_qt_delegate_quick.h
@@ -41,6 +41,8 @@
#include <QQuickItem>
+namespace QtWebEngineCore {
+
class RenderWidgetHostViewQtDelegateQuick : public QQuickItem, public RenderWidgetHostViewQtDelegate
{
Q_OBJECT
@@ -95,4 +97,7 @@ private:
bool m_isPopup;
bool m_initialized;
};
+
+} // namespace QtWebEngineCore
+
#endif
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
index c395fdd4..39c48ea5 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
+++ b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.cpp
@@ -39,6 +39,7 @@
#include "qquickwebengineview_p_p.h"
#include <QQuickItem>
+namespace QtWebEngineCore {
RenderWidgetHostViewQtDelegateQuickWindow::RenderWidgetHostViewQtDelegateQuickWindow(RenderWidgetHostViewQtDelegate *realDelegate)
: m_realDelegate(realDelegate)
@@ -136,3 +137,5 @@ void RenderWidgetHostViewQtDelegateQuickWindow::setTooltip(const QString &toolti
{
Q_UNUSED(tooltip);
}
+
+} // namespace QtWebEngineCore
diff --git a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h
index 6bd21d15..cda51a1a 100644
--- a/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h
+++ b/src/webengine/render_widget_host_view_qt_delegate_quickwindow.h
@@ -44,6 +44,8 @@
#include <QQuickWindow>
#include <QScopedPointer>
+namespace QtWebEngineCore {
+
class RenderWidgetHostViewQtDelegateQuickWindow : public QQuickWindow , public RenderWidgetHostViewQtDelegate {
public:
@@ -76,4 +78,6 @@ private:
QScopedPointer<RenderWidgetHostViewQtDelegate> m_realDelegate;
};
+} // namespace QtWebEngineCore
+
#endif // RENDER_WIDGET_HOST_VIEW_QT_DELEGATE_QUICKWINDOW_H
diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp
index 23816caf..615c6024 100644
--- a/src/webengine/ui_delegates_manager.cpp
+++ b/src/webengine/ui_delegates_manager.cpp
@@ -51,6 +51,8 @@
// Uncomment for QML debugging
//#define UI_DELEGATES_DEBUG
+namespace QtWebEngineCore {
+
#define NO_SEPARATOR
#if defined(Q_OS_WIN)
#define FILE_NAME_CASE_STATEMENT(TYPE, COMPONENT) \
@@ -428,4 +430,6 @@ void UIDelegatesManager::showFilePicker(WebContentsAdapterClient::FileChooserMod
QMetaObject::invokeMethod(filePicker, "open");
}
+} // namespace QtWebEngineCore
+
#include "ui_delegates_manager.moc"
diff --git a/src/webengine/ui_delegates_manager.h b/src/webengine/ui_delegates_manager.h
index e0eeb467..b4300638 100644
--- a/src/webengine/ui_delegates_manager.h
+++ b/src/webengine/ui_delegates_manager.h
@@ -63,13 +63,15 @@
#define MEMBER_DECLARATION(TYPE, COMPONENT) \
QQmlComponent *COMPONENT##Component
-class JavaScriptDialogController;
QT_BEGIN_NAMESPACE
class QObject;
class QQmlContext;
class QQuickWebEngineView;
QT_END_NAMESPACE
+namespace QtWebEngineCore {
+class JavaScriptDialogController;
+
const char *defaultPropertyName(QObject *obj);
class MenuItemHandler : public QObject {
@@ -130,8 +132,10 @@ private:
FOR_EACH_COMPONENT_TYPE(MEMBER_DECLARATION, SEMICOLON_SEPARATOR)
- Q_DISABLE_COPY(UIDelegatesManager);
+ Q_DISABLE_COPY(UIDelegatesManager)
};
+} // namespace QtWebEngineCore
+
#endif // UI_DELEGATES_MANAGER_H
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem.cpp b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
index ecf682ed..70357058 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem.cpp
+++ b/src/webenginewidgets/api/qwebenginedownloaditem.cpp
@@ -41,6 +41,8 @@
QT_BEGIN_NAMESPACE
+using QtWebEngineCore::BrowserContextAdapterClient;
+
static inline QWebEngineDownloadItem::DownloadState toDownloadState(int state)
{
switch (state) {
diff --git a/src/webenginewidgets/api/qwebenginedownloaditem_p.h b/src/webenginewidgets/api/qwebenginedownloaditem_p.h
index e3e8a7d4..40c7c6b4 100644
--- a/src/webenginewidgets/api/qwebenginedownloaditem_p.h
+++ b/src/webenginewidgets/api/qwebenginedownloaditem_p.h
@@ -63,7 +63,7 @@ public:
qint64 totalBytes;
qint64 receivedBytes;
- void update(const BrowserContextAdapterClient::DownloadItemInfo &info);
+ void update(const QtWebEngineCore::BrowserContextAdapterClient::DownloadItemInfo &info);
};
QT_END_NAMESPACE
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp
index bdce0497..8b83856b 100644
--- a/src/webenginewidgets/api/qwebenginepage.cpp
+++ b/src/webenginewidgets/api/qwebenginepage.cpp
@@ -54,6 +54,8 @@
QT_BEGIN_NAMESPACE
+using namespace QtWebEngineCore;
+
static QWebEnginePage::WebWindowType toWindowType(WebContentsAdapterClient::WindowOpenDisposition disposition)
{
switch (disposition) {
diff --git a/src/webenginewidgets/api/qwebenginepage_p.h b/src/webenginewidgets/api/qwebenginepage_p.h
index dc07ce2c..b6da844d 100644
--- a/src/webenginewidgets/api/qwebenginepage_p.h
+++ b/src/webenginewidgets/api/qwebenginepage_p.h
@@ -44,8 +44,10 @@
#include <QtCore/qcompilerdetection.h>
#include <QSharedData>
+namespace QtWebEngineCore {
class RenderWidgetHostViewQtDelegate;
class WebContentsAdapter;
+}
QT_BEGIN_NAMESPACE
class QWebEngineHistory;
@@ -97,7 +99,7 @@ private:
QHash<quint64, CallbackSharedDataPointer> m_callbackMap;
};
-class QWebEnginePagePrivate : public WebContentsAdapterClient
+class QWebEnginePagePrivate : public QtWebEngineCore::WebContentsAdapterClient
{
public:
Q_DECLARE_PUBLIC(QWebEnginePage)
@@ -106,8 +108,8 @@ public:
QWebEnginePagePrivate(QWebEngineProfile *profile = 0);
~QWebEnginePagePrivate();
- virtual RenderWidgetHostViewQtDelegate* CreateRenderWidgetHostViewQtDelegate(RenderWidgetHostViewQtDelegateClient *client) Q_DECL_OVERRIDE;
- virtual RenderWidgetHostViewQtDelegate* CreateRenderWidgetHostViewQtDelegateForPopup(RenderWidgetHostViewQtDelegateClient *client) Q_DECL_OVERRIDE { return CreateRenderWidgetHostViewQtDelegate(client); }
+ virtual QtWebEngineCore::RenderWidgetHostViewQtDelegate* CreateRenderWidgetHostViewQtDelegate(QtWebEngineCore::RenderWidgetHostViewQtDelegateClient *client) Q_DECL_OVERRIDE;
+ virtual QtWebEngineCore::RenderWidgetHostViewQtDelegate* CreateRenderWidgetHostViewQtDelegateForPopup(QtWebEngineCore::RenderWidgetHostViewQtDelegateClient *client) Q_DECL_OVERRIDE { return CreateRenderWidgetHostViewQtDelegate(client); }
virtual void titleChanged(const QString&) Q_DECL_OVERRIDE;
virtual void urlChanged(const QUrl&) Q_DECL_OVERRIDE;
virtual void iconChanged(const QUrl&) Q_DECL_OVERRIDE;
@@ -122,13 +124,13 @@ public:
virtual void loadFinished(bool success, const QUrl &url, int errorCode = 0, const QString &errorDescription = QString()) Q_DECL_OVERRIDE;
virtual void focusContainer() Q_DECL_OVERRIDE;
virtual void unhandledKeyEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- virtual void adoptNewWindow(WebContentsAdapter *newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &initialGeometry) Q_DECL_OVERRIDE;
+ virtual void adoptNewWindow(QtWebEngineCore::WebContentsAdapter *newWebContents, WindowOpenDisposition disposition, bool userGesture, const QRect &initialGeometry) Q_DECL_OVERRIDE;
virtual void close() Q_DECL_OVERRIDE;
- virtual bool contextMenuRequested(const WebEngineContextMenuData &data) Q_DECL_OVERRIDE;
+ virtual bool contextMenuRequested(const QtWebEngineCore::WebEngineContextMenuData &data) Q_DECL_OVERRIDE;
virtual void navigationRequested(int navigationType, const QUrl &url, int &navigationRequestAction, bool isMainFrame) Q_DECL_OVERRIDE;
virtual void requestFullScreen(bool) Q_DECL_OVERRIDE { }
virtual bool isFullScreen() const Q_DECL_OVERRIDE { return false; }
- virtual void javascriptDialog(QSharedPointer<JavaScriptDialogController>) Q_DECL_OVERRIDE;
+ virtual void javascriptDialog(QSharedPointer<QtWebEngineCore::JavaScriptDialogController>) Q_DECL_OVERRIDE;
virtual void runFileChooser(FileChooserMode, const QString &defaultFileName, const QStringList &acceptedMimeTypes) Q_DECL_OVERRIDE;
virtual void didRunJavaScript(quint64 requestId, const QVariant& result) Q_DECL_OVERRIDE;
virtual void didFetchDocumentMarkup(quint64 requestId, const QString& result) Q_DECL_OVERRIDE;
@@ -143,26 +145,26 @@ public:
#ifndef QT_NO_ACCESSIBILITY
virtual QObject *accessibilityParentObject() Q_DECL_OVERRIDE;
#endif // QT_NO_ACCESSIBILITY
- virtual WebEngineSettings *webEngineSettings() const Q_DECL_OVERRIDE;
+ virtual QtWebEngineCore::WebEngineSettings *webEngineSettings() const Q_DECL_OVERRIDE;
virtual void allowCertificateError(const QSharedPointer<CertificateErrorController> &controller) Q_DECL_OVERRIDE;
- virtual BrowserContextAdapter *browserContextAdapter() Q_DECL_OVERRIDE;
+ virtual QtWebEngineCore::BrowserContextAdapter *browserContextAdapter() Q_DECL_OVERRIDE;
void updateAction(QWebEnginePage::WebAction) const;
void updateNavigationActions();
void _q_webActionTriggered(bool checked);
- WebContentsAdapter *webContents() { return adapter.data(); }
+ QtWebEngineCore::WebContentsAdapter *webContents() { return adapter.data(); }
void recreateFromSerializedHistory(QDataStream &input);
- QExplicitlySharedDataPointer<WebContentsAdapter> adapter;
+ QExplicitlySharedDataPointer<QtWebEngineCore::WebContentsAdapter> adapter;
QWebEngineHistory *history;
QWebEngineProfile *profile;
QWebEngineSettings *settings;
QWebEngineView *view;
QSize viewportSize;
QUrl explicitUrl;
- WebEngineContextMenuData m_menuData;
+ QtWebEngineCore::WebEngineContextMenuData m_menuData;
bool isLoading;
QWebEngineScriptCollection scriptCollection;
diff --git a/src/webenginewidgets/api/qwebengineprofile.cpp b/src/webenginewidgets/api/qwebengineprofile.cpp
index e2441ca5..eb502d05 100644
--- a/src/webenginewidgets/api/qwebengineprofile.cpp
+++ b/src/webenginewidgets/api/qwebengineprofile.cpp
@@ -50,6 +50,8 @@
QT_BEGIN_NAMESPACE
+using QtWebEngineCore::BrowserContextAdapter;
+
/*!
\class QWebEngineProfile
\brief The QWebEngineProfile class provides a web-engine profile shared by multiple pages.
diff --git a/src/webenginewidgets/api/qwebengineprofile_p.h b/src/webenginewidgets/api/qwebengineprofile_p.h
index 6f2d53a8..6ae9f9ca 100644
--- a/src/webenginewidgets/api/qwebengineprofile_p.h
+++ b/src/webenginewidgets/api/qwebengineprofile_p.h
@@ -44,19 +44,21 @@
#include <QMap>
#include <QPointer>
+namespace QtWebEngineCore {
class BrowserContextAdapter;
+}
QT_BEGIN_NAMESPACE
class QWebEngineSettings;
-class QWebEngineProfilePrivate : public BrowserContextAdapterClient {
+class QWebEngineProfilePrivate : public QtWebEngineCore::BrowserContextAdapterClient {
public:
Q_DECLARE_PUBLIC(QWebEngineProfile)
- QWebEngineProfilePrivate(BrowserContextAdapter* browserContext, bool ownsContext);
+ QWebEngineProfilePrivate(QtWebEngineCore::BrowserContextAdapter* browserContext, bool ownsContext);
~QWebEngineProfilePrivate();
- BrowserContextAdapter *browserContext() const { return m_browserContext; }
+ QtWebEngineCore::BrowserContextAdapter *browserContext() const { return m_browserContext; }
QWebEngineSettings *settings() const { return m_settings; }
void cancelDownload(quint32 downloadId);
@@ -74,8 +76,8 @@ public:
private:
QWebEngineProfile *q_ptr;
QWebEngineSettings *m_settings;
- BrowserContextAdapter *m_browserContext;
- QExplicitlySharedDataPointer<BrowserContextAdapter> m_browserContextRef;
+ QtWebEngineCore::BrowserContextAdapter *m_browserContext;
+ QExplicitlySharedDataPointer<QtWebEngineCore::BrowserContextAdapter> m_browserContextRef;
QMap<quint32, QPointer<QWebEngineDownloadItem> > m_ongoingDownloads;
QMap<QByteArray, QPointer<QWebEngineUrlSchemeHandler> > m_urlSchemeHandlers;
};
diff --git a/src/webenginewidgets/api/qwebenginescript.cpp b/src/webenginewidgets/api/qwebenginescript.cpp
index 63459992..c658c509 100644
--- a/src/webenginewidgets/api/qwebenginescript.cpp
+++ b/src/webenginewidgets/api/qwebenginescript.cpp
@@ -39,6 +39,8 @@
#include "user_script.h"
#include <QtCore/QDebug>
+using QtWebEngineCore::UserScript;
+
QWebEngineScript::QWebEngineScript()
: d(new UserScript)
{
diff --git a/src/webenginewidgets/api/qwebenginescript.h b/src/webenginewidgets/api/qwebenginescript.h
index 735ee92e..6eba7693 100644
--- a/src/webenginewidgets/api/qwebenginescript.h
+++ b/src/webenginewidgets/api/qwebenginescript.h
@@ -41,7 +41,10 @@
#include <QtCore/QSharedDataPointer>
#include <QtCore/QString>
+namespace QtWebEngineCore {
class UserScript;
+} // namespace
+
QT_BEGIN_NAMESPACE
class QWEBENGINEWIDGETS_EXPORT QWebEngineScript {
@@ -90,9 +93,9 @@ public:
private:
friend class QWebEngineScriptCollectionPrivate;
friend class QWebEngineScriptCollection;
- QWebEngineScript(const UserScript &);
+ QWebEngineScript(const QtWebEngineCore::UserScript &);
- QSharedDataPointer<UserScript> d;
+ QSharedDataPointer<QtWebEngineCore::UserScript> d;
};
Q_DECLARE_SHARED(QWebEngineScript)
diff --git a/src/webenginewidgets/api/qwebenginescriptcollection.cpp b/src/webenginewidgets/api/qwebenginescriptcollection.cpp
index ffbb9052..2f1f31b0 100644
--- a/src/webenginewidgets/api/qwebenginescriptcollection.cpp
+++ b/src/webenginewidgets/api/qwebenginescriptcollection.cpp
@@ -39,6 +39,8 @@
#include "user_script_controller_host.h"
+using QtWebEngineCore::UserScript;
+
QWebEngineScriptCollection::QWebEngineScriptCollection(QWebEngineScriptCollectionPrivate *collectionPrivate)
:d(collectionPrivate)
{
@@ -96,7 +98,7 @@ QList<QWebEngineScript> QWebEngineScriptCollection::toList() const
}
-QWebEngineScriptCollectionPrivate::QWebEngineScriptCollectionPrivate(UserScriptControllerHost *controller, WebContentsAdapter *webContents)
+QWebEngineScriptCollectionPrivate::QWebEngineScriptCollectionPrivate(QtWebEngineCore::UserScriptControllerHost *controller, QtWebEngineCore::WebContentsAdapter *webContents)
: m_scriptController(controller)
, m_contents(webContents)
{
diff --git a/src/webenginewidgets/api/qwebenginescriptcollection_p.h b/src/webenginewidgets/api/qwebenginescriptcollection_p.h
index baf09dbb..9a3a425b 100644
--- a/src/webenginewidgets/api/qwebenginescriptcollection_p.h
+++ b/src/webenginewidgets/api/qwebenginescriptcollection_p.h
@@ -43,13 +43,15 @@
#include <QtCore/QSet>
+namespace QtWebEngineCore {
class UserScriptControllerHost;
class WebContentsAdapter;
+} // namespace
QT_BEGIN_NAMESPACE
class QWebEngineScriptCollectionPrivate {
public:
- QWebEngineScriptCollectionPrivate(UserScriptControllerHost *, WebContentsAdapter * = 0);
+ QWebEngineScriptCollectionPrivate(QtWebEngineCore::UserScriptControllerHost *, QtWebEngineCore::WebContentsAdapter * = 0);
int count() const;
bool contains(const QWebEngineScript &) const;
@@ -62,8 +64,8 @@ public:
void reserve(int);
private:
- UserScriptControllerHost *m_scriptController;
- WebContentsAdapter *m_contents;
+ QtWebEngineCore::UserScriptControllerHost *m_scriptController;
+ QtWebEngineCore::WebContentsAdapter *m_contents;
};
QT_END_NAMESPACE
diff --git a/src/webenginewidgets/api/qwebenginesettings.cpp b/src/webenginewidgets/api/qwebenginesettings.cpp
index f7dcafa5..dadc3bfe 100644
--- a/src/webenginewidgets/api/qwebenginesettings.cpp
+++ b/src/webenginewidgets/api/qwebenginesettings.cpp
@@ -41,6 +41,8 @@
QT_BEGIN_NAMESPACE
+using QtWebEngineCore::WebEngineSettings;
+
static WebEngineSettings::Attribute toWebEngineAttribute(QWebEngineSettings::WebAttribute attribute)
{
switch (attribute) {
diff --git a/src/webenginewidgets/api/qwebenginesettings.h b/src/webenginewidgets/api/qwebenginesettings.h
index ff8fad25..44339a2f 100644
--- a/src/webenginewidgets/api/qwebenginesettings.h
+++ b/src/webenginewidgets/api/qwebenginesettings.h
@@ -25,7 +25,9 @@
#include <QtCore/qscopedpointer.h>
#include <QtCore/qstring.h>
+namespace QtWebEngineCore {
class WebEngineSettings;
+}
QT_BEGIN_NAMESPACE
@@ -88,7 +90,7 @@ public:
private:
Q_DISABLE_COPY(QWebEngineSettings)
- typedef WebEngineSettings QWebEngineSettingsPrivate;
+ typedef ::QtWebEngineCore::WebEngineSettings QWebEngineSettingsPrivate;
QWebEngineSettingsPrivate* d_func() { return d_ptr.data(); }
const QWebEngineSettingsPrivate* d_func() const { return d_ptr.data(); }
QScopedPointer<QWebEngineSettingsPrivate> d_ptr;
diff --git a/src/webenginewidgets/api/qwebengineurlrequestjob.cpp b/src/webenginewidgets/api/qwebengineurlrequestjob.cpp
index e937a5bb..cb8b200a 100644
--- a/src/webenginewidgets/api/qwebengineurlrequestjob.cpp
+++ b/src/webenginewidgets/api/qwebengineurlrequestjob.cpp
@@ -42,7 +42,7 @@
QT_BEGIN_NAMESPACE
-QWebEngineUrlRequestJob::QWebEngineUrlRequestJob(URLRequestCustomJobDelegate * p)
+QWebEngineUrlRequestJob::QWebEngineUrlRequestJob(QtWebEngineCore::URLRequestCustomJobDelegate * p)
: QObject(p) // owned by the jobdelegate and deleted when the job is done
, d_ptr(p)
{
diff --git a/src/webenginewidgets/api/qwebengineurlrequestjob_p.h b/src/webenginewidgets/api/qwebengineurlrequestjob_p.h
index 3aea80d2..72c9dc83 100644
--- a/src/webenginewidgets/api/qwebengineurlrequestjob_p.h
+++ b/src/webenginewidgets/api/qwebengineurlrequestjob_p.h
@@ -43,7 +43,9 @@
#include <QtCore/QObject>
#include <QtCore/QUrl>
+namespace QtWebEngineCore {
class URLRequestCustomJobDelegate;
+} // namespace
QT_BEGIN_NAMESPACE
@@ -58,10 +60,10 @@ public:
void setReply(const QByteArray &contentType, QIODevice *device);
private:
- QWebEngineUrlRequestJob(URLRequestCustomJobDelegate *);
+ QWebEngineUrlRequestJob(QtWebEngineCore::URLRequestCustomJobDelegate *);
friend class QWebEngineUrlSchemeHandlerPrivate;
- URLRequestCustomJobDelegate* d_ptr;
+ QtWebEngineCore::URLRequestCustomJobDelegate* d_ptr;
};
QT_END_NAMESPACE
diff --git a/src/webenginewidgets/api/qwebengineurlschemehandler.cpp b/src/webenginewidgets/api/qwebengineurlschemehandler.cpp
index ccb92258..16ad220b 100644
--- a/src/webenginewidgets/api/qwebengineurlschemehandler.cpp
+++ b/src/webenginewidgets/api/qwebengineurlschemehandler.cpp
@@ -54,7 +54,7 @@ QWebEngineUrlSchemeHandlerPrivate::~QWebEngineUrlSchemeHandlerPrivate()
{
}
-bool QWebEngineUrlSchemeHandlerPrivate::handleJob(URLRequestCustomJobDelegate *job)
+bool QWebEngineUrlSchemeHandlerPrivate::handleJob(QtWebEngineCore::URLRequestCustomJobDelegate *job)
{
QWebEngineUrlRequestJob *requestJob = new QWebEngineUrlRequestJob(job);
q_ptr->requestStarted(requestJob);
diff --git a/src/webenginewidgets/api/qwebengineurlschemehandler_p_p.h b/src/webenginewidgets/api/qwebengineurlschemehandler_p_p.h
index 6146cc05..b15171ed 100644
--- a/src/webenginewidgets/api/qwebengineurlschemehandler_p_p.h
+++ b/src/webenginewidgets/api/qwebengineurlschemehandler_p_p.h
@@ -49,14 +49,14 @@ class QWebEngineProfile;
class QWebEngineUrlRequestJob;
class QWebEngineUrlSchemeHandler;
-class QWebEngineUrlSchemeHandlerPrivate : public CustomUrlSchemeHandler {
+class QWebEngineUrlSchemeHandlerPrivate : public QtWebEngineCore::CustomUrlSchemeHandler {
public:
Q_DECLARE_PUBLIC(QWebEngineUrlSchemeHandler)
QWebEngineUrlSchemeHandlerPrivate(const QByteArray &, QWebEngineUrlSchemeHandler *, QWebEngineProfile *);
virtual ~QWebEngineUrlSchemeHandlerPrivate();
- virtual bool handleJob(URLRequestCustomJobDelegate*) Q_DECL_OVERRIDE;
+ virtual bool handleJob(QtWebEngineCore::URLRequestCustomJobDelegate*) Q_DECL_OVERRIDE;
private:
QWebEngineUrlSchemeHandler *q_ptr;
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
index 252b13fa..865d0f93 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp
@@ -49,6 +49,7 @@
#include <private/qsgcontext_p.h>
#include <private/qsgengine_p.h>
+namespace QtWebEngineCore {
static const int MaxTooltipLength = 1024;
@@ -294,3 +295,5 @@ void RenderWidgetHostViewQtDelegateWidget::onWindowPosChanged()
{
m_client->windowBoundsChanged();
}
+
+} // namespace QtWebEngineCore
diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
index 54fdf3b2..d0dfdc68 100644
--- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
+++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.h
@@ -50,6 +50,8 @@
#include <QtWidgets/QOpenGLWidget>
#endif
+namespace QtWebEngineCore {
+
class RenderWidgetHostViewQtDelegateWidget : public QOpenGLWidget, public RenderWidgetHostViewQtDelegate {
Q_OBJECT
public:
@@ -99,4 +101,6 @@ private:
QList<QMetaObject::Connection> m_windowConnections;
};
+} // namespace QtWebEngineCore
+
#endif