diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp index 03f5a10fb177346269538aaf575430c544a98bed..83b4e7cb500ec38e98185b2eea70d6efc498f88f 100644 --- a/src/core/content_browser_client_qt.cpp +++ b/src/core/content_browser_client_qt.cpp @@ -72,7 +72,6 @@ #include "mojo/public/cpp/bindings/binding_set.h" #include "printing/buildflags/buildflags.h" #include "net/ssl/client_cert_identity.h" -#include "services/device/public/cpp/geolocation/location_provider.h" #include "services/resource_coordinator/public/cpp/process_resource_coordinator.h" #include "services/resource_coordinator/public/cpp/resource_coordinator_features.h" #include "services/service_manager/public/cpp/connector.h" @@ -767,14 +766,12 @@ bool ContentBrowserClientQt::CanCreateWindow( return (settings && settings->getJavaScriptCanOpenWindowsAutomatically()) || user_gesture; } +#if QT_CONFIG(webengine_geolocation) std::unique_ptr<device::LocationProvider> ContentBrowserClientQt::OverrideSystemLocationProvider() { -#if QT_CONFIG(webengine_geolocation) return base::WrapUnique(new LocationProviderQt()); -#else - return nullptr; -#endif } +#endif scoped_refptr<net::URLRequestContextGetter> GetSystemRequestContextOnUIThread() { diff --git a/src/core/content_browser_client_qt.h b/src/core/content_browser_client_qt.h index 330024831ec16e2ba7c25744b3c452953a566935..4d25ddf6a7662e88a1c2e61dd3536136f724e93f 100644 --- a/src/core/content_browser_client_qt.h +++ b/src/core/content_browser_client_qt.h @@ -168,7 +168,10 @@ public: content::ResourceContext *context, const std::vector<std::pair<int, int> > &render_frames) override; +#if QT_CONFIG(webengine_geolocation) std::unique_ptr<device::LocationProvider> OverrideSystemLocationProvider() override; +#endif + #if defined(Q_OS_LINUX) void GetAdditionalMappedFilesForChildProcess(const base::CommandLine& command_line, int child_process_id, content::PosixFileDescriptorInfo* mappings) override; #endif diff --git a/src/core/render_widget_host_view_qt.cpp b/src/core/render_widget_host_view_qt.cpp index a847d2c99dfd24b75c1d07d9378bf063ccfebba1..8439b9cd7a5293855c886d694b8c2c1282bbaa17 100644 --- a/src/core/render_widget_host_view_qt.cpp +++ b/src/core/render_widget_host_view_qt.cpp @@ -39,49 +39,38 @@ #include "render_widget_host_view_qt.h" -#include "common/qt_messages.h" #include "browser_accessibility_manager_qt.h" -#include "browser_accessibility_qt.h" #include "chromium_overrides.h" #include "compositor.h" #include "qtwebenginecoreglobal_p.h" #include "render_widget_host_view_qt_delegate.h" #include "type_conversion.h" -#include "web_contents_adapter.h" #include "web_contents_adapter_client.h" #include "web_event_factory.h" -#include "base/command_line.h" #include "components/viz/common/surfaces/frame_sink_id_allocator.h" -#include "components/viz/common/surfaces/parent_local_surface_id_allocator.h" -#include "components/viz/service/display/direct_renderer.h" -#include "components/viz/service/frame_sinks/frame_sink_manager_impl.h" #include "content/browser/accessibility/browser_accessibility_state_impl.h" -#include "content/browser/browser_main_loop.h" #include "content/browser/frame_host/render_frame_host_impl.h" #include "content/browser/frame_host/frame_tree.h" -#include "content/browser/renderer_host/cursor_manager.h" #include "content/browser/renderer_host/render_view_host_impl.h" #include "content/common/cursors/webcursor.h" #include "content/common/input_messages.h" -#include "content/public/browser/browser_accessibility_state.h" -#include "content/public/browser/browser_thread.h" -#include "content/public/common/content_switches.h" #include "third_party/skia/include/core/SkColor.h" #include "third_party/blink/public/platform/web_cursor_info.h" -#include "ui/base/clipboard/scoped_clipboard_writer.h" -#include "ui/base/resource/resource_bundle.h" #include "ui/events/blink/blink_event_util.h" #include "ui/events/event.h" #include "ui/events/gesture_detection/gesture_provider_config_helper.h" #include "ui/events/gesture_detection/motion_event.h" -#include "ui/events/keycodes/keyboard_codes.h" #include "ui/gfx/geometry/size_conversions.h" -#include "ui/gfx/image/image_skia.h" + +#if defined(USE_OZONE) +#include "ui/base/clipboard/scoped_clipboard_writer.h" +#endif #if defined(USE_AURA) #include "ui/base/cursor/cursor.h" #include "ui/base/cursor/cursors_aura.h" +#include "ui/base/resource/resource_bundle.h" #endif #include <private/qguiapplication_p.h> diff --git a/src/core/web_engine_context.cpp b/src/core/web_engine_context.cpp index 6fbdbec610912dab68ba7d74f9b16caf2bea954d..b7cf1344b8beb51e9996e26106adbc9d4e50d43b 100644 --- a/src/core/web_engine_context.cpp +++ b/src/core/web_engine_context.cpp @@ -53,7 +53,6 @@ #endif #include "components/viz/common/features.h" #include "components/web_cache/browser/web_cache_manager.h" -#include "content/app/content_service_manager_main_delegate.h" #include "content/browser/devtools/devtools_http_handler.h" #include "content/browser/gpu/gpu_main_thread_factory.h" #include "content/browser/renderer_host/render_process_host_impl.h"