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

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

Issue 10786029: Delete MediaStreamManager in the same way as AudioManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: put Stop() in the dtor. 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/renderer_host/media/audio_input_device_manager.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 #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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 // stopping the GPU thread. The GPU thread will close IPC channels to renderer 477 // stopping the GPU thread. The GPU thread will close IPC channels to renderer
478 // processes so this has to happen before stopping the IO thread. 478 // processes so this has to happen before stopping the IO thread.
479 GpuProcessHostUIShim::DestroyAll(); 479 GpuProcessHostUIShim::DestroyAll();
480 480
481 // Cancel pending requests and prevent new requests. 481 // Cancel pending requests and prevent new requests.
482 if (resource_dispatcher_host_.get()) 482 if (resource_dispatcher_host_.get())
483 resource_dispatcher_host_.get()->Shutdown(); 483 resource_dispatcher_host_.get()->Shutdown();
484 484
485 speech_recognition_manager_.reset(); 485 speech_recognition_manager_.reset();
486 486
487 // MediaStreamManager needs to be deleted on IO thread in order to unregister
488 // itself as the listener to VideoCaptureManager and AudioInputDeviceManager.
489 BrowserThread::DeleteOnIOThread::Destruct(media_stream_manager_.release());
490
491 #if defined(USE_AURA) 487 #if defined(USE_AURA)
492 ImageTransportFactory::Terminate(); 488 ImageTransportFactory::Terminate();
493 #endif 489 #endif
494 BrowserGpuChannelHostFactory::Terminate(); 490 BrowserGpuChannelHostFactory::Terminate();
495 491
496 GamepadService::GetInstance()->Terminate(); 492 GamepadService::GetInstance()->Terminate();
497 493
498 // Must be size_t so we can subtract from it. 494 // Must be size_t so we can subtract from it.
499 for (size_t thread_id = BrowserThread::ID_COUNT - 1; 495 for (size_t thread_id = BrowserThread::ID_COUNT - 1;
500 thread_id >= (BrowserThread::UI + 1); 496 thread_id >= (BrowserThread::UI + 1);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type()); 656 DCHECK_EQ(MessageLoop::TYPE_UI, MessageLoop::current()->type());
661 if (parameters_.ui_task) 657 if (parameters_.ui_task)
662 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task); 658 MessageLoopForUI::current()->PostTask(FROM_HERE, *parameters_.ui_task);
663 659
664 base::RunLoop run_loop; 660 base::RunLoop run_loop;
665 run_loop.Run(); 661 run_loop.Run();
666 #endif 662 #endif
667 } 663 }
668 664
669 } // namespace content 665 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/media/audio_input_device_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698