| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 class Clipboard; | 77 class Clipboard; |
| 78 } | 78 } |
| 79 | 79 |
| 80 // NOT THREAD SAFE, call only from the main thread. | 80 // NOT THREAD SAFE, call only from the main thread. |
| 81 // These functions shouldn't return NULL unless otherwise noted. | 81 // These functions shouldn't return NULL unless otherwise noted. |
| 82 class BrowserProcess { | 82 class BrowserProcess { |
| 83 public: | 83 public: |
| 84 BrowserProcess(); | 84 BrowserProcess(); |
| 85 virtual ~BrowserProcess(); | 85 virtual ~BrowserProcess(); |
| 86 | 86 |
| 87 // Called when the ResourceDispatcherHost object is created by content. |
| 88 virtual void ResourceDispatcherHostCreated() = 0; |
| 89 |
| 87 // Invoked when the user is logging out/shutting down. When logging off we may | 90 // Invoked when the user is logging out/shutting down. When logging off we may |
| 88 // not have enough time to do a normal shutdown. This method is invoked prior | 91 // not have enough time to do a normal shutdown. This method is invoked prior |
| 89 // to normal shutdown and saves any state that must be saved before we are | 92 // to normal shutdown and saves any state that must be saved before we are |
| 90 // continue shutdown. | 93 // continue shutdown. |
| 91 virtual void EndSession() = 0; | 94 virtual void EndSession() = 0; |
| 92 | 95 |
| 93 // Services: any of these getters may return NULL | 96 // Services: any of these getters may return NULL |
| 94 virtual ResourceDispatcherHost* resource_dispatcher_host() = 0; | |
| 95 | |
| 96 virtual MetricsService* metrics_service() = 0; | 97 virtual MetricsService* metrics_service() = 0; |
| 97 virtual ProfileManager* profile_manager() = 0; | 98 virtual ProfileManager* profile_manager() = 0; |
| 98 virtual PrefService* local_state() = 0; | 99 virtual PrefService* local_state() = 0; |
| 99 virtual SidebarManager* sidebar_manager() = 0; | 100 virtual SidebarManager* sidebar_manager() = 0; |
| 100 virtual ui::Clipboard* clipboard() = 0; | 101 virtual ui::Clipboard* clipboard() = 0; |
| 101 virtual net::URLRequestContextGetter* system_request_context() = 0; | 102 virtual net::URLRequestContextGetter* system_request_context() = 0; |
| 102 | 103 |
| 103 #if defined(OS_CHROMEOS) | 104 #if defined(OS_CHROMEOS) |
| 104 // Returns the out-of-memory priority manager. | 105 // Returns the out-of-memory priority manager. |
| 105 virtual browser::OomPriorityManager* oom_priority_manager() = 0; | 106 virtual browser::OomPriorityManager* oom_priority_manager() = 0; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 206 |
| 206 virtual AudioManager* audio_manager() = 0; | 207 virtual AudioManager* audio_manager() = 0; |
| 207 | 208 |
| 208 private: | 209 private: |
| 209 DISALLOW_COPY_AND_ASSIGN(BrowserProcess); | 210 DISALLOW_COPY_AND_ASSIGN(BrowserProcess); |
| 210 }; | 211 }; |
| 211 | 212 |
| 212 extern BrowserProcess* g_browser_process; | 213 extern BrowserProcess* g_browser_process; |
| 213 | 214 |
| 214 #endif // CHROME_BROWSER_BROWSER_PROCESS_H_ | 215 #endif // CHROME_BROWSER_BROWSER_PROCESS_H_ |
| OLD | NEW |