Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: content/browser/browser_main_loop.h

Issue 11339014: Move content\browser\renderer_host\media to content namespace. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
11 11
12 class BrowserOnlineStateObserver; 12 class BrowserOnlineStateObserver;
13 class CommandLine; 13 class CommandLine;
14 class HighResolutionTimerManager; 14 class HighResolutionTimerManager;
15 class MessageLoop; 15 class MessageLoop;
16 class SystemMessageWindowWin; 16 class SystemMessageWindowWin;
17 17
18 namespace base { 18 namespace base {
19 class SystemMonitor; 19 class SystemMonitor;
20 } 20 }
21 21
22 namespace media { 22 namespace media {
23 class AudioManager; 23 class AudioManager;
24 } 24 }
25 25
26 namespace media_stream {
27 class MediaStreamManager;
28 }
29
30 namespace net { 26 namespace net {
31 class NetworkChangeNotifier; 27 class NetworkChangeNotifier;
32 } 28 }
33 29
34 namespace content { 30 namespace content {
35 31
36 class BrowserMainParts; 32 class BrowserMainParts;
37 class BrowserShutdownImpl; 33 class BrowserShutdownImpl;
38 class BrowserThreadImpl; 34 class BrowserThreadImpl;
35 class MediaStreamManager;
39 class ResourceDispatcherHostImpl; 36 class ResourceDispatcherHostImpl;
40 class SpeechRecognitionManagerImpl; 37 class SpeechRecognitionManagerImpl;
41 class WebKitThread; 38 class WebKitThread;
42 struct MainFunctionParams; 39 struct MainFunctionParams;
43 40
44 #if defined(OS_LINUX) 41 #if defined(OS_LINUX)
45 class DeviceMonitorLinux; 42 class DeviceMonitorLinux;
46 #elif defined(OS_MACOSX) 43 #elif defined(OS_MACOSX)
47 class DeviceMonitorMac; 44 class DeviceMonitorMac;
48 #endif 45 #endif
(...skipping 19 matching lines...) Expand all
68 void RunMainMessageLoopParts(); 65 void RunMainMessageLoopParts();
69 66
70 // Performs the shutdown sequence, starting with PostMainMessageLoopRun 67 // Performs the shutdown sequence, starting with PostMainMessageLoopRun
71 // through stopping threads to PostDestroyThreads. 68 // through stopping threads to PostDestroyThreads.
72 void ShutdownThreadsAndCleanUp(); 69 void ShutdownThreadsAndCleanUp();
73 70
74 int GetResultCode() const { return result_code_; } 71 int GetResultCode() const { return result_code_; }
75 72
76 // Can be called on any thread. 73 // Can be called on any thread.
77 static media::AudioManager* GetAudioManager(); 74 static media::AudioManager* GetAudioManager();
78 static media_stream::MediaStreamManager* GetMediaStreamManager(); 75 static MediaStreamManager* GetMediaStreamManager();
79 76
80 private: 77 private:
81 // For ShutdownThreadsAndCleanUp. 78 // For ShutdownThreadsAndCleanUp.
82 friend class BrowserShutdownImpl; 79 friend class BrowserShutdownImpl;
83 80
84 void InitializeMainThread(); 81 void InitializeMainThread();
85 82
86 // Called right after the browser threads have been started. 83 // Called right after the browser threads have been started.
87 void BrowserThreadsStarted(); 84 void BrowserThreadsStarted();
88 85
89 void MainMessageLoopRun(); 86 void MainMessageLoopRun();
90 87
91 // Members initialized on construction --------------------------------------- 88 // Members initialized on construction ---------------------------------------
92 const content::MainFunctionParams& parameters_; 89 const content::MainFunctionParams& parameters_;
93 const CommandLine& parsed_command_line_; 90 const CommandLine& parsed_command_line_;
94 int result_code_; 91 int result_code_;
95 92
96 // Members initialized in |MainMessageLoopStart()| --------------------------- 93 // Members initialized in |MainMessageLoopStart()| ---------------------------
97 scoped_ptr<MessageLoop> main_message_loop_; 94 scoped_ptr<MessageLoop> main_message_loop_;
98 scoped_ptr<base::SystemMonitor> system_monitor_; 95 scoped_ptr<base::SystemMonitor> system_monitor_;
99 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_; 96 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_;
100 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; 97 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_;
101 scoped_ptr<media::AudioManager> audio_manager_; 98 scoped_ptr<media::AudioManager> audio_manager_;
102 scoped_ptr<media_stream::MediaStreamManager> media_stream_manager_; 99 scoped_ptr<MediaStreamManager> media_stream_manager_;
103 // Per-process listener for online state changes. 100 // Per-process listener for online state changes.
104 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; 101 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_;
105 #if defined(OS_WIN) 102 #if defined(OS_WIN)
106 scoped_ptr<SystemMessageWindowWin> system_message_window_; 103 scoped_ptr<SystemMessageWindowWin> system_message_window_;
107 #elif defined(OS_LINUX) 104 #elif defined(OS_LINUX)
108 scoped_ptr<DeviceMonitorLinux> device_monitor_linux_; 105 scoped_ptr<DeviceMonitorLinux> device_monitor_linux_;
109 #elif defined(OS_MACOSX) && !defined(OS_IOS) 106 #elif defined(OS_MACOSX) && !defined(OS_IOS)
110 scoped_ptr<DeviceMonitorMac> device_monitor_mac_; 107 scoped_ptr<DeviceMonitorMac> device_monitor_mac_;
111 #endif 108 #endif
112 109
(...skipping 19 matching lines...) Expand all
132 scoped_ptr<BrowserProcessSubThread> process_launcher_thread_; 129 scoped_ptr<BrowserProcessSubThread> process_launcher_thread_;
133 scoped_ptr<BrowserProcessSubThread> cache_thread_; 130 scoped_ptr<BrowserProcessSubThread> cache_thread_;
134 scoped_ptr<BrowserProcessSubThread> io_thread_; 131 scoped_ptr<BrowserProcessSubThread> io_thread_;
135 132
136 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); 133 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop);
137 }; 134 };
138 135
139 } // namespace content 136 } // namespace content
140 137
141 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ 138 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698