Port //services/device/geolocation to network::SimpleURLLoader
https://chromium-review.googlesource.com/c/chromium/src/+/1119398
This commit is contained in:
parent
63176acde2
commit
eef375a428
4 changed files with 2 additions and 16 deletions
1
BUILD.gn
1
BUILD.gn
|
@ -216,7 +216,6 @@ static_library("electron_lib") {
|
||||||
"//content/public/app:both",
|
"//content/public/app:both",
|
||||||
"//content/public/child",
|
"//content/public/child",
|
||||||
"//content/public/common:service_names",
|
"//content/public/common:service_names",
|
||||||
"//device/geolocation",
|
|
||||||
"//gin",
|
"//gin",
|
||||||
"//net:net_resources",
|
"//net:net_resources",
|
||||||
"//ppapi/host",
|
"//ppapi/host",
|
||||||
|
|
|
@ -55,12 +55,12 @@
|
||||||
#include "content/public/common/service_names.mojom.h"
|
#include "content/public/common/service_names.mojom.h"
|
||||||
#include "content/public/common/url_constants.h"
|
#include "content/public/common/url_constants.h"
|
||||||
#include "content/public/common/web_preferences.h"
|
#include "content/public/common/web_preferences.h"
|
||||||
#include "device/geolocation/public/cpp/location_provider.h"
|
|
||||||
#include "electron/buildflags/buildflags.h"
|
#include "electron/buildflags/buildflags.h"
|
||||||
#include "electron/grit/electron_resources.h"
|
#include "electron/grit/electron_resources.h"
|
||||||
#include "net/base/escape.h"
|
#include "net/base/escape.h"
|
||||||
#include "net/ssl/ssl_cert_request_info.h"
|
#include "net/ssl/ssl_cert_request_info.h"
|
||||||
#include "ppapi/host/ppapi_host.h"
|
#include "ppapi/host/ppapi_host.h"
|
||||||
|
#include "services/device/public/cpp/geolocation/location_provider.h"
|
||||||
#include "services/network/public/cpp/resource_request_body.h"
|
#include "services/network/public/cpp/resource_request_body.h"
|
||||||
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h"
|
#include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h"
|
||||||
#include "ui/base/l10n/l10n_util.h"
|
#include "ui/base/l10n/l10n_util.h"
|
||||||
|
@ -374,16 +374,6 @@ void AtomBrowserClient::DidCreatePpapiPlugin(content::BrowserPpapiHost* host) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void AtomBrowserClient::GetGeolocationRequestContext(
|
|
||||||
base::OnceCallback<void(scoped_refptr<net::URLRequestContextGetter>)>
|
|
||||||
callback) {
|
|
||||||
auto* io_thread = AtomBrowserMainParts::Get()->io_thread();
|
|
||||||
auto* context = io_thread->GetRequestContext();
|
|
||||||
base::ThreadTaskRunnerHandle::Get()->PostTask(
|
|
||||||
FROM_HERE,
|
|
||||||
base::BindOnce(std::move(callback), base::RetainedRef(context)));
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string AtomBrowserClient::GetGeolocationApiKey() {
|
std::string AtomBrowserClient::GetGeolocationApiKey() {
|
||||||
std::unique_ptr<base::Environment> env(base::Environment::Create());
|
std::unique_ptr<base::Environment> env(base::Environment::Create());
|
||||||
std::string api_key;
|
std::string api_key;
|
||||||
|
|
|
@ -69,9 +69,6 @@ class AtomBrowserClient : public brightray::BrowserClient,
|
||||||
void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
|
void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
|
||||||
int child_process_id) override;
|
int child_process_id) override;
|
||||||
void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) override;
|
void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host) override;
|
||||||
void GetGeolocationRequestContext(
|
|
||||||
base::OnceCallback<void(scoped_refptr<net::URLRequestContextGetter>)>
|
|
||||||
callback) override;
|
|
||||||
std::string GetGeolocationApiKey() override;
|
std::string GetGeolocationApiKey() override;
|
||||||
content::QuotaPermissionContext* CreateQuotaPermissionContext() override;
|
content::QuotaPermissionContext* CreateQuotaPermissionContext() override;
|
||||||
void AllowCertificateError(
|
void AllowCertificateError(
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#define ATOM_BROWSER_FAKE_LOCATION_PROVIDER_H_
|
#define ATOM_BROWSER_FAKE_LOCATION_PROVIDER_H_
|
||||||
|
|
||||||
#include "base/macros.h"
|
#include "base/macros.h"
|
||||||
#include "device/geolocation/public/cpp/location_provider.h"
|
#include "services/device/public/cpp/geolocation/location_provider.h"
|
||||||
#include "services/device/public/mojom/geoposition.mojom.h"
|
#include "services/device/public/mojom/geoposition.mojom.h"
|
||||||
|
|
||||||
namespace atom {
|
namespace atom {
|
||||||
|
|
Loading…
Reference in a new issue