Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: chrome/browser/browser_process.h

Issue 9150016: Move creation and ownership of ResourceDispatcherHost and PluginService to content. This gives a ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix chromeos ui_tests Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 class Clipboard; 76 class Clipboard;
77 } 77 }
78 78
79 // NOT THREAD SAFE, call only from the main thread. 79 // NOT THREAD SAFE, call only from the main thread.
80 // These functions shouldn't return NULL unless otherwise noted. 80 // These functions shouldn't return NULL unless otherwise noted.
81 class BrowserProcess { 81 class BrowserProcess {
82 public: 82 public:
83 BrowserProcess(); 83 BrowserProcess();
84 virtual ~BrowserProcess(); 84 virtual ~BrowserProcess();
85 85
86 // Called when the ResourceDispatcherHost object is created by content.
87 virtual void ResourceDispatcherHostCreated() = 0;
88
86 // Invoked when the user is logging out/shutting down. When logging off we may 89 // Invoked when the user is logging out/shutting down. When logging off we may
87 // not have enough time to do a normal shutdown. This method is invoked prior 90 // not have enough time to do a normal shutdown. This method is invoked prior
88 // to normal shutdown and saves any state that must be saved before we are 91 // to normal shutdown and saves any state that must be saved before we are
89 // continue shutdown. 92 // continue shutdown.
90 virtual void EndSession() = 0; 93 virtual void EndSession() = 0;
91 94
92 // Services: any of these getters may return NULL 95 // Services: any of these getters may return NULL
93 virtual ResourceDispatcherHost* resource_dispatcher_host() = 0;
94
95 virtual MetricsService* metrics_service() = 0; 96 virtual MetricsService* metrics_service() = 0;
96 virtual ProfileManager* profile_manager() = 0; 97 virtual ProfileManager* profile_manager() = 0;
97 virtual PrefService* local_state() = 0; 98 virtual PrefService* local_state() = 0;
98 virtual ui::Clipboard* clipboard() = 0; 99 virtual ui::Clipboard* clipboard() = 0;
99 virtual net::URLRequestContextGetter* system_request_context() = 0; 100 virtual net::URLRequestContextGetter* system_request_context() = 0;
100 101
101 #if defined(OS_CHROMEOS) 102 #if defined(OS_CHROMEOS)
102 // Returns the out-of-memory priority manager. 103 // Returns the out-of-memory priority manager.
103 virtual browser::OomPriorityManager* oom_priority_manager() = 0; 104 virtual browser::OomPriorityManager* oom_priority_manager() = 0;
104 #endif // defined(OS_CHROMEOS) 105 #endif // defined(OS_CHROMEOS)
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 204
204 virtual AudioManager* audio_manager() = 0; 205 virtual AudioManager* audio_manager() = 0;
205 206
206 private: 207 private:
207 DISALLOW_COPY_AND_ASSIGN(BrowserProcess); 208 DISALLOW_COPY_AND_ASSIGN(BrowserProcess);
208 }; 209 };
209 210
210 extern BrowserProcess* g_browser_process; 211 extern BrowserProcess* g_browser_process;
211 212
212 #endif // CHROME_BROWSER_BROWSER_PROCESS_H_ 213 #endif // CHROME_BROWSER_BROWSER_PROCESS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698