blob: 55978e68b939da6b1694cd28335acea23d58beef [file] [log] [blame]
[email protected]0ac83682010-01-22 17:46:271// 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
[email protected]b0f146f2011-09-15 22:14:255#ifndef CONTENT_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_
6#define CONTENT_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_
[email protected]32b76ef2010-07-26 23:08:247#pragma once
[email protected]0ac83682010-01-22 17:46:278
9#include "base/basictypes.h"
[email protected]1625ffd2011-03-01 17:51:5010#include "content/browser/browser_thread.h"
[email protected]0ac83682010-01-22 17:46:2711
12class 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.
[email protected]d04e7662010-10-10 22:24:4823class BrowserProcessSubThread : public BrowserThread {
[email protected]0ac83682010-01-22 17:46:2724 public:
[email protected]d04e7662010-10-10 22:24:4825 explicit BrowserProcessSubThread(BrowserThread::ID identifier);
[email protected]0ac83682010-01-22 17:46:2726 virtual ~BrowserProcessSubThread();
27
28 protected:
29 virtual void Init();
[email protected]569c7602011-03-03 20:40:3230 virtual void CleanUp();
[email protected]0ac83682010-01-22 17:46:2731
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
[email protected]b0f146f2011-09-15 22:14:2541#endif // CONTENT_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_