| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This interface is for managing the global services of the application. Each | 5 // This interface is for managing the global services of the application. Each |
| 6 // service is lazily created when requested the first time. The service getters | 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 | 7 // will return NULL if the service is not available, so callers must check for |
| 8 // this condition. | 8 // this condition. |
| 9 | 9 |
| 10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_H_ | 10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_H_ |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 112 |
| 113 namespace rappor { | 113 namespace rappor { |
| 114 class RapporServiceImpl; | 114 class RapporServiceImpl; |
| 115 } | 115 } |
| 116 | 116 |
| 117 namespace safe_browsing { | 117 namespace safe_browsing { |
| 118 class ClientSideDetectionService; | 118 class ClientSideDetectionService; |
| 119 } | 119 } |
| 120 | 120 |
| 121 namespace ukm { | 121 namespace ukm { |
| 122 class UkmService; | 122 class UkmRecorder; |
| 123 } | 123 } |
| 124 | 124 |
| 125 // NOT THREAD SAFE, call only from the main thread. | 125 // NOT THREAD SAFE, call only from the main thread. |
| 126 // These functions shouldn't return NULL unless otherwise noted. | 126 // These functions shouldn't return NULL unless otherwise noted. |
| 127 class BrowserProcess { | 127 class BrowserProcess { |
| 128 public: | 128 public: |
| 129 BrowserProcess(); | 129 BrowserProcess(); |
| 130 virtual ~BrowserProcess(); | 130 virtual ~BrowserProcess(); |
| 131 | 131 |
| 132 // Called when the ResourceDispatcherHost object is created by content. | 132 // Called when the ResourceDispatcherHost object is created by content. |
| 133 virtual void ResourceDispatcherHostCreated() = 0; | 133 virtual void ResourceDispatcherHostCreated() = 0; |
| 134 | 134 |
| 135 // Invoked when the user is logging out/shutting down. When logging off we may | 135 // Invoked when the user is logging out/shutting down. When logging off we may |
| 136 // not have enough time to do a normal shutdown. This method is invoked prior | 136 // not have enough time to do a normal shutdown. This method is invoked prior |
| 137 // to normal shutdown and saves any state that must be saved before we are | 137 // to normal shutdown and saves any state that must be saved before we are |
| 138 // continue shutdown. | 138 // continue shutdown. |
| 139 virtual void EndSession() = 0; | 139 virtual void EndSession() = 0; |
| 140 | 140 |
| 141 // Gets the manager for the various metrics-related services, constructing it | 141 // Gets the manager for the various metrics-related services, constructing it |
| 142 // if necessary. | 142 // if necessary. |
| 143 virtual metrics_services_manager::MetricsServicesManager* | 143 virtual metrics_services_manager::MetricsServicesManager* |
| 144 GetMetricsServicesManager() = 0; | 144 GetMetricsServicesManager() = 0; |
| 145 | 145 |
| 146 // Services: any of these getters may return NULL | 146 // Services: any of these getters may return NULL |
| 147 virtual metrics::MetricsService* metrics_service() = 0; | 147 virtual metrics::MetricsService* metrics_service() = 0; |
| 148 virtual rappor::RapporServiceImpl* rappor_service() = 0; | 148 virtual rappor::RapporServiceImpl* rappor_service() = 0; |
| 149 virtual ukm::UkmService* ukm_service() = 0; | 149 virtual ukm::UkmRecorder* ukm_recorder() = 0; |
| 150 virtual ProfileManager* profile_manager() = 0; | 150 virtual ProfileManager* profile_manager() = 0; |
| 151 virtual PrefService* local_state() = 0; | 151 virtual PrefService* local_state() = 0; |
| 152 virtual net::URLRequestContextGetter* system_request_context() = 0; | 152 virtual net::URLRequestContextGetter* system_request_context() = 0; |
| 153 virtual variations::VariationsService* variations_service() = 0; | 153 virtual variations::VariationsService* variations_service() = 0; |
| 154 | 154 |
| 155 virtual BrowserProcessPlatformPart* platform_part() = 0; | 155 virtual BrowserProcessPlatformPart* platform_part() = 0; |
| 156 | 156 |
| 157 virtual extensions::EventRouterForwarder* | 157 virtual extensions::EventRouterForwarder* |
| 158 extension_event_router_forwarder() = 0; | 158 extension_event_router_forwarder() = 0; |
| 159 | 159 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 // Returns the Physical Web data source. | 289 // Returns the Physical Web data source. |
| 290 virtual physical_web::PhysicalWebDataSource* GetPhysicalWebDataSource() = 0; | 290 virtual physical_web::PhysicalWebDataSource* GetPhysicalWebDataSource() = 0; |
| 291 | 291 |
| 292 private: | 292 private: |
| 293 DISALLOW_COPY_AND_ASSIGN(BrowserProcess); | 293 DISALLOW_COPY_AND_ASSIGN(BrowserProcess); |
| 294 }; | 294 }; |
| 295 | 295 |
| 296 extern BrowserProcess* g_browser_process; | 296 extern BrowserProcess* g_browser_process; |
| 297 | 297 |
| 298 #endif // CHROME_BROWSER_BROWSER_PROCESS_H_ | 298 #endif // CHROME_BROWSER_BROWSER_PROCESS_H_ |
| OLD | NEW |