Files
brave-core/browser/brave_browser_process.h
T
Aleksei Seren 0054da9a35 [ads] Brave Ads buildflag for /browser & /chromium_src (#33212)
* [ads] Brave Ads buildflag for `/browser` & `/chromium_src`

The PR adds Brave Ads buildflag checks to
`/browser` and `/chromium_src` directories code
which depends on Brave Ads. This is a pre-requisite
 for moving Brave Ads code under a build flag.

* Handle remaining brave_ads deps and includes

* Fix deps for `chrome/browser/prefs:impl`
2026-01-16 12:02:01 -05:00

133 lines
4.2 KiB
C++

/* Copyright (c) 2021 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
// This interface is for managing the global services of the application. Each
// service is lazily created when requested the first time. The service getters
// will return NULL if the service is not available, so callers must check for
// this condition.
#ifndef BRAVE_BROWSER_BRAVE_BROWSER_PROCESS_H_
#define BRAVE_BROWSER_BRAVE_BROWSER_PROCESS_H_
#include "brave/components/brave_ads/buildflags/buildflags.h"
#include "brave/components/brave_vpn/common/buildflags/buildflags.h"
#include "brave/components/request_otr/common/buildflags/buildflags.h"
#include "brave/components/speedreader/common/buildflags/buildflags.h"
#include "brave/components/tor/buildflags/buildflags.h"
#include "build/build_config.h"
#include "extensions/buildflags/buildflags.h"
namespace brave {
class BraveReferralsService;
class URLSanitizerComponentInstaller;
} // namespace brave
#if BUILDFLAG(ENABLE_BRAVE_VPN)
namespace brave_vpn {
class BraveVPNConnectionManager;
} // namespace brave_vpn
#endif
namespace brave_component_updater {
class LocalDataFilesService;
} // namespace brave_component_updater
namespace brave_shields {
class AdBlockService;
} // namespace brave_shields
namespace brave_stats {
class BraveStatsUpdater;
} // namespace brave_stats
namespace debounce {
class DebounceComponentInstaller;
} // namespace debounce
namespace https_upgrade_exceptions {
class HttpsUpgradeExceptionsService;
} // namespace https_upgrade_exceptions
namespace misc_metrics {
class ProcessMiscMetrics;
} // namespace misc_metrics
namespace request_otr {
#if BUILDFLAG(ENABLE_REQUEST_OTR)
class RequestOTRComponentInstallerPolicy;
#endif
} // namespace request_otr
namespace ntp_background_images {
class NTPBackgroundImagesService;
} // namespace ntp_background_images
namespace p3a {
class P3AService;
} // namespace p3a
namespace tor {
class BraveTorClientUpdater;
class BraveTorPluggableTransportUpdater;
} // namespace tor
namespace speedreader {
class SpeedreaderRewriterService;
}
#if BUILDFLAG(ENABLE_BRAVE_ADS)
namespace brave_ads {
class BraveStatsHelper;
class ResourceComponent;
} // namespace brave_ads
#endif // BUILDFLAG(ENABLE_BRAVE_ADS)
class BraveBrowserProcess {
public:
BraveBrowserProcess();
virtual ~BraveBrowserProcess();
virtual void StartBraveServices() = 0;
virtual brave_shields::AdBlockService* ad_block_service() = 0;
virtual https_upgrade_exceptions::HttpsUpgradeExceptionsService*
https_upgrade_exceptions_service() = 0;
virtual debounce::DebounceComponentInstaller*
debounce_component_installer() = 0;
#if BUILDFLAG(ENABLE_REQUEST_OTR)
virtual request_otr::RequestOTRComponentInstallerPolicy*
request_otr_component_installer() = 0;
#endif
virtual brave::URLSanitizerComponentInstaller*
URLSanitizerComponentInstaller() = 0;
virtual brave_component_updater::LocalDataFilesService*
local_data_files_service() = 0;
#if BUILDFLAG(ENABLE_TOR)
virtual tor::BraveTorClientUpdater* tor_client_updater() = 0;
virtual tor::BraveTorPluggableTransportUpdater*
tor_pluggable_transport_updater() = 0;
#endif
virtual p3a::P3AService* p3a_service() = 0;
virtual brave::BraveReferralsService* brave_referrals_service() = 0;
virtual brave_stats::BraveStatsUpdater* brave_stats_updater() = 0;
#if BUILDFLAG(ENABLE_BRAVE_ADS)
virtual brave_ads::BraveStatsHelper* ads_brave_stats_helper() = 0;
virtual brave_ads::ResourceComponent* resource_component() = 0;
#endif // BUILDFLAG(ENABLE_BRAVE_ADS)
virtual ntp_background_images::NTPBackgroundImagesService*
ntp_background_images_service() = 0;
#if BUILDFLAG(ENABLE_SPEEDREADER)
virtual speedreader::SpeedreaderRewriterService*
speedreader_rewriter_service() = 0;
#endif
#if BUILDFLAG(ENABLE_BRAVE_VPN)
virtual brave_vpn::BraveVPNConnectionManager*
brave_vpn_connection_manager() = 0;
#endif
virtual misc_metrics::ProcessMiscMetrics* process_misc_metrics() = 0;
};
extern BraveBrowserProcess* g_brave_browser_process;
#endif // BRAVE_BROWSER_BRAVE_BROWSER_PROCESS_H_