summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chrome_thread.h
diff options
context:
space:
mode:
authorpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-18 01:27:01 +0000
committerpaul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-18 01:27:01 +0000
commit640579651b4a52f58d96db3a693274e3db47efda (patch)
tree169fb159248ba6d10d8393183ec0e912c269558a /chrome/browser/chrome_thread.h
parentefd73788611d6060d46c0802d7de497539e9814c (diff)
downloadchromium_src-640579651b4a52f58d96db3a693274e3db47efda.zip
chromium_src-640579651b4a52f58d96db3a693274e3db47efda.tar.gz
chromium_src-640579651b4a52f58d96db3a693274e3db47efda.tar.bz2
Add the UI thread to the list of ChromeThreads.
BUG=none TEST=none Review URL: http://codereview.chromium.org/171088 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23605 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chrome_thread.h')
-rw-r--r--chrome/browser/chrome_thread.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/chrome/browser/chrome_thread.h b/chrome/browser/chrome_thread.h
index 4978214..db95512e 100644
--- a/chrome/browser/chrome_thread.h
+++ b/chrome/browser/chrome_thread.h
@@ -29,6 +29,9 @@ class ChromeThread : public base::Thread {
public:
// An enumeration of the well-known threads.
enum ID {
+ // The main thread in the browser.
+ UI,
+
// This is the thread that processes IPC and network messages.
IO,
@@ -61,6 +64,11 @@ class ChromeThread : public base::Thread {
// Construct a ChromeThread with the supplied identifier. It is an error
// to construct a ChromeThread that already exists.
explicit ChromeThread(ID identifier);
+
+ // Special constructor for the main (UI) thread. We use a dummy thread here
+ // since the main thread already exists.
+ ChromeThread();
+
virtual ~ChromeThread();
// Callable on any thread, this helper function returns a pointer to the
@@ -83,6 +91,9 @@ class ChromeThread : public base::Thread {
static bool CurrentlyOn(ID identifier);
private:
+ // Common initialization code for the constructors.
+ void Initialize();
+
// The identifier of this thread. Only one thread can exist with a given
// identifier at a given time.
ID identifier_;