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