| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_CHROME_THREAD_H__ | 5 #ifndef CHROME_BROWSER_CHROME_THREAD_H__ |
| 6 #define CHROME_BROWSER_CHROME_THREAD_H__ | 6 #define CHROME_BROWSER_CHROME_THREAD_H__ |
| 7 | 7 |
| 8 #include "base/lock.h" | 8 #include "base/lock.h" |
| 9 #include "base/thread.h" | 9 #include "base/thread.h" |
| 10 | 10 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // This is the thread that interacts with the database. | 41 // This is the thread that interacts with the database. |
| 42 DB, | 42 DB, |
| 43 | 43 |
| 44 // This is the "main" thread for WebKit within the browser process when | 44 // This is the "main" thread for WebKit within the browser process when |
| 45 // NOT in --single-process mode. | 45 // NOT in --single-process mode. |
| 46 WEBKIT, | 46 WEBKIT, |
| 47 | 47 |
| 48 // This is the thread that interacts with the history database. | 48 // This is the thread that interacts with the history database. |
| 49 HISTORY, | 49 HISTORY, |
| 50 | 50 |
| 51 #if defined(OS_LINUX) | 51 #if defined(USE_X11) |
| 52 // This thread has a second connection to the X server and is used to | 52 // This thread has a second connection to the X server and is used to |
| 53 // process UI requests when routing the request to the UI thread would risk | 53 // process UI requests when routing the request to the UI thread would risk |
| 54 // deadlock. | 54 // deadlock. |
| 55 BACKGROUND_X11, | 55 BACKGROUND_X11, |
| 56 #endif | 56 #endif |
| 57 | 57 |
| 58 // This identifier does not represent a thread. Instead it counts the | 58 // This identifier does not represent a thread. Instead it counts the |
| 59 // number of well-known threads. Insert new well-known threads before this | 59 // number of well-known threads. Insert new well-known threads before this |
| 60 // identifier. | 60 // identifier. |
| 61 ID_COUNT | 61 ID_COUNT |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 static Lock lock_; | 103 static Lock lock_; |
| 104 | 104 |
| 105 // An array of the ChromeThread objects. This array is protected by |lock_|. | 105 // An array of the ChromeThread objects. This array is protected by |lock_|. |
| 106 // The threads are not owned by this array. Typically, the threads are owned | 106 // The threads are not owned by this array. Typically, the threads are owned |
| 107 // on the UI thread by the g_browser_process object. ChromeThreads remove | 107 // on the UI thread by the g_browser_process object. ChromeThreads remove |
| 108 // themselves from this array upon destruction. | 108 // themselves from this array upon destruction. |
| 109 static ChromeThread* chrome_threads_[ID_COUNT]; | 109 static ChromeThread* chrome_threads_[ID_COUNT]; |
| 110 }; | 110 }; |
| 111 | 111 |
| 112 #endif // #ifndef CHROME_BROWSER_CHROME_THREAD_H__ | 112 #endif // #ifndef CHROME_BROWSER_CHROME_THREAD_H__ |
| OLD | NEW |