blob: 2c5012ee34b4c5d0d90eff6a79e472a855319a2f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
From 383ee1aa19b7b72c686d70f34bc9c377a51aaf5e Mon Sep 17 00:00:00 2001
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
Date: Wed, 9 May 2018 13:23:17 +0200
Subject: [PATCH] Fix build without qtlocation
Change-Id: I81ac6fcf14563a6d093c51d93754d438992ee52a
---
src/core/content_browser_client_qt.cpp | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index 30ec43ca0..3878bd1bf 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -68,6 +68,7 @@
#include "content/public/common/main_function_params.h"
#include "content/public/common/service_names.mojom.h"
#include "content/public/common/url_constants.h"
+#include "device/geolocation/public/cpp/location_provider.h"
#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "printing/features/features.h"
@@ -93,7 +94,6 @@
#include "certificate_error_controller_p.h"
#include "desktop_screen_qt.h"
#include "devtools_manager_delegate_qt.h"
-#include "location_provider_qt.h"
#include "media_capture_devices_dispatcher.h"
#include "net/network_delegate_qt.h"
#include "net/qrc_protocol_handler_qt.h"
@@ -123,6 +123,10 @@
#include "renderer_host/pepper/pepper_host_factory_qt.h"
#endif
+#if defined(QT_USE_POSITIONING)
+#include "location_provider_qt.h"
+#endif
+
#include <QGuiApplication>
#include <QLocale>
#ifndef QT_NO_OPENGL
@@ -737,7 +741,11 @@ bool ContentBrowserClientQt::CanCreateWindow(
std::unique_ptr<device::LocationProvider> ContentBrowserClientQt::OverrideSystemLocationProvider()
{
+#if defined(QT_USE_POSITIONING)
return base::WrapUnique(new LocationProviderQt());
+#else
+ return nullptr;
+#endif
}
scoped_refptr<net::URLRequestContextGetter> GetSystemRequestContextOnUIThread()
--
2.16.3
|