[email protected] | 3a80ea33 | 2012-01-09 19:53:29 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 4 | |
[email protected] | 88264c9 | 2009-10-01 17:17:36 | [diff] [blame] | 5 | // This interface is for managing the global services of the application. Each |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 6 | // service is lazily created when requested the first time. The service getters |
| 7 | // will return NULL if the service is not available, so callers must check for |
| 8 | // this condition. |
| 9 | |
[email protected] | bfd04a6 | 2009-02-01 18:16:56 | [diff] [blame] | 10 | #ifndef CHROME_BROWSER_BROWSER_PROCESS_H_ |
| 11 | #define CHROME_BROWSER_BROWSER_PROCESS_H_ |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 12 | |
avi | e4d7b6f | 2015-12-26 00:59:18 | [diff] [blame] | 13 | #include <stdint.h> |
| 14 | |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 15 | #include <memory> |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 16 | #include <string> |
| 17 | |
Gabriel Charette | b1af7ffb | 2017-07-27 06:10:35 | [diff] [blame] | 18 | #include "base/callback_forward.h" |
avi | e4d7b6f | 2015-12-26 00:59:18 | [diff] [blame] | 19 | #include "base/macros.h" |
Hans Wennborg | 6334445 | 2019-10-15 10:15:21 | [diff] [blame] | 20 | #include "base/memory/scoped_refptr.h" |
avi | e4d7b6f | 2015-12-26 00:59:18 | [diff] [blame] | 21 | #include "build/build_config.h" |
Yuta Hijikata | 235fc62b | 2020-12-08 03:48:32 | [diff] [blame] | 22 | #include "build/chromeos_buildflags.h" |
Toby H | 5cfaf94 | 2019-07-25 22:54:50 | [diff] [blame] | 23 | #include "chrome/common/buildflags.h" |
Scott Violet | a35f9a4 | 2018-03-22 22:00:44 | [diff] [blame] | 24 | #include "media/media_buildflags.h" |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 25 | |
[email protected] | 9e7f015f | 2011-05-28 00:24:25 | [diff] [blame] | 26 | class BackgroundModeManager; |
Hans Wennborg | 6334445 | 2019-10-15 10:15:21 | [diff] [blame] | 27 | class BrowserProcessPlatformPart; |
Greg Thompson | 08451a4 | 2020-02-04 23:45:54 | [diff] [blame] | 28 | class BuildState; |
[email protected] | 4129132 | 2010-07-15 17:09:01 | [diff] [blame] | 29 | class DownloadRequestLimiter; |
[email protected] | 073ed7b | 2010-09-27 09:20:02 | [diff] [blame] | 30 | class DownloadStatusUpdater; |
[email protected] | e6933d2a | 2013-03-12 22:32:21 | [diff] [blame] | 31 | class GpuModeManager; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 32 | class IconManager; |
[email protected] | 9595199 | 2013-09-13 00:37:54 | [diff] [blame] | 33 | class MediaFileSystemRegistry; |
miguelg | 23cd2dd7 | 2016-04-21 15:24:03 | [diff] [blame] | 34 | class NotificationPlatformBridge; |
[email protected] | 29672ab | 2009-10-30 03:44:03 | [diff] [blame] | 35 | class NotificationUIManager; |
[email protected] | b1de2c7 | 2013-02-06 02:45:47 | [diff] [blame] | 36 | class PrefService; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 37 | class ProfileManager; |
Reilly Grant | bfc2ab7 | 2021-06-02 23:57:30 | [diff] [blame] | 38 | class SerialPolicyAllowedPorts; |
| 39 | class StartupData; |
[email protected] | 9e7f015f | 2011-05-28 00:24:25 | [diff] [blame] | 40 | class StatusTray; |
Matt Menke | 21b9cc6 | 2017-08-23 15:45:45 | [diff] [blame] | 41 | class SystemNetworkContextManager; |
[email protected] | 0b56518 | 2011-03-02 18:11:15 | [diff] [blame] | 42 | class WatchDogThread; |
[email protected] | bbf32c5 | 2013-06-03 14:05:52 | [diff] [blame] | 43 | class WebRtcLogUploader; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 44 | |
Tommy Li | d5b7c22b | 2020-10-28 01:26:51 | [diff] [blame] | 45 | #if !defined(OS_ANDROID) |
| 46 | class IntranetRedirectDetector; |
| 47 | #endif |
| 48 | |
Jesse McKenna | 98e60df | 2021-08-17 16:57:08 | [diff] [blame^] | 49 | namespace breadcrumbs { |
| 50 | class BreadcrumbPersistentStorageManager; |
| 51 | } |
| 52 | |
Tarun Bansal | cd6a6cb | 2018-06-27 22:03:22 | [diff] [blame] | 53 | namespace network { |
| 54 | class NetworkQualityTracker; |
Antonio Gomes | acd1a94 | 2018-07-10 20:23:54 | [diff] [blame] | 55 | class SharedURLLoaderFactory; |
Tarun Bansal | cd6a6cb | 2018-06-27 22:03:22 | [diff] [blame] | 56 | } |
| 57 | |
vakh | 9a474d83 | 2015-11-13 01:43:09 | [diff] [blame] | 58 | namespace safe_browsing { |
| 59 | class SafeBrowsingService; |
| 60 | } |
| 61 | |
engedy | c5ef21ad | 2016-06-17 20:22:27 | [diff] [blame] | 62 | namespace subresource_filter { |
Eric Robinson | efb3ea55 | 2018-11-02 18:24:32 | [diff] [blame] | 63 | class RulesetService; |
engedy | c5ef21ad | 2016-06-17 20:22:27 | [diff] [blame] | 64 | } |
| 65 | |
Yao Xiao | 431dec6 | 2020-06-25 14:13:06 | [diff] [blame] | 66 | namespace federated_learning { |
Yao Xiao | cc8e0c4 | 2020-10-01 17:34:46 | [diff] [blame] | 67 | class FlocSortingLshClustersService; |
Yao Xiao | 431dec6 | 2020-06-25 14:13:06 | [diff] [blame] | 68 | } |
| 69 | |
blundell | 57bcfed | 2015-09-04 08:44:45 | [diff] [blame] | 70 | namespace variations { |
[email protected] | 0481124 | 2012-07-06 18:04:29 | [diff] [blame] | 71 | class VariationsService; |
| 72 | } |
| 73 | |
[email protected] | 055981f | 2014-01-17 20:22:32 | [diff] [blame] | 74 | namespace component_updater { |
| 75 | class ComponentUpdateService; |
[email protected] | 055981f | 2014-01-17 20:22:32 | [diff] [blame] | 76 | } |
| 77 | |
[email protected] | 5a38dfd | 2012-07-23 23:22:10 | [diff] [blame] | 78 | namespace extensions { |
| 79 | class EventRouterForwarder; |
| 80 | } |
| 81 | |
[email protected] | c027d6d | 2014-06-05 15:25:40 | [diff] [blame] | 82 | namespace gcm { |
| 83 | class GCMDriver; |
| 84 | } |
| 85 | |
asvitkine | cbd42073 | 2014-08-26 22:15:40 | [diff] [blame] | 86 | namespace metrics { |
| 87 | class MetricsService; |
| 88 | } |
| 89 | |
blundell | 695d61f | 2015-10-21 11:25:53 | [diff] [blame] | 90 | namespace metrics_services_manager { |
| 91 | class MetricsServicesManager; |
| 92 | } |
| 93 | |
[email protected] | d0ab865b | 2014-06-04 19:41:34 | [diff] [blame] | 94 | namespace network_time { |
| 95 | class NetworkTimeTracker; |
| 96 | } |
| 97 | |
[email protected] | 80745e3 | 2012-05-08 01:22:12 | [diff] [blame] | 98 | namespace policy { |
Scott Violet | fdd6f35 | 2018-01-12 19:12:29 | [diff] [blame] | 99 | class ChromeBrowserPolicyConnector; |
[email protected] | 80745e3 | 2012-05-08 01:22:12 | [diff] [blame] | 100 | class PolicyService; |
| 101 | } |
| 102 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 103 | namespace printing { |
[email protected] | 68f88b99 | 2011-05-07 02:01:39 | [diff] [blame] | 104 | class BackgroundPrintingManager; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 105 | class PrintJobManager; |
[email protected] | d8ce31e | 2012-12-19 05:09:21 | [diff] [blame] | 106 | class PrintPreviewDialogController; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 107 | } |
| 108 | |
lpy | fedf65a | 2017-06-01 01:41:24 | [diff] [blame] | 109 | namespace resource_coordinator { |
Sebastien Marchand | 2ebd925 | 2018-11-08 18:39:35 | [diff] [blame] | 110 | class ResourceCoordinatorParts; |
lpy | fedf65a | 2017-06-01 01:41:24 | [diff] [blame] | 111 | class TabManager; |
| 112 | } |
| 113 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 114 | // NOT THREAD SAFE, call only from the main thread. |
| 115 | // These functions shouldn't return NULL unless otherwise noted. |
| 116 | class BrowserProcess { |
| 117 | public: |
[email protected] | 1889dc1b | 2010-10-14 22:03:13 | [diff] [blame] | 118 | BrowserProcess(); |
| 119 | virtual ~BrowserProcess(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 120 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 121 | // Invoked when the user is logging out/shutting down. When logging off we may |
| 122 | // not have enough time to do a normal shutdown. This method is invoked prior |
Gabriel Charette | b1af7ffb | 2017-07-27 06:10:35 | [diff] [blame] | 123 | // to normal shutdown and saves any state that must be saved before system |
| 124 | // shutdown. |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 125 | virtual void EndSession() = 0; |
| 126 | |
Gabriel Charette | b1af7ffb | 2017-07-27 06:10:35 | [diff] [blame] | 127 | // Ensures |local_state()| was flushed to disk and then posts |reply| back on |
| 128 | // the current sequence. |
| 129 | virtual void FlushLocalStateAndReply(base::OnceClosure reply) = 0; |
| 130 | |
[email protected] | 544246e | 2014-06-06 11:22:28 | [diff] [blame] | 131 | // Gets the manager for the various metrics-related services, constructing it |
| 132 | // if necessary. |
blundell | 695d61f | 2015-10-21 11:25:53 | [diff] [blame] | 133 | virtual metrics_services_manager::MetricsServicesManager* |
| 134 | GetMetricsServicesManager() = 0; |
[email protected] | 544246e | 2014-06-06 11:22:28 | [diff] [blame] | 135 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 136 | // Services: any of these getters may return NULL |
asvitkine | cbd42073 | 2014-08-26 22:15:40 | [diff] [blame] | 137 | virtual metrics::MetricsService* metrics_service() = 0; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 138 | virtual ProfileManager* profile_manager() = 0; |
[email protected] | b1de2c7 | 2013-02-06 02:45:47 | [diff] [blame] | 139 | virtual PrefService* local_state() = 0; |
Antonio Gomes | acd1a94 | 2018-07-10 20:23:54 | [diff] [blame] | 140 | virtual scoped_refptr<network::SharedURLLoaderFactory> |
| 141 | shared_url_loader_factory() = 0; |
blundell | 57bcfed | 2015-09-04 08:44:45 | [diff] [blame] | 142 | virtual variations::VariationsService* variations_service() = 0; |
[email protected] | db0e86dd | 2011-03-16 14:47:21 | [diff] [blame] | 143 | |
[email protected] | 7cad6b0d | 2013-04-25 20:29:32 | [diff] [blame] | 144 | virtual BrowserProcessPlatformPart* platform_part() = 0; |
[email protected] | db0e86dd | 2011-03-16 14:47:21 | [diff] [blame] | 145 | |
[email protected] | 5a38dfd | 2012-07-23 23:22:10 | [diff] [blame] | 146 | virtual extensions::EventRouterForwarder* |
[email protected] | 3ce0241 | 2011-03-01 12:01:15 | [diff] [blame] | 147 | extension_event_router_forwarder() = 0; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 148 | |
[email protected] | 29672ab | 2009-10-30 03:44:03 | [diff] [blame] | 149 | // Returns the manager for desktop notifications. |
miguelg | 23cd2dd7 | 2016-04-21 15:24:03 | [diff] [blame] | 150 | // TODO(miguelg) This is in the process of being deprecated in favour of |
| 151 | // NotificationPlatformBridge + NotificationDisplayService |
[email protected] | 29672ab | 2009-10-30 03:44:03 | [diff] [blame] | 152 | virtual NotificationUIManager* notification_ui_manager() = 0; |
miguelg | 23cd2dd7 | 2016-04-21 15:24:03 | [diff] [blame] | 153 | virtual NotificationPlatformBridge* notification_platform_bridge() = 0; |
[email protected] | 29672ab | 2009-10-30 03:44:03 | [diff] [blame] | 154 | |
Eric Roman | b67de83b | 2019-06-22 00:12:32 | [diff] [blame] | 155 | // Replacement for IOThread. It owns and manages the |
Matt Menke | 21b9cc6 | 2017-08-23 15:45:45 | [diff] [blame] | 156 | // NetworkContext which will use the network service when the network service |
| 157 | // is enabled. When the network service is not enabled, its NetworkContext is |
| 158 | // backed by the IOThread's URLRequestContext. |
| 159 | virtual SystemNetworkContextManager* system_network_context_manager() = 0; |
| 160 | |
Tarun Bansal | cd6a6cb | 2018-06-27 22:03:22 | [diff] [blame] | 161 | // Returns a NetworkQualityTracker that can be used to subscribe for |
| 162 | // network quality change events. |
| 163 | virtual network::NetworkQualityTracker* network_quality_tracker() = 0; |
| 164 | |
[email protected] | 0b56518 | 2011-03-02 18:11:15 | [diff] [blame] | 165 | // Returns the thread that is used for health check of all browser threads. |
| 166 | virtual WatchDogThread* watchdog_thread() = 0; |
| 167 | |
[email protected] | a4179c2a | 2012-02-09 18:14:21 | [diff] [blame] | 168 | // Starts and manages the policy system. |
Scott Violet | fdd6f35 | 2018-01-12 19:12:29 | [diff] [blame] | 169 | virtual policy::ChromeBrowserPolicyConnector* browser_policy_connector() = 0; |
[email protected] | f2a893c | 2011-01-05 09:38:07 | [diff] [blame] | 170 | |
[email protected] | a4179c2a | 2012-02-09 18:14:21 | [diff] [blame] | 171 | // This is the main interface for chromium components to retrieve policy |
| 172 | // information from the policy system. |
| 173 | virtual policy::PolicyService* policy_service() = 0; |
| 174 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 175 | virtual IconManager* icon_manager() = 0; |
| 176 | |
[email protected] | e6933d2a | 2013-03-12 22:32:21 | [diff] [blame] | 177 | virtual GpuModeManager* gpu_mode_manager() = 0; |
| 178 | |
Pavel Feldman | c9ae59c | 2018-02-13 16:15:15 | [diff] [blame] | 179 | virtual void CreateDevToolsProtocolHandler() = 0; |
| 180 | |
dgozman | 54cc54e | 2016-02-23 03:47:30 | [diff] [blame] | 181 | virtual void CreateDevToolsAutoOpener() = 0; |
[email protected] | 5613126e | 2011-01-31 15:27:55 | [diff] [blame] | 182 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 183 | virtual bool IsShuttingDown() = 0; |
| 184 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 185 | virtual printing::PrintJobManager* print_job_manager() = 0; |
[email protected] | d8ce31e | 2012-12-19 05:09:21 | [diff] [blame] | 186 | virtual printing::PrintPreviewDialogController* |
| 187 | print_preview_dialog_controller() = 0; |
[email protected] | 68f88b99 | 2011-05-07 02:01:39 | [diff] [blame] | 188 | virtual printing::BackgroundPrintingManager* |
| 189 | background_printing_manager() = 0; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 190 | |
Tommy Li | d5b7c22b | 2020-10-28 01:26:51 | [diff] [blame] | 191 | #if !defined(OS_ANDROID) |
[email protected] | c4ff495 | 2010-01-08 19:12:47 | [diff] [blame] | 192 | virtual IntranetRedirectDetector* intranet_redirect_detector() = 0; |
Tommy Li | d5b7c22b | 2020-10-28 01:26:51 | [diff] [blame] | 193 | #endif |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 194 | |
jkrcal | 2eaf9b2 | 2016-08-09 20:23:34 | [diff] [blame] | 195 | // Returns the locale used by the application. It is the IETF language tag, |
| 196 | // defined in BCP 47. The region subtag is not included when it adds no |
| 197 | // distinguishing information to the language tag (e.g. both "en-US" and "fr" |
| 198 | // are correct here). |
[email protected] | d70539de | 2009-06-24 22:17:06 | [diff] [blame] | 199 | virtual const std::string& GetApplicationLocale() = 0; |
Xi Han | 349162b | 2018-10-26 12:44:23 | [diff] [blame] | 200 | virtual void SetApplicationLocale(const std::string& actual_locale) = 0; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 201 | |
[email protected] | 073ed7b | 2010-09-27 09:20:02 | [diff] [blame] | 202 | virtual DownloadStatusUpdater* download_status_updater() = 0; |
[email protected] | 254ed74 | 2011-08-16 18:45:27 | [diff] [blame] | 203 | virtual DownloadRequestLimiter* download_request_limiter() = 0; |
[email protected] | 4cdac10 | 2008-10-17 18:07:02 | [diff] [blame] | 204 | |
[email protected] | 9e7f015f | 2011-05-28 00:24:25 | [diff] [blame] | 205 | // Returns the object that manages background applications. |
| 206 | virtual BackgroundModeManager* background_mode_manager() = 0; |
Reid Kleckner | 4d3f21c | 2021-01-25 22:48:31 | [diff] [blame] | 207 | #if BUILDFLAG(ENABLE_BACKGROUND_MODE) |
[email protected] | e178ad9 | 2013-06-28 02:29:25 | [diff] [blame] | 208 | virtual void set_background_mode_manager_for_test( |
dcheng | 4af4858 | 2016-04-19 00:29:35 | [diff] [blame] | 209 | std::unique_ptr<BackgroundModeManager> manager) = 0; |
Reid Kleckner | 4d3f21c | 2021-01-25 22:48:31 | [diff] [blame] | 210 | #endif |
[email protected] | 9e7f015f | 2011-05-28 00:24:25 | [diff] [blame] | 211 | |
| 212 | // Returns the StatusTray, which provides an API for displaying status icons |
| 213 | // in the system status tray. Returns NULL if status icons are not supported |
| 214 | // on this platform (or this is a unit test). |
| 215 | virtual StatusTray* status_tray() = 0; |
| 216 | |
[email protected] | 462a0ff | 2011-06-02 17:15:34 | [diff] [blame] | 217 | // Returns the SafeBrowsing service. |
vakh | 9a474d83 | 2015-11-13 01:43:09 | [diff] [blame] | 218 | virtual safe_browsing::SafeBrowsingService* safe_browsing_service() = 0; |
[email protected] | 462a0ff | 2011-06-02 17:15:34 | [diff] [blame] | 219 | |
engedy | c5ef21ad | 2016-06-17 20:22:27 | [diff] [blame] | 220 | // Returns the service providing versioned storage for rules used by the Safe |
| 221 | // Browsing subresource filter. |
Eric Robinson | efb3ea55 | 2018-11-02 18:24:32 | [diff] [blame] | 222 | virtual subresource_filter::RulesetService* |
engedy | c5ef21ad | 2016-06-17 20:22:27 | [diff] [blame] | 223 | subresource_filter_ruleset_service() = 0; |
| 224 | |
Yao Xiao | cc8e0c4 | 2020-10-01 17:34:46 | [diff] [blame] | 225 | // Returns the service providing versioned storage for a list of limit values |
| 226 | // for calculating the floc based on SortingLSH. |
| 227 | virtual federated_learning::FlocSortingLshClustersService* |
| 228 | floc_sorting_lsh_clusters_service() = 0; |
| 229 | |
Xi Han | 9fd4400 | 2019-04-30 17:39:36 | [diff] [blame] | 230 | // Returns the StartupData which owns any pre-created objects in //chrome |
| 231 | // before the full browser starts. |
| 232 | virtual StartupData* startup_data() = 0; |
| 233 | |
Yuta Hijikata | 235fc62b | 2020-12-08 03:48:32 | [diff] [blame] | 234 | // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is |
| 235 | // complete. |
| 236 | #if defined(OS_WIN) || (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) |
[email protected] | bd48c2b0 | 2010-04-09 20:32:42 | [diff] [blame] | 237 | // This will start a timer that, if Chrome is in persistent mode, will check |
| 238 | // whether an update is available, and if that's the case, restart the |
| 239 | // browser. Note that restart code will strip some of the command line keys |
| 240 | // and all loose values from the cl this instance of Chrome was launched with, |
| 241 | // and add the command line key that will force Chrome to start in the |
| 242 | // background mode. For the full list of "blacklisted" keys, refer to |
| 243 | // |kSwitchesToRemoveOnAutorestart| array in browser_process_impl.cc. |
| 244 | virtual void StartAutoupdateTimer() = 0; |
[email protected] | 3cdacd4 | 2010-04-30 18:55:53 | [diff] [blame] | 245 | #endif |
[email protected] | bd48c2b0 | 2010-04-09 20:32:42 | [diff] [blame] | 246 | |
[email protected] | 055981f | 2014-01-17 20:22:32 | [diff] [blame] | 247 | virtual component_updater::ComponentUpdateService* component_updater() = 0; |
[email protected] | c1adf5a | 2011-08-03 22:11:37 | [diff] [blame] | 248 | |
[email protected] | 9595199 | 2013-09-13 00:37:54 | [diff] [blame] | 249 | virtual MediaFileSystemRegistry* media_file_system_registry() = 0; |
[email protected] | 42aec8df | 2012-12-12 06:03:57 | [diff] [blame] | 250 | |
[email protected] | bbf32c5 | 2013-06-03 14:05:52 | [diff] [blame] | 251 | virtual WebRtcLogUploader* webrtc_log_uploader() = 0; |
[email protected] | bbf32c5 | 2013-06-03 14:05:52 | [diff] [blame] | 252 | |
[email protected] | d0ab865b | 2014-06-04 19:41:34 | [diff] [blame] | 253 | virtual network_time::NetworkTimeTracker* network_time_tracker() = 0; |
[email protected] | 72f9371 | 2014-05-19 15:10:39 | [diff] [blame] | 254 | |
Adam Langley | 1cb73c7 | 2020-08-28 17:06:44 | [diff] [blame] | 255 | #if !defined(OS_ANDROID) |
| 256 | // Avoid using this. Prefer using GCMProfileServiceFactory. |
[email protected] | c027d6d | 2014-06-05 15:25:40 | [diff] [blame] | 257 | virtual gcm::GCMDriver* gcm_driver() = 0; |
Adam Langley | 1cb73c7 | 2020-08-28 17:06:44 | [diff] [blame] | 258 | #endif |
[email protected] | c027d6d | 2014-06-05 15:25:40 | [diff] [blame] | 259 | |
andersoncss | 85932fd | 2016-08-16 18:24:39 | [diff] [blame] | 260 | // Returns the tab manager. On non-supported platforms, this returns null. |
Sebastien Marchand | 2ebd925 | 2018-11-08 18:39:35 | [diff] [blame] | 261 | // TODO(sebmarchand): Update callers to |
| 262 | // resource_coordinator_parts()->tab_manager() and remove this. |
lpy | fedf65a | 2017-06-01 01:41:24 | [diff] [blame] | 263 | virtual resource_coordinator::TabManager* GetTabManager() = 0; |
georgesak | 7b528192 | 2015-06-30 13:25:17 | [diff] [blame] | 264 | |
Sebastien Marchand | 2ebd925 | 2018-11-08 18:39:35 | [diff] [blame] | 265 | virtual resource_coordinator::ResourceCoordinatorParts* |
| 266 | resource_coordinator_parts() = 0; |
| 267 | |
Reilly Grant | bfc2ab7 | 2021-06-02 23:57:30 | [diff] [blame] | 268 | #if !defined(OS_ANDROID) |
| 269 | // Returns the object which keeps track of serial port permissions configured |
| 270 | // through the policy engine. |
| 271 | virtual SerialPolicyAllowedPorts* serial_policy_allowed_ports() = 0; |
| 272 | #endif |
| 273 | |
Greg Thompson | 08451a4 | 2020-02-04 23:45:54 | [diff] [blame] | 274 | virtual BuildState* GetBuildState() = 0; |
| 275 | |
Jesse McKenna | 98e60df | 2021-08-17 16:57:08 | [diff] [blame^] | 276 | // Returns the BreadcrumbPersistentStorageManager writing breadcrumbs to disk, |
| 277 | // or nullptr if breadcrumbs logging is disabled. |
| 278 | virtual breadcrumbs::BreadcrumbPersistentStorageManager* |
| 279 | GetBreadcrumbPersistentStorageManager() = 0; |
| 280 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 281 | private: |
[email protected] | bfd04a6 | 2009-02-01 18:16:56 | [diff] [blame] | 282 | DISALLOW_COPY_AND_ASSIGN(BrowserProcess); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 283 | }; |
| 284 | |
| 285 | extern BrowserProcess* g_browser_process; |
| 286 | |
[email protected] | bfd04a6 | 2009-02-01 18:16:56 | [diff] [blame] | 287 | #endif // CHROME_BROWSER_BROWSER_PROCESS_H_ |