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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 class BrowserMainParts; | 44 class BrowserMainParts; |
45 class BrowserShutdownImpl; | 45 class BrowserShutdownImpl; |
46 class BrowserThreadImpl; | 46 class BrowserThreadImpl; |
47 class ResourceDispatcherHostImpl; | 47 class ResourceDispatcherHostImpl; |
48 class WebKitThread; | 48 class WebKitThread; |
49 struct MainFunctionParams; | 49 struct MainFunctionParams; |
50 | 50 |
51 #if defined(OS_LINUX) | 51 #if defined(OS_LINUX) |
52 class DeviceMonitorLinux; | 52 class DeviceMonitorLinux; |
| 53 #elif defined(OS_MACOSX) |
| 54 class DeviceMonitorMac; |
53 #endif | 55 #endif |
54 | 56 |
55 // Implements the main browser loop stages called from BrowserMainRunner. | 57 // Implements the main browser loop stages called from BrowserMainRunner. |
56 // See comments in browser_main_parts.h for additional info. | 58 // See comments in browser_main_parts.h for additional info. |
57 // All functions are to be called only on the UI thread unless otherwise noted. | 59 // All functions are to be called only on the UI thread unless otherwise noted. |
58 class BrowserMainLoop { | 60 class BrowserMainLoop { |
59 public: | 61 public: |
60 explicit BrowserMainLoop(const content::MainFunctionParams& parameters); | 62 explicit BrowserMainLoop(const content::MainFunctionParams& parameters); |
61 virtual ~BrowserMainLoop(); | 63 virtual ~BrowserMainLoop(); |
62 | 64 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_; | 106 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_; |
105 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; | 107 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
106 scoped_ptr<media::AudioManager> audio_manager_; | 108 scoped_ptr<media::AudioManager> audio_manager_; |
107 scoped_ptr<media_stream::MediaStreamManager> media_stream_manager_; | 109 scoped_ptr<media_stream::MediaStreamManager> media_stream_manager_; |
108 // Per-process listener for online state changes. | 110 // Per-process listener for online state changes. |
109 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; | 111 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; |
110 #if defined(OS_WIN) | 112 #if defined(OS_WIN) |
111 scoped_ptr<SystemMessageWindowWin> system_message_window_; | 113 scoped_ptr<SystemMessageWindowWin> system_message_window_; |
112 #elif defined(OS_LINUX) | 114 #elif defined(OS_LINUX) |
113 scoped_ptr<DeviceMonitorLinux> device_monitor_linux_; | 115 scoped_ptr<DeviceMonitorLinux> device_monitor_linux_; |
| 116 #elif defined(OS_MACOSX) |
| 117 scoped_ptr<DeviceMonitorMac> device_monitor_mac_; |
114 #endif | 118 #endif |
115 | 119 |
116 // Destroy parts_ before main_message_loop_ (required) and before other | 120 // Destroy parts_ before main_message_loop_ (required) and before other |
117 // classes constructed in content (but after main_thread_). | 121 // classes constructed in content (but after main_thread_). |
118 scoped_ptr<BrowserMainParts> parts_; | 122 scoped_ptr<BrowserMainParts> parts_; |
119 | 123 |
120 // Members initialized in |InitializeMainThread()| --------------------------- | 124 // Members initialized in |InitializeMainThread()| --------------------------- |
121 // This must get destroyed before other threads that are created in parts_. | 125 // This must get destroyed before other threads that are created in parts_. |
122 scoped_ptr<BrowserThreadImpl> main_thread_; | 126 scoped_ptr<BrowserThreadImpl> main_thread_; |
123 | 127 |
(...skipping 13 matching lines...) Expand all Loading... |
137 #if defined(OS_WIN) | 141 #if defined(OS_WIN) |
138 ui::ScopedOleInitializer ole_initializer_; | 142 ui::ScopedOleInitializer ole_initializer_; |
139 #endif | 143 #endif |
140 | 144 |
141 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); | 145 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); |
142 }; | 146 }; |
143 | 147 |
144 } // namespace content | 148 } // namespace content |
145 | 149 |
146 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 150 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
OLD | NEW |