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"
|
|
|
|
#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")
|
|
|
|
.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;
|
|
|
|
}
|