OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_PROCESS_SUB_THREAD_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_ |
6 #define CONTENT_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_ | 6 #define CONTENT_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "content/browser/browser_thread.h" | 10 #include "content/browser/browser_thread_impl.h" |
11 #include "content/common/content_export.h" | 11 #include "content/common/content_export.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 class NotificationService; | 14 class NotificationService; |
15 } | 15 } |
16 | 16 |
| 17 namespace content { |
| 18 |
17 // ---------------------------------------------------------------------------- | 19 // ---------------------------------------------------------------------------- |
18 // BrowserProcessSubThread | 20 // BrowserProcessSubThread |
19 // | 21 // |
20 // This simple thread object is used for the specialized threads that the | 22 // This simple thread object is used for the specialized threads that the |
21 // BrowserProcess spins up. | 23 // BrowserProcess spins up. |
22 // | 24 // |
23 // Applications must initialize the COM library before they can call | 25 // Applications must initialize the COM library before they can call |
24 // COM library functions other than CoGetMalloc and memory allocation | 26 // COM library functions other than CoGetMalloc and memory allocation |
25 // functions, so this class initializes COM for those users. | 27 // functions, so this class initializes COM for those users. |
26 class CONTENT_EXPORT BrowserProcessSubThread : public BrowserThread { | 28 class CONTENT_EXPORT BrowserProcessSubThread : public BrowserThreadImpl { |
27 public: | 29 public: |
28 explicit BrowserProcessSubThread(BrowserThread::ID identifier); | 30 explicit BrowserProcessSubThread(BrowserThread::ID identifier); |
29 virtual ~BrowserProcessSubThread(); | 31 virtual ~BrowserProcessSubThread(); |
30 | 32 |
31 protected: | 33 protected: |
32 virtual void Init(); | 34 virtual void Init(); |
33 virtual void CleanUp(); | 35 virtual void CleanUp(); |
34 | 36 |
35 private: | 37 private: |
36 // Each specialized thread has its own notification service. | 38 // Each specialized thread has its own notification service. |
37 // Note: We don't use scoped_ptr because the destructor runs on the wrong | 39 // Note: We don't use scoped_ptr because the destructor runs on the wrong |
38 // thread. | 40 // thread. |
39 content::NotificationService* notification_service_; | 41 NotificationService* notification_service_; |
40 | 42 |
41 DISALLOW_COPY_AND_ASSIGN(BrowserProcessSubThread); | 43 DISALLOW_COPY_AND_ASSIGN(BrowserProcessSubThread); |
42 }; | 44 }; |
43 | 45 |
| 46 } // namespace content |
| 47 |
44 #endif // CONTENT_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_ | 48 #endif // CONTENT_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_ |
OLD | NEW |