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

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

Issue 10662049: Move the device enumerate/open/close work to device thread from IO thread (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small changes to fix the trybots' failure Created 8 years, 5 months 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
« no previous file with comments | « no previous file | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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 10 matching lines...) Expand all
21 class SystemMessageWindowWin; 21 class SystemMessageWindowWin;
22 22
23 namespace base { 23 namespace base {
24 class SystemMonitor; 24 class SystemMonitor;
25 } 25 }
26 26
27 namespace media { 27 namespace media {
28 class AudioManager; 28 class AudioManager;
29 } 29 }
30 30
31 namespace media_stream {
32 class MediaStreamManager;
33 }
34
31 namespace net { 35 namespace net {
32 class NetworkChangeNotifier; 36 class NetworkChangeNotifier;
33 } 37 }
34 38
35 namespace speech { 39 namespace speech {
36 class SpeechRecognitionManagerImpl; 40 class SpeechRecognitionManagerImpl;
37 } 41 }
38 42
39 namespace content { 43 namespace content {
40 44
(...skipping 25 matching lines...) Expand all
66 void RunMainMessageLoopParts(); 70 void RunMainMessageLoopParts();
67 71
68 // Performs the shutdown sequence, starting with PostMainMessageLoopRun 72 // Performs the shutdown sequence, starting with PostMainMessageLoopRun
69 // through stopping threads to PostDestroyThreads. 73 // through stopping threads to PostDestroyThreads.
70 void ShutdownThreadsAndCleanUp(); 74 void ShutdownThreadsAndCleanUp();
71 75
72 int GetResultCode() const { return result_code_; } 76 int GetResultCode() const { return result_code_; }
73 77
74 // Can be called on any thread. 78 // Can be called on any thread.
75 static media::AudioManager* GetAudioManager(); 79 static media::AudioManager* GetAudioManager();
80 static media_stream::MediaStreamManager* GetMediaStreamManager();
76 81
77 private: 82 private:
78 // For ShutdownThreadsAndCleanUp. 83 // For ShutdownThreadsAndCleanUp.
79 friend class BrowserShutdownImpl; 84 friend class BrowserShutdownImpl;
80 85
81 void InitializeMainThread(); 86 void InitializeMainThread();
82 87
83 // Called right after the browser threads have been started. 88 // Called right after the browser threads have been started.
84 void BrowserThreadsStarted(); 89 void BrowserThreadsStarted();
85 90
86 void MainMessageLoopRun(); 91 void MainMessageLoopRun();
87 92
88 // Members initialized on construction --------------------------------------- 93 // Members initialized on construction ---------------------------------------
89 const content::MainFunctionParams& parameters_; 94 const content::MainFunctionParams& parameters_;
90 const CommandLine& parsed_command_line_; 95 const CommandLine& parsed_command_line_;
91 int result_code_; 96 int result_code_;
92 97
93 // Members initialized in |MainMessageLoopStart()| --------------------------- 98 // Members initialized in |MainMessageLoopStart()| ---------------------------
94 scoped_ptr<MessageLoop> main_message_loop_; 99 scoped_ptr<MessageLoop> main_message_loop_;
95 scoped_ptr<base::SystemMonitor> system_monitor_; 100 scoped_ptr<base::SystemMonitor> system_monitor_;
96 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_; 101 scoped_ptr<HighResolutionTimerManager> hi_res_timer_manager_;
97 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_; 102 scoped_ptr<net::NetworkChangeNotifier> network_change_notifier_;
98 scoped_ptr<media::AudioManager> audio_manager_; 103 scoped_ptr<media::AudioManager> audio_manager_;
104 scoped_ptr<media_stream::MediaStreamManager> media_stream_manager_;
99 // Per-process listener for online state changes. 105 // Per-process listener for online state changes.
100 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_; 106 scoped_ptr<BrowserOnlineStateObserver> online_state_observer_;
101 #if defined(OS_WIN) 107 #if defined(OS_WIN)
102 scoped_ptr<SystemMessageWindowWin> system_message_window_; 108 scoped_ptr<SystemMessageWindowWin> system_message_window_;
103 #endif 109 #endif
104 110
105 // Destroy parts_ before main_message_loop_ (required) and before other 111 // Destroy parts_ before main_message_loop_ (required) and before other
106 // classes constructed in content (but after main_thread_). 112 // classes constructed in content (but after main_thread_).
107 scoped_ptr<BrowserMainParts> parts_; 113 scoped_ptr<BrowserMainParts> parts_;
108 114
(...skipping 17 matching lines...) Expand all
126 #if defined(OS_WIN) 132 #if defined(OS_WIN)
127 ui::ScopedOleInitializer ole_initializer_; 133 ui::ScopedOleInitializer ole_initializer_;
128 #endif 134 #endif
129 135
130 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); 136 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop);
131 }; 137 };
132 138
133 } // namespace content 139 } // namespace content
134 140
135 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ 141 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698