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 // When each service is created, we set a flag indicating this. At this point, | 5 // When each service is created, we set a flag indicating this. At this point, |
6 // the service initialization could fail or succeed. This allows us to remember | 6 // the service initialization could fail or succeed. This allows us to remember |
7 // if we tried to create a service, and not try creating it over and over if | 7 // if we tried to create a service, and not try creating it over and over if |
8 // the creation failed. | 8 // the creation failed. |
9 | 9 |
10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 10 #ifndef CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
11 #define CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 11 #define CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
12 | 12 |
13 #include <string> | 13 #include <string> |
14 | 14 |
15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
16 #include "base/debug/stack_trace.h" | 16 #include "base/debug/stack_trace.h" |
17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
19 #include "base/prefs/pref_change_registrar.h" | 19 #include "base/prefs/pref_change_registrar.h" |
20 #include "base/threading/non_thread_safe.h" | 20 #include "base/threading/non_thread_safe.h" |
21 #include "base/timer/timer.h" | 21 #include "base/timer/timer.h" |
22 #include "chrome/browser/browser_process.h" | 22 #include "chrome/browser/browser_process.h" |
23 | 23 |
24 class ChromeNetLog; | 24 class ChromeNetLog; |
25 class ChromeResourceDispatcherHostDelegate; | 25 class ChromeResourceDispatcherHostDelegate; |
26 class CommandLine; | |
27 class RemoteDebuggingServer; | 26 class RemoteDebuggingServer; |
28 class PrefRegistrySimple; | 27 class PrefRegistrySimple; |
29 class PromoResourceService; | 28 class PromoResourceService; |
30 | 29 |
31 #if defined(ENABLE_PLUGIN_INSTALLATION) | 30 #if defined(ENABLE_PLUGIN_INSTALLATION) |
32 class PluginsResourceService; | 31 class PluginsResourceService; |
33 #endif | 32 #endif |
34 | 33 |
35 namespace base { | 34 namespace base { |
| 35 class CommandLine; |
36 class SequencedTaskRunner; | 36 class SequencedTaskRunner; |
37 } | 37 } |
38 | 38 |
39 namespace extensions { | 39 namespace extensions { |
40 class ExtensionsBrowserClient; | 40 class ExtensionsBrowserClient; |
41 } | 41 } |
42 | 42 |
43 namespace policy { | 43 namespace policy { |
44 class BrowserPolicyConnector; | 44 class BrowserPolicyConnector; |
45 class PolicyService; | 45 class PolicyService; |
46 }; | 46 }; |
47 | 47 |
48 // Real implementation of BrowserProcess that creates and returns the services. | 48 // Real implementation of BrowserProcess that creates and returns the services. |
49 class BrowserProcessImpl : public BrowserProcess, | 49 class BrowserProcessImpl : public BrowserProcess, |
50 public base::NonThreadSafe { | 50 public base::NonThreadSafe { |
51 public: | 51 public: |
52 // |local_state_task_runner| must be a shutdown-blocking task runner. | 52 // |local_state_task_runner| must be a shutdown-blocking task runner. |
53 BrowserProcessImpl(base::SequencedTaskRunner* local_state_task_runner, | 53 BrowserProcessImpl(base::SequencedTaskRunner* local_state_task_runner, |
54 const CommandLine& command_line); | 54 const base::CommandLine& command_line); |
55 virtual ~BrowserProcessImpl(); | 55 virtual ~BrowserProcessImpl(); |
56 | 56 |
57 // Called before the browser threads are created. | 57 // Called before the browser threads are created. |
58 void PreCreateThreads(); | 58 void PreCreateThreads(); |
59 | 59 |
60 // Called after the threads have been created but before the message loops | 60 // Called after the threads have been created but before the message loops |
61 // starts running. Allows the browser process to do any initialization that | 61 // starts running. Allows the browser process to do any initialization that |
62 // requires all threads running. | 62 // requires all threads running. |
63 void PreMainMessageLoopRun(); | 63 void PreMainMessageLoopRun(); |
64 | 64 |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 | 294 |
295 #if defined(ENABLE_WEBRTC) | 295 #if defined(ENABLE_WEBRTC) |
296 // Lazily initialized. | 296 // Lazily initialized. |
297 scoped_ptr<WebRtcLogUploader> webrtc_log_uploader_; | 297 scoped_ptr<WebRtcLogUploader> webrtc_log_uploader_; |
298 #endif | 298 #endif |
299 | 299 |
300 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); | 300 DISALLOW_COPY_AND_ASSIGN(BrowserProcessImpl); |
301 }; | 301 }; |
302 | 302 |
303 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ | 303 #endif // CHROME_BROWSER_BROWSER_PROCESS_IMPL_H_ |
OLD | NEW |