# Copyright 2017 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//services/device/public/cpp/geolocation/buildflags.gni")
buildflag_header("buildflags") {
header = "buildflags.h"
flags = [ "OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED=$os_level_geolocation_permission_supported" ]
}
component("geolocation") {
sources = [
"geolocation_system_permission_manager.cc",
"geolocation_system_permission_manager.h",
"geoposition.cc",
"geoposition.h",
"location_provider.h",
"location_system_permission_status.h",
"network_location_request_source.h",
]
defines = [ "IS_GEOLOCATION_IMPL=1" ]
configs += [ "//build/config/compiler:wexit_time_destructors" ]
output_name = "geolocation_service"
deps = [ "//components/device_event_log" ]
if (os_level_geolocation_permission_supported) {
sources += [ "system_geolocation_source.h" ]
}
if (is_apple) {
sources += [
"location_manager_delegate.h",
"location_manager_delegate.mm",
"system_geolocation_source_apple.h",
"system_geolocation_source_apple.mm",
]
frameworks = [
"CoreLocation.framework",
"Foundation.framework",
]
if (is_mac) {
frameworks += [ "CoreWLAN.framework" ]
}
}
if (is_win) {
sources += [
"system_geolocation_source_win.cc",
"system_geolocation_source_win.h",
]
}
public_deps = [
":buildflags",
"//base",
"//services/device/public/cpp:device_features",
"//services/device/public/mojom",
"//services/device/public/mojom:geolocation_internals",
"//third_party/abseil-cpp:absl",
]
}