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 #if defined(UNIT_TEST) | 9 #if defined(UNIT_TEST) |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // This thread issues calls to the GPU in the browser process. | 68 // This thread issues calls to the GPU in the browser process. |
69 GPU, | 69 GPU, |
70 | 70 |
71 #if defined(USE_X11) | 71 #if defined(USE_X11) |
72 // This thread has a second connection to the X server and is used to | 72 // This thread has a second connection to the X server and is used to |
73 // process UI requests when routing the request to the UI thread would risk | 73 // process UI requests when routing the request to the UI thread would risk |
74 // deadlock. | 74 // deadlock. |
75 BACKGROUND_X11, | 75 BACKGROUND_X11, |
76 #endif | 76 #endif |
77 | 77 |
| 78 #if defined(OS_CHROMEOS) |
| 79 // This thread runs websocket to TCP proxy. |
| 80 // TODO(dilmah): remove this thread, instead implement this functionality |
| 81 // as hooks into websocket layer. |
| 82 WEB_SOCKET_PROXY, |
| 83 #endif |
| 84 |
78 // This identifier does not represent a thread. Instead it counts the | 85 // This identifier does not represent a thread. Instead it counts the |
79 // number of well-known threads. Insert new well-known threads before this | 86 // number of well-known threads. Insert new well-known threads before this |
80 // identifier. | 87 // identifier. |
81 ID_COUNT | 88 ID_COUNT |
82 }; | 89 }; |
83 | 90 |
84 // Construct a BrowserThread with the supplied identifier. It is an error | 91 // Construct a BrowserThread with the supplied identifier. It is an error |
85 // to construct a BrowserThread that already exists. | 92 // to construct a BrowserThread that already exists. |
86 explicit BrowserThread(ID identifier); | 93 explicit BrowserThread(ID identifier); |
87 | 94 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
212 static base::Lock lock_; | 219 static base::Lock lock_; |
213 | 220 |
214 // An array of the BrowserThread objects. This array is protected by |lock_|. | 221 // An array of the BrowserThread objects. This array is protected by |lock_|. |
215 // The threads are not owned by this array. Typically, the threads are owned | 222 // The threads are not owned by this array. Typically, the threads are owned |
216 // on the UI thread by the g_browser_process object. BrowserThreads remove | 223 // on the UI thread by the g_browser_process object. BrowserThreads remove |
217 // themselves from this array upon destruction. | 224 // themselves from this array upon destruction. |
218 static BrowserThread* browser_threads_[ID_COUNT]; | 225 static BrowserThread* browser_threads_[ID_COUNT]; |
219 }; | 226 }; |
220 | 227 |
221 #endif // CONTENT_BROWSER_BROWSER_THREAD_H_ | 228 #endif // CONTENT_BROWSER_BROWSER_THREAD_H_ |
OLD | NEW |