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 #ifndef CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
6 #define CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 6 #define CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "content/browser/browser_process_sub_thread.h" | 10 #include "content/browser/browser_process_sub_thread.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 namespace net { | 25 namespace net { |
26 class NetworkChangeNotifier; | 26 class NetworkChangeNotifier; |
27 } | 27 } |
28 | 28 |
29 namespace content { | 29 namespace content { |
30 class AudioMirroringManager; | 30 class AudioMirroringManager; |
31 class BrowserMainParts; | 31 class BrowserMainParts; |
32 class BrowserOnlineStateObserver; | 32 class BrowserOnlineStateObserver; |
33 class BrowserShutdownImpl; | 33 class BrowserShutdownImpl; |
34 class BrowserThreadImpl; | 34 class BrowserThreadImpl; |
| 35 class IndexedDBThread; |
35 class MediaStreamManager; | 36 class MediaStreamManager; |
36 class ResourceDispatcherHostImpl; | 37 class ResourceDispatcherHostImpl; |
37 class SpeechRecognitionManagerImpl; | 38 class SpeechRecognitionManagerImpl; |
38 class SystemMessageWindowWin; | 39 class SystemMessageWindowWin; |
39 class WebKitThread; | 40 class WebKitThread; |
40 struct MainFunctionParams; | 41 struct MainFunctionParams; |
41 | 42 |
42 #if defined(OS_LINUX) | 43 #if defined(OS_LINUX) |
43 class DeviceMonitorLinux; | 44 class DeviceMonitorLinux; |
44 #elif defined(OS_MACOSX) | 45 #elif defined(OS_MACOSX) |
(...skipping 23 matching lines...) Expand all Loading... |
68 | 69 |
69 // Performs the shutdown sequence, starting with PostMainMessageLoopRun | 70 // Performs the shutdown sequence, starting with PostMainMessageLoopRun |
70 // through stopping threads to PostDestroyThreads. | 71 // through stopping threads to PostDestroyThreads. |
71 void ShutdownThreadsAndCleanUp(); | 72 void ShutdownThreadsAndCleanUp(); |
72 | 73 |
73 int GetResultCode() const { return result_code_; } | 74 int GetResultCode() const { return result_code_; } |
74 | 75 |
75 // Can be called on any thread. | 76 // Can be called on any thread. |
76 static media::AudioManager* GetAudioManager(); | 77 static media::AudioManager* GetAudioManager(); |
77 static AudioMirroringManager* GetAudioMirroringManager(); | 78 static AudioMirroringManager* GetAudioMirroringManager(); |
| 79 static IndexedDBThread* GetIndexedDBThread(); |
78 static MediaStreamManager* GetMediaStreamManager(); | 80 static MediaStreamManager* GetMediaStreamManager(); |
79 | 81 |
80 private: | 82 private: |
81 // For ShutdownThreadsAndCleanUp. | 83 // For ShutdownThreadsAndCleanUp. |
82 friend class BrowserShutdownImpl; | 84 friend class BrowserShutdownImpl; |
83 | 85 |
84 void InitializeMainThread(); | 86 void InitializeMainThread(); |
85 | 87 |
86 // Called right after the browser threads have been started. | 88 // Called right after the browser threads have been started. |
87 void BrowserThreadsStarted(); | 89 void BrowserThreadsStarted(); |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 scoped_ptr<BrowserThreadImpl> main_thread_; | 123 scoped_ptr<BrowserThreadImpl> main_thread_; |
122 | 124 |
123 // Members initialized in |BrowserThreadsStarted()| -------------------------- | 125 // Members initialized in |BrowserThreadsStarted()| -------------------------- |
124 scoped_ptr<ResourceDispatcherHostImpl> resource_dispatcher_host_; | 126 scoped_ptr<ResourceDispatcherHostImpl> resource_dispatcher_host_; |
125 scoped_ptr<SpeechRecognitionManagerImpl> speech_recognition_manager_; | 127 scoped_ptr<SpeechRecognitionManagerImpl> speech_recognition_manager_; |
126 | 128 |
127 // Members initialized in |RunMainMessageLoopParts()| ------------------------ | 129 // Members initialized in |RunMainMessageLoopParts()| ------------------------ |
128 scoped_ptr<BrowserProcessSubThread> db_thread_; | 130 scoped_ptr<BrowserProcessSubThread> db_thread_; |
129 #if !defined(OS_IOS) | 131 #if !defined(OS_IOS) |
130 scoped_ptr<WebKitThread> webkit_thread_; | 132 scoped_ptr<WebKitThread> webkit_thread_; |
| 133 scoped_ptr<IndexedDBThread> indexed_db_thread_; |
131 #endif | 134 #endif |
132 scoped_ptr<BrowserProcessSubThread> file_user_blocking_thread_; | 135 scoped_ptr<BrowserProcessSubThread> file_user_blocking_thread_; |
133 scoped_ptr<BrowserProcessSubThread> file_thread_; | 136 scoped_ptr<BrowserProcessSubThread> file_thread_; |
134 scoped_ptr<BrowserProcessSubThread> process_launcher_thread_; | 137 scoped_ptr<BrowserProcessSubThread> process_launcher_thread_; |
135 scoped_ptr<BrowserProcessSubThread> cache_thread_; | 138 scoped_ptr<BrowserProcessSubThread> cache_thread_; |
136 scoped_ptr<BrowserProcessSubThread> io_thread_; | 139 scoped_ptr<BrowserProcessSubThread> io_thread_; |
137 scoped_ptr<MemoryObserver> memory_observer_; | 140 scoped_ptr<MemoryObserver> memory_observer_; |
138 | 141 |
139 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); | 142 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); |
140 }; | 143 }; |
141 | 144 |
142 } // namespace content | 145 } // namespace content |
143 | 146 |
144 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 147 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
OLD | NEW |