| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_ | |
| 6 #define CHROME_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/basictypes.h" | |
| 10 #include "content/browser/browser_thread.h" | |
| 11 | |
| 12 class NotificationService; | |
| 13 | |
| 14 // ---------------------------------------------------------------------------- | |
| 15 // BrowserProcessSubThread | |
| 16 // | |
| 17 // This simple thread object is used for the specialized threads that the | |
| 18 // BrowserProcess spins up. | |
| 19 // | |
| 20 // Applications must initialize the COM library before they can call | |
| 21 // COM library functions other than CoGetMalloc and memory allocation | |
| 22 // functions, so this class initializes COM for those users. | |
| 23 class BrowserProcessSubThread : public BrowserThread { | |
| 24 public: | |
| 25 explicit BrowserProcessSubThread(BrowserThread::ID identifier); | |
| 26 virtual ~BrowserProcessSubThread(); | |
| 27 | |
| 28 protected: | |
| 29 virtual void Init(); | |
| 30 virtual void CleanUp(); | |
| 31 | |
| 32 private: | |
| 33 // Each specialized thread has its own notification service. | |
| 34 // Note: We don't use scoped_ptr because the destructor runs on the wrong | |
| 35 // thread. | |
| 36 NotificationService* notification_service_; | |
| 37 | |
| 38 DISALLOW_COPY_AND_ASSIGN(BrowserProcessSubThread); | |
| 39 }; | |
| 40 | |
| 41 #endif // CHROME_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_ | |
| OLD | NEW |