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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 namespace net { | 31 namespace net { |
32 class NetworkChangeNotifier; | 32 class NetworkChangeNotifier; |
33 } | 33 } |
34 | 34 |
35 namespace content { | 35 namespace content { |
36 | 36 |
37 class BrowserMainParts; | 37 class BrowserMainParts; |
38 class BrowserShutdownImpl; | 38 class BrowserShutdownImpl; |
39 class BrowserThreadImpl; | 39 class BrowserThreadImpl; |
40 struct MainFunctionParams; | 40 struct MainFunctionParams; |
41 class MediaDeviceNotificationsLinux; | |
42 class ResourceDispatcherHostImpl; | 41 class ResourceDispatcherHostImpl; |
43 class WebKitThread; | 42 class WebKitThread; |
44 | 43 |
45 // Implements the main browser loop stages called from |BrowserMain()|. | 44 // Implements the main browser loop stages called from |BrowserMain()|. |
46 // See comments in browser_main_parts.h for additional info. | 45 // See comments in browser_main_parts.h for additional info. |
47 // All functions are to be called only on the UI thread unless otherwise noted. | 46 // All functions are to be called only on the UI thread unless otherwise noted. |
48 class BrowserMainLoop { | 47 class BrowserMainLoop { |
49 public: | 48 public: |
50 explicit BrowserMainLoop(const content::MainFunctionParams& parameters); | 49 explicit BrowserMainLoop(const content::MainFunctionParams& parameters); |
51 virtual ~BrowserMainLoop(); | 50 virtual ~BrowserMainLoop(); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // Members initialized in |MainMessageLoopStart()| --------------------------- | 89 // Members initialized in |MainMessageLoopStart()| --------------------------- |
91 scoped_ptr<MessageLoop> main_message_loop_; | 90 scoped_ptr<MessageLoop> main_message_loop_; |
92 scoped_ptr<base::SystemMonitor> system_monitor_; | 91 scoped_ptr<base::SystemMonitor> system_monitor_; |
93 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_; | 92 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_; |
94 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; | 93 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; |
95 scoped_ptr<media::AudioManager> audio_manager_; | 94 scoped_ptr<media::AudioManager> audio_manager_; |
96 // Per-process listener for online state changes. | 95 // Per-process listener for online state changes. |
97 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; | 96 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; |
98 #if defined(OS_WIN) | 97 #if defined(OS_WIN) |
99 scoped_ptr<SystemMessageWindowWin> system_message_window_; | 98 scoped_ptr<SystemMessageWindowWin> system_message_window_; |
100 #elif defined(OS_LINUX) | |
101 scoped_refptr<MediaDeviceNotificationsLinux> | |
102 media_device_notifications_linux_; | |
103 #endif | 99 #endif |
104 | 100 |
105 // Destroy parts_ before main_message_loop_ (required) and before other | 101 // Destroy parts_ before main_message_loop_ (required) and before other |
106 // classes constructed in content (but after main_thread_). | 102 // classes constructed in content (but after main_thread_). |
107 scoped_ptr<BrowserMainParts> parts_; | 103 scoped_ptr<BrowserMainParts> parts_; |
108 | 104 |
109 // Members initialized in |InitializeMainThread()| --------------------------- | 105 // Members initialized in |InitializeMainThread()| --------------------------- |
110 // This must get destroyed before other threads that are created in parts_. | 106 // This must get destroyed before other threads that are created in parts_. |
111 scoped_ptr<BrowserThreadImpl> main_thread_; | 107 scoped_ptr<BrowserThreadImpl> main_thread_; |
112 | 108 |
(...skipping 12 matching lines...) Expand all Loading... |
125 #if defined(OS_WIN) | 121 #if defined(OS_WIN) |
126 ui::ScopedOleInitializer ole_initializer_; | 122 ui::ScopedOleInitializer ole_initializer_; |
127 #endif | 123 #endif |
128 | 124 |
129 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); | 125 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); |
130 }; | 126 }; |
131 | 127 |
132 } // namespace content | 128 } // namespace content |
133 | 129 |
134 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ | 130 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ |
OLD | NEW |