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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 class PolicyService; | 104 class PolicyService; |
105 } | 105 } |
106 | 106 |
107 namespace printing { | 107 namespace printing { |
108 class BackgroundPrintingManager; | 108 class BackgroundPrintingManager; |
109 class PrintJobManager; | 109 class PrintJobManager; |
110 class PrintPreviewDialogController; | 110 class PrintPreviewDialogController; |
111 } | 111 } |
112 | 112 |
113 namespace rappor { | 113 namespace rappor { |
114 class RapporService; | 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 // NOT THREAD SAFE, call only from the main thread. | 121 // NOT THREAD SAFE, call only from the main thread. |
122 // These functions shouldn't return NULL unless otherwise noted. | 122 // These functions shouldn't return NULL unless otherwise noted. |
123 class BrowserProcess { | 123 class BrowserProcess { |
124 public: | 124 public: |
125 BrowserProcess(); | 125 BrowserProcess(); |
126 virtual ~BrowserProcess(); | 126 virtual ~BrowserProcess(); |
127 | 127 |
128 // Called when the ResourceDispatcherHost object is created by content. | 128 // Called when the ResourceDispatcherHost object is created by content. |
129 virtual void ResourceDispatcherHostCreated() = 0; | 129 virtual void ResourceDispatcherHostCreated() = 0; |
130 | 130 |
131 // Invoked when the user is logging out/shutting down. When logging off we may | 131 // Invoked when the user is logging out/shutting down. When logging off we may |
132 // not have enough time to do a normal shutdown. This method is invoked prior | 132 // not have enough time to do a normal shutdown. This method is invoked prior |
133 // to normal shutdown and saves any state that must be saved before we are | 133 // to normal shutdown and saves any state that must be saved before we are |
134 // continue shutdown. | 134 // continue shutdown. |
135 virtual void EndSession() = 0; | 135 virtual void EndSession() = 0; |
136 | 136 |
137 // Gets the manager for the various metrics-related services, constructing it | 137 // Gets the manager for the various metrics-related services, constructing it |
138 // if necessary. | 138 // if necessary. |
139 virtual metrics_services_manager::MetricsServicesManager* | 139 virtual metrics_services_manager::MetricsServicesManager* |
140 GetMetricsServicesManager() = 0; | 140 GetMetricsServicesManager() = 0; |
141 | 141 |
142 // Services: any of these getters may return NULL | 142 // Services: any of these getters may return NULL |
143 virtual metrics::MetricsService* metrics_service() = 0; | 143 virtual metrics::MetricsService* metrics_service() = 0; |
144 virtual rappor::RapporService* rappor_service() = 0; | 144 virtual rappor::RapporServiceImpl* rappor_service() = 0; |
145 virtual ProfileManager* profile_manager() = 0; | 145 virtual ProfileManager* profile_manager() = 0; |
146 virtual PrefService* local_state() = 0; | 146 virtual PrefService* local_state() = 0; |
147 virtual net::URLRequestContextGetter* system_request_context() = 0; | 147 virtual net::URLRequestContextGetter* system_request_context() = 0; |
148 virtual variations::VariationsService* variations_service() = 0; | 148 virtual variations::VariationsService* variations_service() = 0; |
149 | 149 |
150 virtual BrowserProcessPlatformPart* platform_part() = 0; | 150 virtual BrowserProcessPlatformPart* platform_part() = 0; |
151 | 151 |
152 virtual extensions::EventRouterForwarder* | 152 virtual extensions::EventRouterForwarder* |
153 extension_event_router_forwarder() = 0; | 153 extension_event_router_forwarder() = 0; |
154 | 154 |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 // Returns the Physical Web data source. | 284 // Returns the Physical Web data source. |
285 virtual physical_web::PhysicalWebDataSource* GetPhysicalWebDataSource() = 0; | 285 virtual physical_web::PhysicalWebDataSource* GetPhysicalWebDataSource() = 0; |
286 | 286 |
287 private: | 287 private: |
288 DISALLOW_COPY_AND_ASSIGN(BrowserProcess); | 288 DISALLOW_COPY_AND_ASSIGN(BrowserProcess); |
289 }; | 289 }; |
290 | 290 |
291 extern BrowserProcess* g_browser_process; | 291 extern BrowserProcess* g_browser_process; |
292 | 292 |
293 #endif // CHROME_BROWSER_BROWSER_PROCESS_H_ | 293 #endif // CHROME_BROWSER_BROWSER_PROCESS_H_ |
OLD | NEW |