blob: bfaab3f9fa0980a1079ec08e6cb4893fb5bd0bcd [file] [log] [blame]
[email protected]84c13c032011-09-23 00:12:221// Copyright (c) 2011 The Chromium Authors. All rights reserved.
[email protected]0ac83682010-01-22 17:46:272// 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]84c13c032011-09-23 00:12:2211#include "content/common/content_export.h"
[email protected]0ac83682010-01-22 17:46:2712
13class NotificationService;
14
15// ----------------------------------------------------------------------------
16// BrowserProcessSubThread
17//
18// This simple thread object is used for the specialized threads that the
19// BrowserProcess spins up.
20//
21// Applications must initialize the COM library before they can call
22// COM library functions other than CoGetMalloc and memory allocation
23// functions, so this class initializes COM for those users.
[email protected]84c13c032011-09-23 00:12:2224class CONTENT_EXPORT BrowserProcessSubThread : public BrowserThread {
[email protected]0ac83682010-01-22 17:46:2725 public:
[email protected]d04e7662010-10-10 22:24:4826 explicit BrowserProcessSubThread(BrowserThread::ID identifier);
[email protected]0ac83682010-01-22 17:46:2727 virtual ~BrowserProcessSubThread();
28
29 protected:
30 virtual void Init();
[email protected]569c7602011-03-03 20:40:3231 virtual void CleanUp();
[email protected]0ac83682010-01-22 17:46:2732
33 private:
34 // Each specialized thread has its own notification service.
35 // Note: We don't use scoped_ptr because the destructor runs on the wrong
36 // thread.
37 NotificationService* notification_service_;
38
39 DISALLOW_COPY_AND_ASSIGN(BrowserProcessSubThread);
40};
41
[email protected]b0f146f2011-09-15 22:14:2542#endif // CONTENT_BROWSER_BROWSER_PROCESS_SUB_THREAD_H_