| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_ |
| 11 #define CHROME_BROWSER_BROWSER_PROCESS_H_ | 11 #define CHROME_BROWSER_BROWSER_PROCESS_H_ |
| 12 | 12 |
| 13 #include <string> | 13 #include <string> |
| 14 #include <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
| 17 #include "ipc/ipc_message.h" | 17 #include "ipc/ipc_message.h" |
| 18 | 18 |
| 19 class AutomationProviderList; | 19 class AutomationProviderList; |
| 20 class Clipboard; | 20 class Clipboard; |
| 21 class DevToolsManager; | 21 class DevToolsManager; |
| 22 class DownloadRequestManager; | 22 class DownloadRequestManager; |
| 23 class GoogleURLTracker; | 23 class GoogleURLTracker; |
| 24 class IconManager; | 24 class IconManager; |
| 25 class MetricsService; | 25 class MetricsService; |
| 26 class NotificationUIManager; |
| 26 class PrefService; | 27 class PrefService; |
| 27 class ProfileManager; | 28 class ProfileManager; |
| 28 class DebuggerWrapper; | 29 class DebuggerWrapper; |
| 29 class ResourceDispatcherHost; | 30 class ResourceDispatcherHost; |
| 30 class SuspendController; | 31 class SuspendController; |
| 31 class ThumbnailGenerator; | 32 class ThumbnailGenerator; |
| 32 class WebAppInstallerService; | 33 class WebAppInstallerService; |
| 33 | 34 |
| 34 namespace base { | 35 namespace base { |
| 35 class Thread; | 36 class Thread; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 62 // Services: any of these getters may return NULL | 63 // Services: any of these getters may return NULL |
| 63 virtual ResourceDispatcherHost* resource_dispatcher_host() = 0; | 64 virtual ResourceDispatcherHost* resource_dispatcher_host() = 0; |
| 64 | 65 |
| 65 virtual MetricsService* metrics_service() = 0; | 66 virtual MetricsService* metrics_service() = 0; |
| 66 virtual ProfileManager* profile_manager() = 0; | 67 virtual ProfileManager* profile_manager() = 0; |
| 67 virtual PrefService* local_state() = 0; | 68 virtual PrefService* local_state() = 0; |
| 68 virtual DebuggerWrapper* debugger_wrapper() = 0; | 69 virtual DebuggerWrapper* debugger_wrapper() = 0; |
| 69 virtual DevToolsManager* devtools_manager() = 0; | 70 virtual DevToolsManager* devtools_manager() = 0; |
| 70 virtual Clipboard* clipboard() = 0; | 71 virtual Clipboard* clipboard() = 0; |
| 71 | 72 |
| 73 // Returns the manager for desktop notifications. |
| 74 virtual NotificationUIManager* notification_ui_manager() = 0; |
| 75 |
| 72 // Returns the thread that we perform I/O coordination on (network requests, | 76 // Returns the thread that we perform I/O coordination on (network requests, |
| 73 // communication with renderers, etc. | 77 // communication with renderers, etc. |
| 74 // NOTE: You should ONLY use this to pass to IPC or other objects which must | 78 // NOTE: You should ONLY use this to pass to IPC or other objects which must |
| 75 // need a MessageLoop*. If you just want to post a task, use | 79 // need a MessageLoop*. If you just want to post a task, use |
| 76 // ChromeThread::PostTask (or other variants) as they take care of checking | 80 // ChromeThread::PostTask (or other variants) as they take care of checking |
| 77 // that a thread is still alive, race conditions, lifetime differences etc. | 81 // that a thread is still alive, race conditions, lifetime differences etc. |
| 78 // If you still must use this, need to check the return value for NULL. | 82 // If you still must use this, need to check the return value for NULL. |
| 79 virtual base::Thread* io_thread() = 0; | 83 virtual base::Thread* io_thread() = 0; |
| 80 | 84 |
| 81 // Returns the thread that we perform random file operations on. For code | 85 // Returns the thread that we perform random file operations on. For code |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 private: | 155 private: |
| 152 // User-data-dir based profiles. | 156 // User-data-dir based profiles. |
| 153 std::vector<std::wstring> user_data_dir_profiles_; | 157 std::vector<std::wstring> user_data_dir_profiles_; |
| 154 | 158 |
| 155 DISALLOW_COPY_AND_ASSIGN(BrowserProcess); | 159 DISALLOW_COPY_AND_ASSIGN(BrowserProcess); |
| 156 }; | 160 }; |
| 157 | 161 |
| 158 extern BrowserProcess* g_browser_process; | 162 extern BrowserProcess* g_browser_process; |
| 159 | 163 |
| 160 #endif // CHROME_BROWSER_BROWSER_PROCESS_H_ | 164 #endif // CHROME_BROWSER_BROWSER_PROCESS_H_ |
| OLD | NEW |