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

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

Issue 2077983003: Intiialize AudioManager and related class lazily (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply the lazy initialization only to Android Created 4 years, 6 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
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 <memory> 8 #include <memory>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 115
116 // Perform the default message loop run logic. 116 // Perform the default message loop run logic.
117 void RunMainMessageLoopParts(); 117 void RunMainMessageLoopParts();
118 118
119 // Performs the shutdown sequence, starting with PostMainMessageLoopRun 119 // Performs the shutdown sequence, starting with PostMainMessageLoopRun
120 // through stopping threads to PostDestroyThreads. 120 // through stopping threads to PostDestroyThreads.
121 void ShutdownThreadsAndCleanUp(); 121 void ShutdownThreadsAndCleanUp();
122 122
123 int GetResultCode() const { return result_code_; } 123 int GetResultCode() const { return result_code_; }
124 124
125 void InitializeMediaComponentsIfNeeded();
125 media::AudioManager* audio_manager() const { return audio_manager_.get(); } 126 media::AudioManager* audio_manager() const { return audio_manager_.get(); }
126 MediaStreamManager* media_stream_manager() const { 127 MediaStreamManager* media_stream_manager() const {
127 return media_stream_manager_.get(); 128 return media_stream_manager_.get();
128 } 129 }
129 media::UserInputMonitor* user_input_monitor() const { 130 media::UserInputMonitor* user_input_monitor() const {
130 return user_input_monitor_.get(); 131 return user_input_monitor_.get();
131 } 132 }
132 media::midi::MidiManager* midi_manager() const { return midi_manager_.get(); } 133 media::midi::MidiManager* midi_manager() const { return midi_manager_.get(); }
133 base::Thread* indexed_db_thread() const { return indexed_db_thread_.get(); } 134 base::Thread* indexed_db_thread() const { return indexed_db_thread_.get(); }
134 135
(...skipping 29 matching lines...) Expand all
164 165
165 int PreMainMessageLoopRun(); 166 int PreMainMessageLoopRun();
166 167
167 void MainMessageLoopRun(); 168 void MainMessageLoopRun();
168 169
169 base::FilePath GetStartupTraceFileName( 170 base::FilePath GetStartupTraceFileName(
170 const base::CommandLine& command_line) const; 171 const base::CommandLine& command_line) const;
171 void InitStartupTracingForDuration(const base::CommandLine& command_line); 172 void InitStartupTracingForDuration(const base::CommandLine& command_line);
172 void EndStartupTracing(); 173 void EndStartupTracing();
173 174
174 void CreateAudioManager();
175 bool UsingInProcessGpu() const; 175 bool UsingInProcessGpu() const;
176 176
177 // Quick reference for initialization order: 177 // Quick reference for initialization order:
178 // Constructor 178 // Constructor
179 // Init() 179 // Init()
180 // EarlyInitialization() 180 // EarlyInitialization()
181 // InitializeToolkit() 181 // InitializeToolkit()
182 // PreMainMessageLoopStart() 182 // PreMainMessageLoopStart()
183 // MainMessageLoopStart() 183 // MainMessageLoopStart()
184 // InitializeMainThread() 184 // InitializeMainThread()
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 std::unique_ptr<TimeZoneMonitor> time_zone_monitor_; 287 std::unique_ptr<TimeZoneMonitor> time_zone_monitor_;
288 288
289 // DO NOT add members here. Add them to the right categories above. 289 // DO NOT add members here. Add them to the right categories above.
290 290
291 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); 291 DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop);
292 }; 292 };
293 293
294 } // namespace content 294 } // namespace content
295 295
296 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_ 296 #endif // CONTENT_BROWSER_BROWSER_MAIN_LOOP_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/browser_main_loop.cc » ('j') | content/browser/browser_main_loop.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698