fix: opt into location services once device service has been started (backport: 3-0-x) (#14289)
* fix: opt into location services once device service has been started (#14253) * fix: opt into location services once device service has been started * refactor: provide fake location provider to mock geolocation reponses * chore: add spec for navigator.geolocation api using fake location provider * fix conflict
This commit is contained in:
parent
1f7fd985dd
commit
4721dc0856
13 changed files with 209 additions and 10 deletions
|
@ -31,6 +31,14 @@ bool IsPDFViewerEnabled() {
|
|||
#endif
|
||||
}
|
||||
|
||||
bool IsFakeLocationProviderEnabled() {
|
||||
#if defined(OVERRIDE_LOCATION_PROVIDER)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void Initialize(v8::Local<v8::Object> exports,
|
||||
v8::Local<v8::Value> unused,
|
||||
v8::Local<v8::Context> context,
|
||||
|
@ -39,6 +47,8 @@ void Initialize(v8::Local<v8::Object> exports,
|
|||
dict.SetMethod("isDesktopCapturerEnabled", &IsDesktopCapturerEnabled);
|
||||
dict.SetMethod("isOffscreenRenderingEnabled", &IsOffscreenRenderingEnabled);
|
||||
dict.SetMethod("isPDFViewerEnabled", &IsPDFViewerEnabled);
|
||||
dict.SetMethod("isFakeLocationProviderEnabled",
|
||||
&IsFakeLocationProviderEnabled);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue