| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_BROWSER_THREAD_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_THREAD_H_ |
| 6 #define CONTENT_BROWSER_BROWSER_THREAD_H_ | 6 #define CONTENT_BROWSER_BROWSER_THREAD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
| 10 #include "base/task.h" | 10 #include "base/task.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // This thread issues calls to the GPU in the browser process. | 65 // This thread issues calls to the GPU in the browser process. |
| 66 GPU, | 66 GPU, |
| 67 | 67 |
| 68 #if defined(USE_X11) | 68 #if defined(USE_X11) |
| 69 // This thread has a second connection to the X server and is used to | 69 // This thread has a second connection to the X server and is used to |
| 70 // process UI requests when routing the request to the UI thread would risk | 70 // process UI requests when routing the request to the UI thread would risk |
| 71 // deadlock. | 71 // deadlock. |
| 72 BACKGROUND_X11, | 72 BACKGROUND_X11, |
| 73 #endif | 73 #endif |
| 74 | 74 |
| 75 #if defined(OS_CHROMEOS) |
| 76 // This thread runs websocket to TCP proxy. |
| 77 // TODO(dilmah): remove this thread, instead implement this functionality |
| 78 // as hooks into websocket layer. |
| 79 WEBPROXY, |
| 80 #endif |
| 81 |
| 75 // This identifier does not represent a thread. Instead it counts the | 82 // This identifier does not represent a thread. Instead it counts the |
| 76 // number of well-known threads. Insert new well-known threads before this | 83 // number of well-known threads. Insert new well-known threads before this |
| 77 // identifier. | 84 // identifier. |
| 78 ID_COUNT | 85 ID_COUNT |
| 79 }; | 86 }; |
| 80 | 87 |
| 81 // Construct a BrowserThread with the supplied identifier. It is an error | 88 // Construct a BrowserThread with the supplied identifier. It is an error |
| 82 // to construct a BrowserThread that already exists. | 89 // to construct a BrowserThread that already exists. |
| 83 explicit BrowserThread(ID identifier); | 90 explicit BrowserThread(ID identifier); |
| 84 | 91 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 static base::Lock lock_; | 210 static base::Lock lock_; |
| 204 | 211 |
| 205 // An array of the BrowserThread objects. This array is protected by |lock_|. | 212 // An array of the BrowserThread objects. This array is protected by |lock_|. |
| 206 // The threads are not owned by this array. Typically, the threads are owned | 213 // The threads are not owned by this array. Typically, the threads are owned |
| 207 // on the UI thread by the g_browser_process object. BrowserThreads remove | 214 // on the UI thread by the g_browser_process object. BrowserThreads remove |
| 208 // themselves from this array upon destruction. | 215 // themselves from this array upon destruction. |
| 209 static BrowserThread* browser_threads_[ID_COUNT]; | 216 static BrowserThread* browser_threads_[ID_COUNT]; |
| 210 }; | 217 }; |
| 211 | 218 |
| 212 #endif // CONTENT_BROWSER_BROWSER_THREAD_H_ | 219 #endif // CONTENT_BROWSER_BROWSER_THREAD_H_ |
| OLD | NEW |