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 26 matching lines...) Expand all Loading... | |
37 | 37 |
38 namespace speech { | 38 namespace speech { |
39 class SpeechRecognitionManagerImpl; | 39 class SpeechRecognitionManagerImpl; |
40 } | 40 } |
41 | 41 |
42 namespace content { | 42 namespace content { |
43 | 43 |
44 class BrowserMainParts; | 44 class BrowserMainParts; |
45 class BrowserShutdownImpl; | 45 class BrowserShutdownImpl; |
46 class BrowserThreadImpl; | 46 class BrowserThreadImpl; |
47 #if defined(OS_LINUX) | |
jam
2012/07/31 15:46:05
nit: can you move this after the class/struct sect
wjia(left Chromium)
2012/07/31 18:19:08
Done.
| |
48 class DeviceMonitorLinux; | |
49 #endif | |
47 struct MainFunctionParams; | 50 struct MainFunctionParams; |
48 class ResourceDispatcherHostImpl; | 51 class ResourceDispatcherHostImpl; |
49 class WebKitThread; | 52 class WebKitThread; |
50 | 53 |
51 // Implements the main browser loop stages called from BrowserMainRunner. | 54 // Implements the main browser loop stages called from BrowserMainRunner. |
52 // See comments in browser_main_parts.h for additional info. | 55 // See comments in browser_main_parts.h for additional info. |
53 // All functions are to be called only on the UI thread unless otherwise noted. | 56 // All functions are to be called only on the UI thread unless otherwise noted. |
54 class BrowserMainLoop { | 57 class BrowserMainLoop { |
55 public: | 58 public: |
56 explicit BrowserMainLoop(const content::MainFunctionParams& parameters); | 59 explicit BrowserMainLoop(const content::MainFunctionParams& parameters); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 scoped_ptr<MessageLoop> main_message_loop_; | 101 scoped_ptr<MessageLoop> main_message_loop_; |
99 scoped_ptr<base::SystemMonitor> system_monitor_; | 102 scoped_ptr<base::SystemMonitor> system_monitor_; |
100 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_; | 103 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_; |
101 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; | 104 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
102 scoped_ptr<media::AudioManager> audio_manager_; | 105 scoped_ptr<media::AudioManager> audio_manager_; |
103 scoped_ptr<media_stream::MediaStreamManager> media_stream_manager_; | 106 scoped_ptr<media_stream::MediaStreamManager> media_stream_manager_; |
104 // Per-process listener for online state changes. | 107 // Per-process listener for online state changes. |
105 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; | 108 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; |
106 #if defined(OS_WIN) | 109 #if defined(OS_WIN) |
107 scoped_ptr<SystemMessageWindowWin> system_message_window_; | 110 scoped_ptr<SystemMessageWindowWin> system_message_window_; |
111 #elif defined(OS_LINUX) | |
112 scoped_ptr<DeviceMonitorLinux> device_monitor_linux_; | |
108 #endif | 113 #endif |
109 | 114 |
110 // Destroy parts_ before main_message_loop_ (required) and before other | 115 // Destroy parts_ before main_message_loop_ (required) and before other |
111 // classes constructed in content (but after main_thread_). | 116 // classes constructed in content (but after main_thread_). |
112 scoped_ptr<BrowserMainParts> parts_; | 117 scoped_ptr<BrowserMainParts> parts_; |
113 | 118 |
114 // Members initialized in |InitializeMainThread()| --------------------------- | 119 // Members initialized in |InitializeMainThread()| --------------------------- |
115 // This must get destroyed before other threads that are created in parts_. | 120 // This must get destroyed before other threads that are created in parts_. |
116 scoped_ptr<BrowserThreadImpl> main_thread_; | 121 scoped_ptr<BrowserThreadImpl> main_thread_; |
117 | 122 |
(...skipping 13 matching lines...) Expand all Loading... | |
131 #if defined(OS_WIN) | 136 #if defined(OS_WIN) |
132 ui::ScopedOleInitializer ole_initializer_; | 137 ui::ScopedOleInitializer ole_initializer_; |
133 #endif | 138 #endif |
134 | 139 |
135 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); | 140 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); |
136 }; | 141 }; |
137 | 142 |
138 } // namespace content | 143 } // namespace content |
139 | 144 |
140 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 145 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
OLD | NEW |