2019-02-04 15:54:55 +00:00
|
|
|
// Copyright (c) 2019 GitHub, Inc.
|
|
|
|
// Use of this source code is governed by the MIT license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#include "atom/app/manifests.h"
|
|
|
|
|
|
|
|
#include "base/no_destructor.h"
|
2019-04-02 22:38:16 +00:00
|
|
|
#include "electron/atom/common/api/api.mojom.h"
|
2019-02-04 15:54:55 +00:00
|
|
|
#include "printing/buildflags/buildflags.h"
|
2019-02-14 18:26:43 +00:00
|
|
|
#include "services/proxy_resolver/public/cpp/manifest.h"
|
2019-02-04 15:54:55 +00:00
|
|
|
#include "services/service_manager/public/cpp/manifest_builder.h"
|
|
|
|
|
|
|
|
#if BUILDFLAG(ENABLE_PRINTING)
|
2019-02-14 18:26:43 +00:00
|
|
|
#include "components/services/pdf_compositor/public/cpp/manifest.h"
|
2019-02-04 15:54:55 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
2019-02-14 18:26:43 +00:00
|
|
|
#include "chrome/services/printing/public/cpp/manifest.h"
|
2019-02-04 15:54:55 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
const service_manager::Manifest& GetElectronContentBrowserOverlayManifest() {
|
|
|
|
static base::NoDestructor<service_manager::Manifest> manifest{
|
|
|
|
service_manager::ManifestBuilder()
|
|
|
|
.WithDisplayName("Electron (browser process)")
|
|
|
|
.RequireCapability("device", "device:geolocation_control")
|
|
|
|
.RequireCapability("proxy_resolver", "factory")
|
|
|
|
.RequireCapability("chrome_printing", "converter")
|
|
|
|
.RequireCapability("pdf_compositor", "compositor")
|
2019-04-02 22:38:16 +00:00
|
|
|
.ExposeInterfaceFilterCapability_Deprecated(
|
|
|
|
"navigation:frame", "renderer",
|
|
|
|
service_manager::Manifest::InterfaceList<
|
|
|
|
atom::mojom::ElectronBrowser>())
|
2019-02-04 15:54:55 +00:00
|
|
|
.Build()};
|
|
|
|
return *manifest;
|
|
|
|
}
|
|
|
|
|
|
|
|
const std::vector<service_manager::Manifest>&
|
|
|
|
GetElectronPackagedServicesOverlayManifest() {
|
|
|
|
static base::NoDestructor<std::vector<service_manager::Manifest>> manifests{{
|
|
|
|
proxy_resolver::GetManifest(),
|
|
|
|
#if BUILDFLAG(ENABLE_PRINTING)
|
2019-02-14 18:26:43 +00:00
|
|
|
printing::GetPdfCompositorManifest(),
|
2019-02-04 15:54:55 +00:00
|
|
|
#endif
|
|
|
|
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
2019-02-14 18:26:43 +00:00
|
|
|
GetChromePrintingManifest(),
|
2019-02-04 15:54:55 +00:00
|
|
|
#endif
|
|
|
|
}};
|
|
|
|
return *manifests;
|
|
|
|
}
|