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

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

Issue 16025005: Web MIDI API back-end (work-in-progress) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add stub for non-OSX MIDIManagers Created 7 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 | 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 #include "content/browser/browser_main_loop.h" 5 #include "content/browser/browser_main_loop.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/hi_res_timer_manager.h" 10 #include "base/hi_res_timer_manager.h"
(...skipping 29 matching lines...) Expand all
40 #include "content/public/browser/browser_shutdown.h" 40 #include "content/public/browser/browser_shutdown.h"
41 #include "content/public/browser/compositor_util.h" 41 #include "content/public/browser/compositor_util.h"
42 #include "content/public/browser/content_browser_client.h" 42 #include "content/public/browser/content_browser_client.h"
43 #include "content/public/browser/render_process_host.h" 43 #include "content/public/browser/render_process_host.h"
44 #include "content/public/common/content_switches.h" 44 #include "content/public/common/content_switches.h"
45 #include "content/public/common/main_function_params.h" 45 #include "content/public/common/main_function_params.h"
46 #include "content/public/common/result_codes.h" 46 #include "content/public/common/result_codes.h"
47 #include "crypto/nss_util.h" 47 #include "crypto/nss_util.h"
48 #include "media/audio/audio_manager.h" 48 #include "media/audio/audio_manager.h"
49 #include "media/base/media.h" 49 #include "media/base/media.h"
50 #include "media/midi/midi_manager.h"
50 #include "net/base/network_change_notifier.h" 51 #include "net/base/network_change_notifier.h"
51 #include "net/socket/client_socket_factory.h" 52 #include "net/socket/client_socket_factory.h"
52 #include "net/ssl/ssl_config_service.h" 53 #include "net/ssl/ssl_config_service.h"
53 #include "ui/base/clipboard/clipboard.h" 54 #include "ui/base/clipboard/clipboard.h"
54 55
55 #if defined(USE_AURA) 56 #if defined(USE_AURA)
56 #include "content/browser/renderer_host/image_transport_factory.h" 57 #include "content/browser/renderer_host/image_transport_factory.h"
57 #endif 58 #endif
58 59
59 #if defined(OS_ANDROID) 60 #if defined(OS_ANDROID)
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 private: 275 private:
275 DISALLOW_COPY_AND_ASSIGN(MemoryObserver); 276 DISALLOW_COPY_AND_ASSIGN(MemoryObserver);
276 }; 277 };
277 278
278 279
279 // static 280 // static
280 media::AudioManager* BrowserMainLoop::GetAudioManager() { 281 media::AudioManager* BrowserMainLoop::GetAudioManager() {
281 return g_current_browser_main_loop->audio_manager_.get(); 282 return g_current_browser_main_loop->audio_manager_.get();
282 } 283 }
283 284
285 media::MIDIManager* BrowserMainLoop::GetMIDIManager() {
286 return g_current_browser_main_loop->midi_manager_.get();
287 }
288
284 // static 289 // static
285 AudioMirroringManager* BrowserMainLoop::GetAudioMirroringManager() { 290 AudioMirroringManager* BrowserMainLoop::GetAudioMirroringManager() {
286 return g_current_browser_main_loop->audio_mirroring_manager_.get(); 291 return g_current_browser_main_loop->audio_mirroring_manager_.get();
287 } 292 }
288 293
289 // static 294 // static
290 MediaStreamManager* BrowserMainLoop::GetMediaStreamManager() { 295 MediaStreamManager* BrowserMainLoop::GetMediaStreamManager() {
291 return g_current_browser_main_loop->media_stream_manager_.get(); 296 return g_current_browser_main_loop->media_stream_manager_.get();
292 } 297 }
293 // BrowserMainLoop construction / destruction ============================= 298 // BrowserMainLoop construction / destruction =============================
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 } 407 }
403 408
404 { 409 {
405 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MediaFeatures") 410 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MediaFeatures")
406 media::InitializeCPUSpecificMediaFeatures(); 411 media::InitializeCPUSpecificMediaFeatures();
407 } 412 }
408 { 413 {
409 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:AudioMan") 414 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:AudioMan")
410 audio_manager_.reset(media::AudioManager::Create()); 415 audio_manager_.reset(media::AudioManager::Create());
411 } 416 }
412 417 {
418 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:MIDIManager")
419 midi_manager_.reset(media::MIDIManager::Create());
420 }
413 421
414 #if !defined(OS_IOS) 422 #if !defined(OS_IOS)
415 { 423 {
416 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:ContentWebUIController") 424 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:ContentWebUIController")
417 WebUIControllerFactory::RegisterFactory( 425 WebUIControllerFactory::RegisterFactory(
418 ContentWebUIControllerFactory::GetInstance()); 426 ContentWebUIControllerFactory::GetInstance());
419 } 427 }
420 428
421 { 429 {
422 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:AudioMirroringManager") 430 TRACE_EVENT0("startup", "BrowserMainLoop::Subsystem:AudioMirroringManager")
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
917 if (parameters_.ui_task) 925 if (parameters_.ui_task)
918 base::MessageLoopForUI::current()->PostTask(FROM_HERE, 926 base::MessageLoopForUI::current()->PostTask(FROM_HERE,
919 *parameters_.ui_task); 927 *parameters_.ui_task);
920 928
921 base::RunLoop run_loop; 929 base::RunLoop run_loop;
922 run_loop.Run(); 930 run_loop.Run();
923 #endif 931 #endif
924 } 932 }
925 933
926 } // namespace content 934 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698