OLD | NEW |
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_process_sub_thread.h" | 5 #include "content/browser/browser_process_sub_thread.h" |
6 | 6 |
7 #include "base/debug/leak_tracker.h" | 7 #include "base/debug/leak_tracker.h" |
8 #include "base/threading/thread_restrictions.h" | 8 #include "base/threading/thread_restrictions.h" |
9 #include "base/trace_event/memory_dump_manager.h" | 9 #include "base/trace_event/memory_dump_manager.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "content/browser/browser_child_process_host_impl.h" | 11 #include "content/browser/browser_child_process_host_impl.h" |
12 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" | 12 #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" |
13 #include "content/browser/notification_service_impl.h" | 13 #include "content/browser/notification_service_impl.h" |
14 #include "net/url_request/url_fetcher.h" | 14 #include "net/url_request/url_fetcher.h" |
15 #include "net/url_request/url_request.h" | 15 #include "net/url_request/url_request.h" |
16 | 16 |
17 #if defined(OS_WIN) | 17 #if defined(OS_WIN) |
18 #include "base/win/scoped_com_initializer.h" | 18 #include "base/win/scoped_com_initializer.h" |
19 #endif | 19 #endif |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 | 22 |
23 BrowserProcessSubThread::BrowserProcessSubThread(BrowserThread::ID identifier) | 23 BrowserProcessSubThread::BrowserProcessSubThread(BrowserThread::ID identifier) |
24 : BrowserThreadImpl(identifier) { | 24 : BrowserThreadImpl(identifier) {} |
25 } | 25 |
| 26 BrowserProcessSubThread::BrowserProcessSubThread( |
| 27 BrowserThread::ID identifier, |
| 28 base::MessageLoop* message_loop) |
| 29 : BrowserThreadImpl(identifier, message_loop) {} |
26 | 30 |
27 BrowserProcessSubThread::~BrowserProcessSubThread() { | 31 BrowserProcessSubThread::~BrowserProcessSubThread() { |
28 Stop(); | 32 Stop(); |
29 } | 33 } |
30 | 34 |
31 void BrowserProcessSubThread::Init() { | 35 void BrowserProcessSubThread::Init() { |
32 #if defined(OS_WIN) | 36 #if defined(OS_WIN) |
33 com_initializer_.reset(new base::win::ScopedCOMInitializer()); | 37 com_initializer_.reset(new base::win::ScopedCOMInitializer()); |
34 #endif | 38 #endif |
35 | 39 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // and delete the BrowserChildProcessHost instances to release whatever | 74 // and delete the BrowserChildProcessHost instances to release whatever |
71 // IO thread only resources they are referencing. | 75 // IO thread only resources they are referencing. |
72 BrowserChildProcessHostImpl::TerminateAll(); | 76 BrowserChildProcessHostImpl::TerminateAll(); |
73 | 77 |
74 // Unregister GpuMemoryBuffer dump provider before IO thread is shut down. | 78 // Unregister GpuMemoryBuffer dump provider before IO thread is shut down. |
75 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider( | 79 base::trace_event::MemoryDumpManager::GetInstance()->UnregisterDumpProvider( |
76 BrowserGpuMemoryBufferManager::current()); | 80 BrowserGpuMemoryBufferManager::current()); |
77 } | 81 } |
78 | 82 |
79 } // namespace content | 83 } // namespace content |
OLD | NEW |