diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2021-06-16 11:10:33 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-06-17 18:45:28 +0000 |
commit | 267ea323460766b146cf68d8446b8ea7c45f754f (patch) | |
tree | c83490a80dd0243046b429c4eaf7aec30220b8c9 /src | |
parent | 1f5b21e5c7fd37b5736c3654a0173361d94cb00d (diff) |
Clean up header includes and friend classes in core
Change-Id: I394821d57a9cf379869d3611996c8394fbc6c60e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 450a491b2d6c74512a3f30c0fb15eabd51e15cbc)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/download_manager_delegate_qt.h | 1 | ||||
-rw-r--r-- | src/core/profile_qt.h | 8 | ||||
-rw-r--r-- | src/core/web_contents_adapter.cpp | 37 | ||||
-rw-r--r-- | src/core/web_contents_adapter.h | 23 | ||||
-rw-r--r-- | src/core/web_contents_view_qt.cpp | 12 | ||||
-rw-r--r-- | src/core/web_contents_view_qt.h | 3 | ||||
-rw-r--r-- | src/webenginequick/api/qquickwebengineview.cpp | 1 |
7 files changed, 30 insertions, 55 deletions
diff --git a/src/core/download_manager_delegate_qt.h b/src/core/download_manager_delegate_qt.h index eda1e4f21..7b8de08df 100644 --- a/src/core/download_manager_delegate_qt.h +++ b/src/core/download_manager_delegate_qt.h @@ -103,7 +103,6 @@ private: base::WeakPtrFactory<DownloadManagerDelegateQt> m_weakPtrFactory; friend class DownloadManagerDelegateInstance; - friend class ProfileAdapter; DISALLOW_COPY_AND_ASSIGN(DownloadManagerDelegateQt); }; diff --git a/src/core/profile_qt.h b/src/core/profile_qt.h index 349532939..e32c409f1 100644 --- a/src/core/profile_qt.h +++ b/src/core/profile_qt.h @@ -122,9 +122,6 @@ public: bool ensureDirectoryExists(); private: - friend class ContentBrowserClientQt; - friend class ProfileIODataQt; - friend class WebContentsAdapter; std::unique_ptr<BrowsingDataRemoverDelegateQt> m_removerDelegate; std::unique_ptr<PermissionManagerQt> m_permissionManager; std::unique_ptr<SSLHostStateDelegateQt> m_sslHostStateDelegate; @@ -134,11 +131,12 @@ private: ProfileAdapter *m_profileAdapter; PrefServiceAdapter m_prefServiceAdapter; - friend class ProfileAdapter; #if BUILDFLAG(ENABLE_EXTENSIONS) extensions::ExtensionSystemQt *m_extensionSystem; #endif //ENABLE_EXTENSIONS - friend class BrowserContextAdapter; + + friend class ProfileAdapter; + friend class ProfileIODataQt; DISALLOW_COPY_AND_ASSIGN(ProfileQt); }; diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 4c156644d..dd506f1e1 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -48,13 +48,8 @@ #include "favicon_driver_qt.h" #include "favicon_service_factory_qt.h" #include "media_capture_devices_dispatcher.h" -#if QT_CONFIG(webengine_printing_and_pdf) -#include "printing/print_view_manager_qt.h" -#endif -#include "profile_adapter_client.h" #include "profile_adapter.h" #include "profile_qt.h" -#include "qwebenginecallback_p.h" #include "qwebengineloadinginfo.h" #include "renderer_host/web_engine_page_host.h" #include "render_widget_host_view_qt.h" @@ -65,7 +60,6 @@ #include "base/command_line.h" #include "base/metrics/user_metrics.h" -#include "base/run_loop.h" #include "base/task/current_thread.h" #include "base/task/post_task.h" #include "base/task/sequence_manager/sequence_manager_impl.h" @@ -76,7 +70,6 @@ #include "content/browser/renderer_host/render_view_host_impl.h" #include "content/browser/renderer_host/text_input_manager.h" #include "content/browser/web_contents/web_contents_impl.h" -#include "content/public/browser/browser_task_traits.h" #include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/devtools_agent_host.h" #include "content/public/browser/download_manager.h" @@ -85,24 +78,23 @@ #include "content/public/browser/navigation_entry.h" #include "content/public/browser/render_view_host.h" #include "content/public/browser/favicon_status.h" -#include "content/public/common/content_constants.h" #include "content/public/common/content_switches.h" #include "content/public/common/drop_data.h" -#include "content/public/common/page_zoom.h" -#include "content/public/common/url_constants.h" #include "extensions/buildflags/buildflags.h" #include "third_party/blink/public/common/page/page_zoom.h" #include "third_party/blink/public/common/page_state/page_state.h" #include "third_party/blink/public/common/peerconnection/webrtc_ip_handling_policy.h" #include "third_party/blink/public/common/web_preferences/web_preferences.h" #include "third_party/blink/public/mojom/frame/media_player_action.mojom.h" -#include "printing/buildflags/buildflags.h" -#include "ui/base/clipboard/clipboard.h" #include "ui/base/clipboard/clipboard_constants.h" #include "ui/base/clipboard/custom_data_helper.h" #include "ui/gfx/font_render_params.h" #include "qtwebengine/browser/qtwebenginepage.mojom.h" +#if QT_CONFIG(webengine_printing_and_pdf) +#include "printing/print_view_manager_qt.h" +#endif + #if QT_CONFIG(webengine_webchannel) #include "renderer_host/web_channel_ipc_transport_host.h" #include <QtWebChannel/QWebChannel> @@ -112,19 +104,16 @@ #include "extensions/extension_web_contents_observer_qt.h" #endif -#include <QDir> -#include <QGuiApplication> -#include <QPageLayout> -#include <QStringList> -#include <QStyleHints> -#include <QTimer> -#include <QVariant> -#include <QtCore/qelapsedtimer.h> -#include <QtCore/qmimedata.h> -#include <QtCore/qtemporarydir.h> -#include <QtGui/qdrag.h> +#include <QtCore/QVariant> +#include <QtCore/QElapsedTimer> +#include <QtCore/QMimeData> +#include <QtCore/QTemporaryDir> +#include <QtGui/QDrag> #include <QtGui/QDragEnterEvent> -#include <QtGui/qpixmap.h> +#include <QtGui/QGuiApplication> +#include <QtGui/QPageLayout> +#include <QtGui/QPixmap> +#include <QtGui/QStyleHints> // Can't include headers as qaccessible.h conflicts with Chromium headers. namespace content { diff --git a/src/core/web_contents_adapter.h b/src/core/web_contents_adapter.h index f4905e1d4..e9ee6f104 100644 --- a/src/core/web_contents_adapter.h +++ b/src/core/web_contents_adapter.h @@ -51,18 +51,18 @@ #ifndef WEB_CONTENTS_ADAPTER_H #define WEB_CONTENTS_ADAPTER_H -#include <QtWebEngineCore/private/qtwebenginecoreglobal_p.h> -#include <QtWebEngineCore/private/qwebenginecontextmenurequest_p.h> -#include "web_contents_adapter_client.h" -#include <memory> +#include <QtCore/QSharedPointer> +#include <QtCore/QString> +#include <QtCore/QUrl> +#include <QtCore/QPointer> #include <QtGui/qtgui-config.h> +#include <QtWebEngineCore/private/qtwebenginecoreglobal_p.h> +#include <QtWebEngineCore/qwebenginecontextmenurequest.h> #include <QtWebEngineCore/qwebenginehttprequest.h> -#include <QScopedPointer> -#include <QSharedPointer> -#include <QString> -#include <QUrl> -#include <QPointer> +#include "web_contents_adapter_client.h" + +#include <memory> namespace blink { namespace web_pref { @@ -72,7 +72,6 @@ struct WebPreferences; namespace content { class WebContents; -struct OpenURLParams; class SiteInstance; } @@ -83,7 +82,6 @@ class QDragMoveEvent; class QDropEvent; class QMimeData; class QPageLayout; -class QString; class QTemporaryDir; class QWebChannel; class QWebEngineUrlRequestInterceptor; @@ -92,13 +90,10 @@ QT_END_NAMESPACE namespace QtWebEngineCore { class DevToolsFrontendQt; -class FaviconManager; class FindTextHelper; -class MessagePassingInterface; class ProfileQt; class WebEnginePageHost; class WebChannelIPCTransportHost; -class WebEngineContext; class Q_WEBENGINECORE_PRIVATE_EXPORT WebContentsAdapter : public QEnableSharedFromThis<WebContentsAdapter> { public: diff --git a/src/core/web_contents_view_qt.cpp b/src/core/web_contents_view_qt.cpp index 10154e733..1fa2dfd7d 100644 --- a/src/core/web_contents_view_qt.cpp +++ b/src/core/web_contents_view_qt.cpp @@ -39,20 +39,13 @@ #include "web_contents_view_qt.h" -#include "profile_adapter.h" -#include "content_browser_client_qt.h" #include "render_widget_host_view_qt.h" #include "render_widget_host_view_qt_delegate.h" -#include "render_widget_host_view_qt.h" #include "touch_selection_controller_client_qt.h" #include "type_conversion.h" #include "web_contents_adapter.h" -#include "web_engine_context.h" -#include "web_contents_delegate_qt.h" +#include "web_contents_adapter_client.h" -#include "components/spellcheck/spellcheck_buildflags.h" -#include "content/browser/renderer_host/render_view_host_impl.h" -#include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/browser/web_contents/web_contents_impl.h" #include "content/public/browser/context_menu_params.h" #include "content/public/browser/web_contents_delegate.h" @@ -60,7 +53,8 @@ #include "third_party/blink/public/common/context_menu_data/media_type.h" #include "ui/gfx/image/image_skia.h" -#include <QtGui/qpixmap.h> +#include <QtGui/QPixmap> +#include <QtWebEngineCore/private/qwebenginecontextmenurequest_p.h> namespace QtWebEngineCore { diff --git a/src/core/web_contents_view_qt.h b/src/core/web_contents_view_qt.h index ff3b9d632..707c90b9c 100644 --- a/src/core/web_contents_view_qt.h +++ b/src/core/web_contents_view_qt.h @@ -43,8 +43,7 @@ #include "content/browser/renderer_host/render_view_host_delegate_view.h" #include "content/browser/web_contents/web_contents_view.h" -#include "api/qtwebenginecoreglobal_p.h" -#include "web_contents_adapter_client.h" +#include <QtWebEngineCore/private/qtwebenginecoreglobal_p.h> QT_FORWARD_DECLARE_CLASS(QWebEngineContextMenuRequest) diff --git a/src/webenginequick/api/qquickwebengineview.cpp b/src/webenginequick/api/qquickwebengineview.cpp index 8b3c32d7c..abfd0b79f 100644 --- a/src/webenginequick/api/qquickwebengineview.cpp +++ b/src/webenginequick/api/qquickwebengineview.cpp @@ -62,6 +62,7 @@ #include "qwebenginenewwindowrequest.h" #include "qwebenginequotarequest.h" #include "qwebenginescriptcollection.h" +#include <QtWebEngineCore/private/qwebenginecontextmenurequest_p.h> #include <QtWebEngineCore/private/qwebenginehistory_p.h> #include <QtWebEngineCore/private/qwebenginescriptcollection_p.h> #include "qwebengineregisterprotocolhandlerrequest.h" |