OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 26 matching lines...) Expand all Loading... |
37 class Profile; | 37 class Profile; |
38 class ProfileManager; | 38 class ProfileManager; |
39 class ResourceDispatcherHost; | 39 class ResourceDispatcherHost; |
40 class SafeBrowsingService; | 40 class SafeBrowsingService; |
41 class SidebarManager; | 41 class SidebarManager; |
42 class StatusTray; | 42 class StatusTray; |
43 class TabCloseableStateWatcher; | 43 class TabCloseableStateWatcher; |
44 class ThumbnailGenerator; | 44 class ThumbnailGenerator; |
45 class WatchDogThread; | 45 class WatchDogThread; |
46 | 46 |
47 namespace base { | |
48 class Thread; | |
49 } | |
50 | |
51 #if defined(OS_CHROMEOS) | 47 #if defined(OS_CHROMEOS) |
52 namespace browser { | 48 namespace browser { |
53 class OomPriorityManager; | 49 class OomPriorityManager; |
54 } | 50 } |
55 #endif // defined(OS_CHROMEOS) | 51 #endif // defined(OS_CHROMEOS) |
56 | 52 |
57 namespace net { | 53 namespace net { |
58 class URLRequestContextGetter; | 54 class URLRequestContextGetter; |
59 } | 55 } |
60 | 56 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 // Returns the out-of-memory priority manager. | 103 // Returns the out-of-memory priority manager. |
108 virtual browser::OomPriorityManager* oom_priority_manager() = 0; | 104 virtual browser::OomPriorityManager* oom_priority_manager() = 0; |
109 #endif // defined(OS_CHROMEOS) | 105 #endif // defined(OS_CHROMEOS) |
110 | 106 |
111 virtual ExtensionEventRouterForwarder* | 107 virtual ExtensionEventRouterForwarder* |
112 extension_event_router_forwarder() = 0; | 108 extension_event_router_forwarder() = 0; |
113 | 109 |
114 // Returns the manager for desktop notifications. | 110 // Returns the manager for desktop notifications. |
115 virtual NotificationUIManager* notification_ui_manager() = 0; | 111 virtual NotificationUIManager* notification_ui_manager() = 0; |
116 | 112 |
117 // Returns the thread that we perform I/O coordination on (network requests, | 113 // Returns the state object for the thread that we perform I/O |
118 // communication with renderers, etc. | 114 // coordination on (network requests, communication with renderers, |
119 // NOTE: You should ONLY use this to pass to IPC or other objects which must | 115 // etc. |
120 // need a MessageLoop*. If you just want to post a task, use | 116 // |
121 // BrowserThread::PostTask (or other variants) as they take care of checking | 117 // Can be NULL close to startup and shutdown. |
122 // that a thread is still alive, race conditions, lifetime differences etc. | 118 // |
123 // If you still must use this check the return value for NULL. | 119 // NOTE: If you want to post a task to the IO thread, use |
| 120 // BrowserThread::PostTask (or other variants). |
124 virtual IOThread* io_thread() = 0; | 121 virtual IOThread* io_thread() = 0; |
125 | 122 |
126 // Returns the thread that we perform random file operations on. For code | |
127 // that wants to do I/O operations (not network requests or even file: URL | |
128 // requests), this is the thread to use to avoid blocking the UI thread. | |
129 // It might be nicer to have a thread pool for this kind of thing. | |
130 virtual base::Thread* file_thread() = 0; | |
131 | |
132 // Returns the thread that is used for database operations such as the web | |
133 // database. History has its own thread since it has much higher traffic. | |
134 virtual base::Thread* db_thread() = 0; | |
135 | |
136 // Returns the thread that is used for health check of all browser threads. | 123 // Returns the thread that is used for health check of all browser threads. |
137 virtual WatchDogThread* watchdog_thread() = 0; | 124 virtual WatchDogThread* watchdog_thread() = 0; |
138 | 125 |
139 #if defined(OS_CHROMEOS) | |
140 // Returns thread for websocket to TCP proxy. | |
141 // TODO(dilmah): remove this thread. Instead provide this functionality via | |
142 // hooks into websocket bridge layer. | |
143 virtual base::Thread* web_socket_proxy_thread() = 0; | |
144 #endif | |
145 | |
146 virtual policy::BrowserPolicyConnector* browser_policy_connector() = 0; | 126 virtual policy::BrowserPolicyConnector* browser_policy_connector() = 0; |
147 | 127 |
148 virtual IconManager* icon_manager() = 0; | 128 virtual IconManager* icon_manager() = 0; |
149 | 129 |
150 virtual ThumbnailGenerator* GetThumbnailGenerator() = 0; | 130 virtual ThumbnailGenerator* GetThumbnailGenerator() = 0; |
151 | 131 |
152 virtual AutomationProviderList* GetAutomationProviderList() = 0; | 132 virtual AutomationProviderList* GetAutomationProviderList() = 0; |
153 | 133 |
154 virtual void InitDevToolsHttpProtocolHandler( | 134 virtual void InitDevToolsHttpProtocolHandler( |
155 Profile* profile, | 135 Profile* profile, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 202 |
223 virtual CRLSetFetcher* crl_set_fetcher() = 0; | 203 virtual CRLSetFetcher* crl_set_fetcher() = 0; |
224 | 204 |
225 private: | 205 private: |
226 DISALLOW_COPY_AND_ASSIGN(BrowserProcess); | 206 DISALLOW_COPY_AND_ASSIGN(BrowserProcess); |
227 }; | 207 }; |
228 | 208 |
229 extern BrowserProcess* g_browser_process; | 209 extern BrowserProcess* g_browser_process; |
230 | 210 |
231 #endif // CHROME_BROWSER_BROWSER_PROCESS_H_ | 211 #endif // CHROME_BROWSER_BROWSER_PROCESS_H_ |
OLD | NEW |