From 0c49002d833b6c8ccf822d1ebd29a86b3f15f389 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Fri, 12 Dec 2014 15:06:29 +0100 Subject: 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 --- src/core/access_token_store_qt.cpp | 4 ++++ src/core/access_token_store_qt.h | 4 ++++ src/core/browser_accessibility_qt.cpp | 1 + src/core/browser_context_adapter.cpp | 4 ++++ src/core/browser_context_adapter.h | 5 +++++ src/core/browser_context_adapter_client.h | 4 ++++ src/core/browser_context_qt.cpp | 4 ++++ src/core/browser_context_qt.h | 4 ++++ src/core/certificate_error_controller.cpp | 6 +++++ src/core/chromium_overrides.cpp | 9 +++++--- src/core/chromium_overrides.h | 2 ++ src/core/clipboard_qt.cpp | 10 ++++++++- src/core/clipboard_qt.h | 4 ++++ src/core/content_browser_client_qt.cpp | 6 ++++- src/core/content_browser_client_qt.h | 3 +++ src/core/content_client_qt.cpp | 10 ++++++--- src/core/content_client_qt.h | 4 ++++ src/core/content_main_delegate_qt.cpp | 3 +++ src/core/content_main_delegate_qt.h | 3 +++ src/core/custom_protocol_handler.cpp | 4 ++++ src/core/custom_protocol_handler.h | 10 ++++++--- src/core/custom_url_scheme_handler.cpp | 4 ++++ src/core/custom_url_scheme_handler.h | 9 ++++++-- src/core/delegated_frame_node.cpp | 3 +++ src/core/delegated_frame_node.h | 4 ++++ src/core/desktop_screen_qt.cpp | 4 ++++ src/core/desktop_screen_qt.h | 4 ++++ src/core/dev_tools_http_handler_delegate_qt.cpp | 4 ++++ src/core/dev_tools_http_handler_delegate_qt.h | 4 ++++ src/core/download_manager_delegate_qt.cpp | 4 ++++ src/core/download_manager_delegate_qt.h | 5 +++++ src/core/javascript_dialog_controller.cpp | 4 ++++ src/core/javascript_dialog_controller.h | 4 ++++ src/core/javascript_dialog_controller_p.h | 4 ++++ src/core/javascript_dialog_manager_qt.cpp | 4 ++++ src/core/javascript_dialog_manager_qt.h | 6 ++++- src/core/location_provider_qt.cpp | 8 +++++-- src/core/location_provider_qt.h | 6 ++++- src/core/media_capture_devices_dispatcher.cpp | 4 ++++ src/core/media_capture_devices_dispatcher.h | 4 ++++ src/core/network_delegate_qt.cpp | 6 ++--- src/core/network_delegate_qt.h | 4 ++++ src/core/process_main.cpp | 4 ++-- src/core/process_main.h | 2 +- src/core/qrc_protocol_handler_qt.cpp | 8 ++++--- src/core/qrc_protocol_handler_qt.h | 4 ++++ src/core/qt_render_view_observer_host.cpp | 4 ++++ src/core/qt_render_view_observer_host.h | 4 ++++ src/core/render_widget_host_view_qt.cpp | 4 ++++ src/core/render_widget_host_view_qt.h | 4 ++++ src/core/render_widget_host_view_qt_delegate.h | 4 ++++ src/core/renderer/content_renderer_client_qt.cpp | 4 ++++ src/core/renderer/content_renderer_client_qt.h | 4 ++++ src/core/renderer/web_channel_ipc_transport.cpp | 4 ++++ src/core/renderer/web_channel_ipc_transport.h | 4 ++++ src/core/resource_context_qt.cpp | 4 ++++ src/core/resource_context_qt.h | 6 ++++- src/core/resource_dispatcher_host_delegate_qt.cpp | 4 ++++ src/core/resource_dispatcher_host_delegate_qt.h | 4 ++++ src/core/surface_factory_qt.cpp | 4 ++++ src/core/surface_factory_qt.h | 4 ++++ src/core/type_conversion.h | 4 ++++ src/core/url_request_context_getter_qt.cpp | 4 ++++ src/core/url_request_context_getter_qt.h | 4 ++++ src/core/url_request_custom_job.cpp | 4 ++++ src/core/url_request_custom_job.h | 4 ++++ src/core/url_request_custom_job_delegate.cpp | 3 +++ src/core/url_request_custom_job_delegate.h | 4 ++++ src/core/url_request_qrc_job_qt.cpp | 3 +++ src/core/url_request_qrc_job_qt.h | 4 ++++ src/core/user_script.cpp | 8 ++++++- src/core/user_script.h | 11 +++++++-- src/core/user_script_controller_host.cpp | 4 ++++ src/core/user_script_controller_host.h | 7 +++++- src/core/web_channel_ipc_transport_host.cpp | 4 ++++ src/core/web_channel_ipc_transport_host.h | 5 ++++- src/core/web_contents_adapter.cpp | 6 ++++- src/core/web_contents_adapter.h | 16 ++++++++----- src/core/web_contents_adapter_client.h | 4 ++++ src/core/web_contents_adapter_p.h | 10 +++++++-- src/core/web_contents_delegate_qt.cpp | 4 ++++ src/core/web_contents_delegate_qt.h | 4 ++++ src/core/web_contents_view_qt.cpp | 4 ++++ src/core/web_contents_view_qt.h | 4 ++++ src/core/web_engine_context.cpp | 2 ++ src/core/web_engine_context.h | 16 +++++++------ src/core/web_engine_library_info.cpp | 1 + src/core/web_engine_settings.cpp | 5 ++++- src/core/web_engine_settings.h | 10 +++++---- src/core/web_engine_visited_links_manager.cpp | 4 ++++ src/core/web_engine_visited_links_manager.h | 8 +++++-- src/webengine/api/qquickwebenginedownloaditem.cpp | 3 +++ .../api/qquickwebenginedownloaditem_p_p.h | 5 +++-- src/webengine/api/qquickwebenginehistory.cpp | 2 +- src/webengine/api/qquickwebenginehistory_p.h | 2 -- src/webengine/api/qquickwebenginehistory_p_p.h | 8 ++++--- .../api/qquickwebenginenewviewrequest_p.h | 4 +++- src/webengine/api/qquickwebengineprofile.cpp | 2 ++ src/webengine/api/qquickwebengineprofile_p.h | 4 ++++ src/webengine/api/qquickwebengineprofile_p_p.h | 12 +++++----- src/webengine/api/qquickwebenginescript.cpp | 4 +++- src/webengine/api/qquickwebenginescript_p.h | 5 +---- src/webengine/api/qquickwebenginescript_p_p.h | 12 ++++++---- src/webengine/api/qquickwebenginesettings.cpp | 2 ++ src/webengine/api/qquickwebenginesettings_p.h | 4 +++- src/webengine/api/qquickwebengineview.cpp | 1 + src/webengine/api/qquickwebengineview_p_p.h | 26 ++++++++++++---------- .../render_widget_host_view_qt_delegate_quick.cpp | 4 ++++ .../render_widget_host_view_qt_delegate_quick.h | 5 +++++ ...er_widget_host_view_qt_delegate_quickwindow.cpp | 3 +++ ...nder_widget_host_view_qt_delegate_quickwindow.h | 4 ++++ src/webengine/ui_delegates_manager.cpp | 4 ++++ src/webengine/ui_delegates_manager.h | 8 +++++-- .../api/qwebenginedownloaditem.cpp | 2 ++ .../api/qwebenginedownloaditem_p.h | 2 +- src/webenginewidgets/api/qwebenginepage.cpp | 2 ++ src/webenginewidgets/api/qwebenginepage_p.h | 24 +++++++++++--------- src/webenginewidgets/api/qwebengineprofile.cpp | 2 ++ src/webenginewidgets/api/qwebengineprofile_p.h | 12 +++++----- src/webenginewidgets/api/qwebenginescript.cpp | 2 ++ src/webenginewidgets/api/qwebenginescript.h | 7 ++++-- .../api/qwebenginescriptcollection.cpp | 4 +++- .../api/qwebenginescriptcollection_p.h | 8 ++++--- src/webenginewidgets/api/qwebenginesettings.cpp | 2 ++ src/webenginewidgets/api/qwebenginesettings.h | 4 +++- .../api/qwebengineurlrequestjob.cpp | 2 +- .../api/qwebengineurlrequestjob_p.h | 6 +++-- .../api/qwebengineurlschemehandler.cpp | 2 +- .../api/qwebengineurlschemehandler_p_p.h | 4 ++-- .../render_widget_host_view_qt_delegate_widget.cpp | 3 +++ .../render_widget_host_view_qt_delegate_widget.h | 4 ++++ 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 b0bfd6ea2..b657a633a 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 2b47e8b03..6b8cfa2a2 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 dfebbadfc..204cda638 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 f89e671c7..cb606a8b5 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 2a7c3465f..0e5a3605d 100644 --- a/src/core/browser_context_adapter.h +++ b/src/core/browser_context_adapter.h @@ -44,7 +44,10 @@ #include #include +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 1c61a3c6e..4a57b75c4 100644 --- a/src/core/browser_context_adapter_client.h +++ b/src/core/browser_context_adapter_client.h @@ -41,6 +41,8 @@ #include #include +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 13c23190c..3fa0f672d 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(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 fb94ddf06..af36b55ab 100644 --- a/src/core/browser_context_qt.h +++ b/src/core/browser_context_qt.h @@ -44,6 +44,8 @@ #include // 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 4b89de043..3a95458ea 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 a098fb0ad..bd76025ea 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 9df4b1450..6787729ac 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 21ea457ce..f7ca9764d 100644 --- a/src/core/clipboard_qt.cpp +++ b/src/core/clipboard_qt.cpp @@ -51,6 +51,8 @@ #include #include +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 0421f84fd..4c7e6ab59 100644 --- a/src/core/clipboard_qt.h +++ b/src/core/clipboard_qt.h @@ -43,6 +43,8 @@ #include #include +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 8d2541495..b0badde99 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 77e3dbdb2..bce8f70e9 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 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 964de0086..20a8df75e 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 +#include + +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 -#include - 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 041a829a9..f68282dcf 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 // 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 f05229b81..b8e40a448 100644 --- a/src/core/content_main_delegate_qt.cpp +++ b/src/core/content_main_delegate_qt.cpp @@ -54,6 +54,8 @@ #include +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 cae21c0b5..f2f13d351 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 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 fd8cebb9e..5deadf185 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 4b29a82b7..923cac79d 100644 --- a/src/core/custom_protocol_handler.h +++ b/src/core/custom_protocol_handler.h @@ -44,9 +44,6 @@ #include #include // 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 edc8000c9..591cad32e 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 dbcdf2a60..0079095d8 100644 --- a/src/core/custom_url_scheme_handler.h +++ b/src/core/custom_url_scheme_handler.h @@ -42,12 +42,14 @@ #include #include +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 6731a6a0d..6f79d4952 100644 --- a/src/core/delegated_frame_node.cpp +++ b/src/core/delegated_frame_node.cpp @@ -76,6 +76,8 @@ #include #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, QListPostTask(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 5b361e99d..60a1535d2 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 fa1835afb..6469ad8c2 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 84397f998..c9768d940 100644 --- a/src/core/desktop_screen_qt.h +++ b/src/core/desktop_screen_qt.h @@ -41,6 +41,8 @@ #include +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 8a70c3e10..964d6ad38 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 ec934ce35..902e99507 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 40b17da76..e84ca5f2c 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 a2511fce7..fea965749 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 43ed262b5..c87a61405 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 c7eab8f2a..8e1f86cd1 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 670aeaa12..504c5783e 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 603dae90f..fdcd7bdbc 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(content::JAVASCRIPT_MESSAGE_TYPE_PROMPT) == static_cast(WebContentsAdapterClient::PromptDialog), "These enums should be in sync."); JavaScriptDialogManagerQt *JavaScriptDialogManagerQt::GetInstance() @@ -101,3 +103,5 @@ QSharedPointer 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 e9b72d212..4682ce5b8 100644 --- a/src/core/javascript_dialog_manager_qt.h +++ b/src/core/javascript_dialog_manager_qt.h @@ -45,11 +45,13 @@ #include #include -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 a19ffa644..e33179412 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::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 facf4b769..15b2e0520 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 55dd9a996..6866afc41 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 d91c646f1..500fe7644 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 3ea8bd286..4e726fec8 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 bda905025..4f4097fd3 100644 --- a/src/core/network_delegate_qt.h +++ b/src/core/network_delegate_qt.h @@ -44,6 +44,8 @@ #include #include // Needed for Q_DECL_OVERRIDE +namespace QtWebEngineCore { + class NetworkDelegateQt : public net::NetworkDelegate { public: NetworkDelegateQt() {} @@ -73,4 +75,6 @@ public: QSet m_activeRequests; }; +} // namespace QtWebEngineCore + #endif // NETWORK_DELEGATE_QT_H diff --git a/src/core/process_main.cpp b/src/core/process_main.cpp index 457d7d838..1a67417fb 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 0ab823bd6..507d4a844 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 d9e191fdb..d1c1ee4b2 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 3d33ee277..ff44bd970 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 741bd4037..97d001ed6 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 203cfcf61..148fcb9da 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 8be7c5d42..78fcce2d5 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -79,6 +79,8 @@ #include #include +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 ba2dcb557..19b551b71 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 1aae6bed8..a12f3055e 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 242c8ef6d..e1333144a 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 0a89e050d..dcb4e7fcb 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 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 ebebb01e9..3d844bf0d 100644 --- a/src/core/renderer/web_channel_ipc_transport.cpp +++ b/src/core/renderer/web_channel_ipc_transport.cpp @@ -48,6 +48,8 @@ #include +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 8074c2302..69a02f7ea 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 04ab4715a..acd8ba4b9 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 c0bbbe4c4..48dc3d583 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 fe7df996a..faed58954 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 7395ec351..2cba210d3 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 14e46b946..86a6a92d4 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(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 bd4eba3c9..ea906e64f 100644 --- a/src/core/surface_factory_qt.h +++ b/src/core/surface_factory_qt.h @@ -43,6 +43,8 @@ #include +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 0e34c68e6..66fcd4dd0 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 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 2536e9ddb..dec6b4dbb 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 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 8e8d91596..d08836714 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 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 f206955f1..105f90746 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 c47358e71..448bfe6af 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 fcb2220bc..d324da347 100644 --- a/src/core/url_request_custom_job_delegate.cpp +++ b/src/core/url_request_custom_job_delegate.cpp @@ -41,6 +41,8 @@ #include +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 e82debdf2..e0b802897 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 bd6875895..617b894ea 100644 --- a/src/core/url_request_qrc_job_qt.cpp +++ b/src/core/url_request_qrc_job_qt.cpp @@ -47,6 +47,7 @@ #include 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 973b7731a..cd8362574 100644 --- a/src/core/url_request_qrc_job_qt.h +++ b/src/core/url_request_qrc_job_qt.h @@ -43,6 +43,8 @@ #include // Needed for Q_DECL_OVERRIDE #include +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 7e88f9223..a94b8f16d 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 17de212ea..a20ac1898 100644 --- a/src/core/user_script.h +++ b/src/core/user_script.h @@ -44,9 +44,12 @@ #include #include -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 bf1248577..69284dbe1 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 790d40912..293b5d2dd 100644 --- a/src/core/user_script_controller_host.h +++ b/src/core/user_script_controller_host.h @@ -43,12 +43,15 @@ #include #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 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 ce673494c..ecc49ab5f 100644 --- a/src/core/web_channel_ipc_transport_host.cpp +++ b/src/core/web_channel_ipc_transport_host.cpp @@ -44,6 +44,8 @@ #include #include +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 a30cab088..9c21116f1 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 - QT_FORWARD_DECLARE_CLASS(QString) +namespace QtWebEngineCore { + class WebChannelIPCTransportHost : public QWebChannelAbstractTransport , public content::WebContentsObserver { @@ -62,4 +63,6 @@ private: void onWebChannelMessage(const std::vector &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 848e8086e..c5cd83c6e 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -80,6 +80,8 @@ #include #include +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 b4b4e80a6..f4b434353 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 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 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 5a199a470..2efacb460 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 6ddff47a5..52bade3a5 100644 --- a/src/core/web_contents_adapter_p.h +++ b/src/core/web_contents_adapter_p.h @@ -44,14 +44,18 @@ #include +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 de4487576..dd56bf2af 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 868d3e514..a200ca4df 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 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 41417d205..932170634 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 3a0376a51..896955f7d 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 2e6abd697..5d8fe79e6 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -83,6 +83,8 @@ #include #include +using namespace QtWebEngineCore; + namespace { scoped_refptr sContext; diff --git a/src/core/web_engine_context.h b/src/core/web_engine_context.h index fc9478a97..dbd8f2476 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 { public: static scoped_refptr current(); - BrowserContextAdapter *defaultBrowserContext(); - BrowserContextAdapter *offTheRecordBrowserContext(); + QtWebEngineCore::BrowserContextAdapter *defaultBrowserContext(); + QtWebEngineCore::BrowserContextAdapter *offTheRecordBrowserContext(); private: friend class base::RefCounted; @@ -69,15 +71,15 @@ private: ~WebEngineContext(); scoped_ptr m_runLoop; - scoped_ptr m_mainDelegate; + scoped_ptr m_mainDelegate; scoped_ptr m_contentRunner; scoped_ptr m_browserRunner; #if defined(OS_ANDROID) - scoped_ptr m_surfaceFactory; + scoped_ptr m_surfaceFactory; #endif - QExplicitlySharedDataPointer m_defaultBrowserContext; - QExplicitlySharedDataPointer m_offTheRecordBrowserContext; - scoped_ptr m_devtools; + QExplicitlySharedDataPointer m_defaultBrowserContext; + QExplicitlySharedDataPointer m_offTheRecordBrowserContext; + scoped_ptr 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 07c97ef79..ce862aae6 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 3c2975758..74c60b778 100644 --- a/src/core/web_engine_settings.cpp +++ b/src/core/web_engine_settings.cpp @@ -44,6 +44,8 @@ #include #include +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 bffb5b2fe..e9d8010a8 100644 --- a/src/core/web_engine_settings.h +++ b/src/core/web_engine_settings.h @@ -45,13 +45,13 @@ #include #include -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 85c8b1e13..deee26523 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 f64237773..afbc414a3 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 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 c1eaaadb1..c38f5ea1c 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 9d054f5e0..fe45ca2a3 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 #include 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 3b6d7bb2f..9a737fbbe 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 02f29b35b..cb6aff2bc 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 2ad2af26f..0d714b1b6 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 a24ce3b79..062a2fa33 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 m_adapter; + QExplicitlySharedDataPointer m_adapter; friend class QQuickWebEngineViewPrivate; }; diff --git a/src/webengine/api/qquickwebengineprofile.cpp b/src/webengine/api/qquickwebengineprofile.cpp index 36992ca9f..718007c35 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 a18d81be4..ee91d7728 100644 --- a/src/webengine/api/qquickwebengineprofile_p.h +++ b/src/webengine/api/qquickwebengineprofile_p.h @@ -43,6 +43,10 @@ #include #include +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 4810cec77..0cf11acec 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 m_settings; - BrowserContextAdapter *m_browserContext; - QExplicitlySharedDataPointer m_browserContextRef; + QtWebEngineCore::BrowserContextAdapter *m_browserContext; + QExplicitlySharedDataPointer m_browserContextRef; QMap > m_ongoingDownloads; }; diff --git a/src/webengine/api/qquickwebenginescript.cpp b/src/webengine/api/qquickwebenginescript.cpp index 872ba1533..8d42d77a3 100644 --- a/src/webengine/api/qquickwebenginescript.cpp +++ b/src/webengine/api/qquickwebenginescript.cpp @@ -41,6 +41,8 @@ #include #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 a42aed41b..4992105fa 100644 --- a/src/webengine/api/qquickwebenginescript_p.h +++ b/src/webengine/api/qquickwebenginescript_p.h @@ -40,9 +40,6 @@ #include #include -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 d_ptr; }; QT_END_NAMESPACE diff --git a/src/webengine/api/qquickwebenginescript_p_p.h b/src/webengine/api/qquickwebenginescript_p_p.h index 962a04cb2..7b5626fd1 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 343ffef0e..70a9d4b59 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 40d04fdf8..68c85ea7f 100644 --- a/src/webengine/api/qquickwebenginesettings_p.h +++ b/src/webengine/api/qquickwebenginesettings_p.h @@ -41,7 +41,9 @@ #include #include +namespace QtWebEngineCore { class WebEngineSettings; +} QT_BEGIN_NAMESPACE @@ -111,7 +113,7 @@ private: void setParentSettings(QQuickWebEngineSettings *parentSettings); - QScopedPointer d_ptr; + QScopedPointer d_ptr; }; QT_END_NAMESPACE diff --git a/src/webengine/api/qquickwebengineview.cpp b/src/webengine/api/qquickwebengineview.cpp index 13eb63e07..1430d72b3 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 faf567d3a..0111d4be4 100644 --- a/src/webengine/api/qquickwebengineview_p_p.h +++ b/src/webengine/api/qquickwebengineview_p_p.h @@ -46,8 +46,10 @@ #include #include +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) Q_DECL_OVERRIDE; + virtual void javascriptDialog(QSharedPointer) 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 &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 *p, int idx); static void userScripts_clear(QQmlListProperty *p); - QExplicitlySharedDataPointer adapter; + QExplicitlySharedDataPointer adapter; QScopedPointer e; QScopedPointer v; QScopedPointer m_history; @@ -203,7 +205,7 @@ public: QSharedPointer m_certificateErrorController; private: - QScopedPointer m_uIDelegatesManager; + QScopedPointer m_uIDelegatesManager; QList 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 bfcda558b..0a534ac2c 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 #include +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 cb1b6a83f..ddd0e4d9e 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 +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 c395fdd4d..39c48ea5c 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 +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 6bd21d15a..cda51a1ab 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 #include +namespace QtWebEngineCore { + class RenderWidgetHostViewQtDelegateQuickWindow : public QQuickWindow , public RenderWidgetHostViewQtDelegate { public: @@ -76,4 +78,6 @@ private: QScopedPointer 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 23816caff..615c6024d 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 e0eeb4679..b43006381 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 ecf682edd..703570587 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 e3e8a7d44..40c7c6b49 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 bdce04978..8b83856b0 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 dc07ce2c6..b6da844d8 100644 --- a/src/webenginewidgets/api/qwebenginepage_p.h +++ b/src/webenginewidgets/api/qwebenginepage_p.h @@ -44,8 +44,10 @@ #include #include +namespace QtWebEngineCore { class RenderWidgetHostViewQtDelegate; class WebContentsAdapter; +} QT_BEGIN_NAMESPACE class QWebEngineHistory; @@ -97,7 +99,7 @@ private: QHash 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) Q_DECL_OVERRIDE; + virtual void javascriptDialog(QSharedPointer) 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 &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 adapter; + QExplicitlySharedDataPointer 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 e2441ca54..eb502d050 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 6f2d53a81..6ae9f9ca9 100644 --- a/src/webenginewidgets/api/qwebengineprofile_p.h +++ b/src/webenginewidgets/api/qwebengineprofile_p.h @@ -44,19 +44,21 @@ #include #include +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 m_browserContextRef; + QtWebEngineCore::BrowserContextAdapter *m_browserContext; + QExplicitlySharedDataPointer m_browserContextRef; QMap > m_ongoingDownloads; QMap > m_urlSchemeHandlers; }; diff --git a/src/webenginewidgets/api/qwebenginescript.cpp b/src/webenginewidgets/api/qwebenginescript.cpp index 63459992b..c658c5092 100644 --- a/src/webenginewidgets/api/qwebenginescript.cpp +++ b/src/webenginewidgets/api/qwebenginescript.cpp @@ -39,6 +39,8 @@ #include "user_script.h" #include +using QtWebEngineCore::UserScript; + QWebEngineScript::QWebEngineScript() : d(new UserScript) { diff --git a/src/webenginewidgets/api/qwebenginescript.h b/src/webenginewidgets/api/qwebenginescript.h index 735ee92e0..6eba76932 100644 --- a/src/webenginewidgets/api/qwebenginescript.h +++ b/src/webenginewidgets/api/qwebenginescript.h @@ -41,7 +41,10 @@ #include #include +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 d; + QSharedDataPointer d; }; Q_DECLARE_SHARED(QWebEngineScript) diff --git a/src/webenginewidgets/api/qwebenginescriptcollection.cpp b/src/webenginewidgets/api/qwebenginescriptcollection.cpp index ffbb9052e..2f1f31b0e 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 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 baf09dbb4..9a3a425ba 100644 --- a/src/webenginewidgets/api/qwebenginescriptcollection_p.h +++ b/src/webenginewidgets/api/qwebenginescriptcollection_p.h @@ -43,13 +43,15 @@ #include +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 f7dcafa59..dadc3bfe1 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 ff8fad25e..44339a2f6 100644 --- a/src/webenginewidgets/api/qwebenginesettings.h +++ b/src/webenginewidgets/api/qwebenginesettings.h @@ -25,7 +25,9 @@ #include #include +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 d_ptr; diff --git a/src/webenginewidgets/api/qwebengineurlrequestjob.cpp b/src/webenginewidgets/api/qwebengineurlrequestjob.cpp index e937a5bba..cb8b200a2 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 3aea80d2f..72c9dc836 100644 --- a/src/webenginewidgets/api/qwebengineurlrequestjob_p.h +++ b/src/webenginewidgets/api/qwebengineurlrequestjob_p.h @@ -43,7 +43,9 @@ #include #include +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 ccb92258b..16ad220b2 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 6146cc05e..b15171edc 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 252b13fa4..865d0f93f 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 #include +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 54fdf3b29..d0dfdc689 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 #endif +namespace QtWebEngineCore { + class RenderWidgetHostViewQtDelegateWidget : public QOpenGLWidget, public RenderWidgetHostViewQtDelegate { Q_OBJECT public: @@ -99,4 +101,6 @@ private: QList m_windowConnections; }; +} // namespace QtWebEngineCore + #endif -- cgit v1.2.3