[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 | |
Tarun Bansal | cd6a6cb | 2018-06-27 22:03:22 | [diff] [blame] | 49 | namespace network { |
| 50 | class NetworkQualityTracker; |
Antonio Gomes | acd1a94 | 2018-07-10 20:23:54 | [diff] [blame] | 51 | class SharedURLLoaderFactory; |
Tarun Bansal | cd6a6cb | 2018-06-27 22:03:22 | [diff] [blame] | 52 | } |
| 53 | |
vakh | 9a474d83 | 2015-11-13 01:43:09 | [diff] [blame] | 54 | namespace safe_browsing { |
| 55 | class SafeBrowsingService; |
| 56 | } |
| 57 | |
engedy | c5ef21ad | 2016-06-17 20:22:27 | [diff] [blame] | 58 | namespace subresource_filter { |
Eric Robinson | efb3ea55 | 2018-11-02 18:24:32 | [diff] [blame] | 59 | class RulesetService; |
engedy | c5ef21ad | 2016-06-17 20:22:27 | [diff] [blame] | 60 | } |
| 61 | |
Yao Xiao | 431dec6 | 2020-06-25 14:13:06 | [diff] [blame] | 62 | namespace federated_learning { |
Yao Xiao | cc8e0c4 | 2020-10-01 17:34:46 | [diff] [blame] | 63 | class FlocSortingLshClustersService; |
Yao Xiao | 431dec6 | 2020-06-25 14:13:06 | [diff] [blame] | 64 | } |
| 65 | |
blundell | 57bcfed | 2015-09-04 08:44:45 | [diff] [blame] | 66 | namespace variations { |
[email protected] | 0481124 | 2012-07-06 18:04:29 | [diff] [blame] | 67 | class VariationsService; |
| 68 | } |
| 69 | |
[email protected] | 055981f | 2014-01-17 20:22:32 | [diff] [blame] | 70 | namespace component_updater { |
| 71 | class ComponentUpdateService; |
[email protected] | 055981f | 2014-01-17 20:22:32 | [diff] [blame] | 72 | } |
| 73 | |
[email protected] | 5a38dfd | 2012-07-23 23:22:10 | [diff] [blame] | 74 | namespace extensions { |
| 75 | class EventRouterForwarder; |
| 76 | } |
| 77 | |
[email protected] | c027d6d | 2014-06-05 15:25:40 | [diff] [blame] | 78 | namespace gcm { |
| 79 | class GCMDriver; |
| 80 | } |
| 81 | |
asvitkine | cbd42073 | 2014-08-26 22:15:40 | [diff] [blame] | 82 | namespace metrics { |
| 83 | class MetricsService; |
| 84 | } |
| 85 | |
blundell | 695d61f | 2015-10-21 11:25:53 | [diff] [blame] | 86 | namespace metrics_services_manager { |
| 87 | class MetricsServicesManager; |
| 88 | } |
| 89 | |
[email protected] | d0ab865b | 2014-06-04 19:41:34 | [diff] [blame] | 90 | namespace network_time { |
| 91 | class NetworkTimeTracker; |
| 92 | } |
| 93 | |
[email protected] | 80745e3 | 2012-05-08 01:22:12 | [diff] [blame] | 94 | namespace policy { |
Scott Violet | fdd6f35 | 2018-01-12 19:12:29 | [diff] [blame] | 95 | class ChromeBrowserPolicyConnector; |
[email protected] | 80745e3 | 2012-05-08 01:22:12 | [diff] [blame] | 96 | class PolicyService; |
| 97 | } |
| 98 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 99 | namespace printing { |
[email protected] | 68f88b99 | 2011-05-07 02:01:39 | [diff] [blame] | 100 | class BackgroundPrintingManager; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 101 | class PrintJobManager; |
[email protected] | d8ce31e | 2012-12-19 05:09:21 | [diff] [blame] | 102 | class PrintPreviewDialogController; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 103 | } |
| 104 | |
lpy | fedf65a | 2017-06-01 01:41:24 | [diff] [blame] | 105 | namespace resource_coordinator { |
Sebastien Marchand | 2ebd925 | 2018-11-08 18:39:35 | [diff] [blame] | 106 | class ResourceCoordinatorParts; |
lpy | fedf65a | 2017-06-01 01:41:24 | [diff] [blame] | 107 | class TabManager; |
| 108 | } |
| 109 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 110 | // NOT THREAD SAFE, call only from the main thread. |
| 111 | // These functions shouldn't return NULL unless otherwise noted. |
| 112 | class BrowserProcess { |
| 113 | public: |
[email protected] | 1889dc1b | 2010-10-14 22:03:13 | [diff] [blame] | 114 | BrowserProcess(); |
| 115 | virtual ~BrowserProcess(); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 116 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 117 | // Invoked when the user is logging out/shutting down. When logging off we may |
| 118 | // 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] | 119 | // to normal shutdown and saves any state that must be saved before system |
| 120 | // shutdown. |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 121 | virtual void EndSession() = 0; |
| 122 | |
Gabriel Charette | b1af7ffb | 2017-07-27 06:10:35 | [diff] [blame] | 123 | // Ensures |local_state()| was flushed to disk and then posts |reply| back on |
| 124 | // the current sequence. |
| 125 | virtual void FlushLocalStateAndReply(base::OnceClosure reply) = 0; |
| 126 | |
[email protected] | 544246e | 2014-06-06 11:22:28 | [diff] [blame] | 127 | // Gets the manager for the various metrics-related services, constructing it |
| 128 | // if necessary. |
blundell | 695d61f | 2015-10-21 11:25:53 | [diff] [blame] | 129 | virtual metrics_services_manager::MetricsServicesManager* |
| 130 | GetMetricsServicesManager() = 0; |
[email protected] | 544246e | 2014-06-06 11:22:28 | [diff] [blame] | 131 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 132 | // Services: any of these getters may return NULL |
asvitkine | cbd42073 | 2014-08-26 22:15:40 | [diff] [blame] | 133 | virtual metrics::MetricsService* metrics_service() = 0; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 134 | virtual ProfileManager* profile_manager() = 0; |
[email protected] | b1de2c7 | 2013-02-06 02:45:47 | [diff] [blame] | 135 | virtual PrefService* local_state() = 0; |
Antonio Gomes | acd1a94 | 2018-07-10 20:23:54 | [diff] [blame] | 136 | virtual scoped_refptr<network::SharedURLLoaderFactory> |
| 137 | shared_url_loader_factory() = 0; |
blundell | 57bcfed | 2015-09-04 08:44:45 | [diff] [blame] | 138 | virtual variations::VariationsService* variations_service() = 0; |
[email protected] | db0e86dd | 2011-03-16 14:47:21 | [diff] [blame] | 139 | |
[email protected] | 7cad6b0d | 2013-04-25 20:29:32 | [diff] [blame] | 140 | virtual BrowserProcessPlatformPart* platform_part() = 0; |
[email protected] | db0e86dd | 2011-03-16 14:47:21 | [diff] [blame] | 141 | |
[email protected] | 5a38dfd | 2012-07-23 23:22:10 | [diff] [blame] | 142 | virtual extensions::EventRouterForwarder* |
[email protected] | 3ce0241 | 2011-03-01 12:01:15 | [diff] [blame] | 143 | extension_event_router_forwarder() = 0; |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 144 | |
[email protected] | 29672ab | 2009-10-30 03:44:03 | [diff] [blame] | 145 | // Returns the manager for desktop notifications. |
miguelg | 23cd2dd7 | 2016-04-21 15:24:03 | [diff] [blame] | 146 | // TODO(miguelg) This is in the process of being deprecated in favour of |
| 147 | // NotificationPlatformBridge + NotificationDisplayService |
[email protected] | 29672ab | 2009-10-30 03:44:03 | [diff] [blame] | 148 | virtual NotificationUIManager* notification_ui_manager() = 0; |
miguelg | 23cd2dd7 | 2016-04-21 15:24:03 | [diff] [blame] | 149 | virtual NotificationPlatformBridge* notification_platform_bridge() = 0; |
[email protected] | 29672ab | 2009-10-30 03:44:03 | [diff] [blame] | 150 | |
Eric Roman | b67de83b | 2019-06-22 00:12:32 | [diff] [blame] | 151 | // Replacement for IOThread. It owns and manages the |
Matt Menke | 21b9cc6 | 2017-08-23 15:45:45 | [diff] [blame] | 152 | // NetworkContext which will use the network service when the network service |
| 153 | // is enabled. When the network service is not enabled, its NetworkContext is |
| 154 | // backed by the IOThread's URLRequestContext. |
| 155 | virtual SystemNetworkContextManager* system_network_context_manager() = 0; |
| 156 | |
Tarun Bansal | cd6a6cb | 2018-06-27 22:03:22 | [diff] [blame] | 157 | // Returns a NetworkQualityTracker that can be used to subscribe for |
| 158 | // network quality change events. |
| 159 | virtual network::NetworkQualityTracker* network_quality_tracker() = 0; |
| 160 | |
[email protected] | 0b56518 | 2011-03-02 18:11:15 | [diff] [blame] | 161 | // Returns the thread that is used for health check of all browser threads. |
| 162 | virtual WatchDogThread* watchdog_thread() = 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 | |
Tommy Li | d5b7c22b | 2020-10-28 01:26:51 | [diff] [blame] | 187 | #if !defined(OS_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 | |
Yao Xiao | cc8e0c4 | 2020-10-01 17:34:46 | [diff] [blame] | 221 | // Returns the service providing versioned storage for a list of limit values |
| 222 | // for calculating the floc based on SortingLSH. |
| 223 | virtual federated_learning::FlocSortingLshClustersService* |
| 224 | floc_sorting_lsh_clusters_service() = 0; |
| 225 | |
Xi Han | 9fd4400 | 2019-04-30 17:39:36 | [diff] [blame] | 226 | // Returns the StartupData which owns any pre-created objects in //chrome |
| 227 | // before the full browser starts. |
| 228 | virtual StartupData* startup_data() = 0; |
| 229 | |
Yuta Hijikata | 235fc62b | 2020-12-08 03:48:32 | [diff] [blame] | 230 | // TODO(crbug.com/1052397): Revisit once build flag switch of lacros-chrome is |
| 231 | // complete. |
| 232 | #if defined(OS_WIN) || (defined(OS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) |
[email protected] | bd48c2b0 | 2010-04-09 20:32:42 | [diff] [blame] | 233 | // This will start a timer that, if Chrome is in persistent mode, will check |
| 234 | // whether an update is available, and if that's the case, restart the |
| 235 | // browser. Note that restart code will strip some of the command line keys |
| 236 | // and all loose values from the cl this instance of Chrome was launched with, |
| 237 | // and add the command line key that will force Chrome to start in the |
| 238 | // background mode. For the full list of "blacklisted" keys, refer to |
| 239 | // |kSwitchesToRemoveOnAutorestart| array in browser_process_impl.cc. |
| 240 | virtual void StartAutoupdateTimer() = 0; |
[email protected] | 3cdacd4 | 2010-04-30 18:55:53 | [diff] [blame] | 241 | #endif |
[email protected] | bd48c2b0 | 2010-04-09 20:32:42 | [diff] [blame] | 242 | |
[email protected] | 055981f | 2014-01-17 20:22:32 | [diff] [blame] | 243 | virtual component_updater::ComponentUpdateService* component_updater() = 0; |
[email protected] | c1adf5a | 2011-08-03 22:11:37 | [diff] [blame] | 244 | |
[email protected] | 9595199 | 2013-09-13 00:37:54 | [diff] [blame] | 245 | virtual MediaFileSystemRegistry* media_file_system_registry() = 0; |
[email protected] | 42aec8df | 2012-12-12 06:03:57 | [diff] [blame] | 246 | |
[email protected] | bbf32c5 | 2013-06-03 14:05:52 | [diff] [blame] | 247 | virtual WebRtcLogUploader* webrtc_log_uploader() = 0; |
[email protected] | bbf32c5 | 2013-06-03 14:05:52 | [diff] [blame] | 248 | |
[email protected] | d0ab865b | 2014-06-04 19:41:34 | [diff] [blame] | 249 | virtual network_time::NetworkTimeTracker* network_time_tracker() = 0; |
[email protected] | 72f9371 | 2014-05-19 15:10:39 | [diff] [blame] | 250 | |
Adam Langley | 1cb73c7 | 2020-08-28 17:06:44 | [diff] [blame] | 251 | #if !defined(OS_ANDROID) |
| 252 | // Avoid using this. Prefer using GCMProfileServiceFactory. |
[email protected] | c027d6d | 2014-06-05 15:25:40 | [diff] [blame] | 253 | virtual gcm::GCMDriver* gcm_driver() = 0; |
Adam Langley | 1cb73c7 | 2020-08-28 17:06:44 | [diff] [blame] | 254 | #endif |
[email protected] | c027d6d | 2014-06-05 15:25:40 | [diff] [blame] | 255 | |
andersoncss | 85932fd | 2016-08-16 18:24:39 | [diff] [blame] | 256 | // Returns the tab manager. On non-supported platforms, this returns null. |
Sebastien Marchand | 2ebd925 | 2018-11-08 18:39:35 | [diff] [blame] | 257 | // TODO(sebmarchand): Update callers to |
| 258 | // resource_coordinator_parts()->tab_manager() and remove this. |
lpy | fedf65a | 2017-06-01 01:41:24 | [diff] [blame] | 259 | virtual resource_coordinator::TabManager* GetTabManager() = 0; |
georgesak | 7b528192 | 2015-06-30 13:25:17 | [diff] [blame] | 260 | |
Sebastien Marchand | 2ebd925 | 2018-11-08 18:39:35 | [diff] [blame] | 261 | virtual resource_coordinator::ResourceCoordinatorParts* |
| 262 | resource_coordinator_parts() = 0; |
| 263 | |
Reilly Grant | bfc2ab7 | 2021-06-02 23:57:30 | [diff] [blame] | 264 | #if !defined(OS_ANDROID) |
| 265 | // Returns the object which keeps track of serial port permissions configured |
| 266 | // through the policy engine. |
| 267 | virtual SerialPolicyAllowedPorts* serial_policy_allowed_ports() = 0; |
| 268 | #endif |
| 269 | |
Greg Thompson | 08451a4 | 2020-02-04 23:45:54 | [diff] [blame] | 270 | virtual BuildState* GetBuildState() = 0; |
| 271 | |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 272 | private: |
[email protected] | bfd04a6 | 2009-02-01 18:16:56 | [diff] [blame] | 273 | DISALLOW_COPY_AND_ASSIGN(BrowserProcess); |
initial.commit | 09911bf | 2008-07-26 23:55:29 | [diff] [blame] | 274 | }; |
| 275 | |
| 276 | extern BrowserProcess* g_browser_process; |
| 277 | |
[email protected] | bfd04a6 | 2009-02-01 18:16:56 | [diff] [blame] | 278 | #endif // CHROME_BROWSER_BROWSER_PROCESS_H_ |