OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 BASE_THREADING_THREAD_RESTRICTIONS_H_ | 5 #ifndef BASE_THREADING_THREAD_RESTRICTIONS_H_ |
6 #define BASE_THREADING_THREAD_RESTRICTIONS_H_ | 6 #define BASE_THREADING_THREAD_RESTRICTIONS_H_ |
7 | 7 |
8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 | 10 |
11 // See comment at top of thread_checker.h | 11 // See comment at top of thread_checker.h |
12 #if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) | 12 #if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) |
13 #define ENABLE_THREAD_RESTRICTIONS 1 | 13 #define ENABLE_THREAD_RESTRICTIONS 1 |
14 #else | 14 #else |
15 #define ENABLE_THREAD_RESTRICTIONS 0 | 15 #define ENABLE_THREAD_RESTRICTIONS 0 |
16 #endif | 16 #endif |
17 | 17 |
18 class AcceleratedPresenter; | 18 class AcceleratedPresenter; |
19 class BrowserProcessImpl; | 19 class BrowserProcessImpl; |
20 class HistogramSynchronizer; | 20 class HistogramSynchronizer; |
21 class GpuChannelHost; | |
22 class MetricsService; | 21 class MetricsService; |
23 class NativeBackendKWallet; | 22 class NativeBackendKWallet; |
24 class ScopedAllowWaitForLegacyWebViewApi; | 23 class ScopedAllowWaitForLegacyWebViewApi; |
25 class TestingAutomationProvider; | 24 class TestingAutomationProvider; |
26 class TextInputClientMac; | 25 class TextInputClientMac; |
27 | 26 |
28 namespace browser_sync { | 27 namespace browser_sync { |
29 class NonFrontendDataTypeController; | 28 class NonFrontendDataTypeController; |
30 class UIModelWorker; | 29 class UIModelWorker; |
31 } | 30 } |
32 namespace cc { | 31 namespace cc { |
33 class CCCompletionEvent; | 32 class CCCompletionEvent; |
34 } | 33 } |
35 namespace chromeos { | 34 namespace chromeos { |
36 class AudioMixerAlsa; | 35 class AudioMixerAlsa; |
37 class BlockingMethodCaller; | 36 class BlockingMethodCaller; |
38 namespace system { | 37 namespace system { |
39 class StatisticsProviderImpl; | 38 class StatisticsProviderImpl; |
40 } | 39 } |
41 } | 40 } |
42 namespace chrome_browser_net { | 41 namespace chrome_browser_net { |
43 class Predictor; | 42 class Predictor; |
44 } | 43 } |
45 namespace content { | 44 namespace content { |
46 class BrowserGpuChannelHostFactory; | 45 class BrowserGpuChannelHostFactory; |
47 class GLHelper; | 46 class GLHelper; |
| 47 class GpuChannelHost; |
48 class RenderWidgetHelper; | 48 class RenderWidgetHelper; |
49 } | 49 } |
50 namespace dbus { | 50 namespace dbus { |
51 class Bus; | 51 class Bus; |
52 } | 52 } |
53 namespace disk_cache { | 53 namespace disk_cache { |
54 class BackendImpl; | 54 class BackendImpl; |
55 class InFlightIO; | 55 class InFlightIO; |
56 } | 56 } |
57 namespace media { | 57 namespace media { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 // BEGIN USAGE THAT NEEDS TO BE FIXED. | 182 // BEGIN USAGE THAT NEEDS TO BE FIXED. |
183 friend class ::chromeos::AudioMixerAlsa; // http://crbug.com/125206 | 183 friend class ::chromeos::AudioMixerAlsa; // http://crbug.com/125206 |
184 friend class ::chromeos::BlockingMethodCaller; // http://crbug.com/125360 | 184 friend class ::chromeos::BlockingMethodCaller; // http://crbug.com/125360 |
185 friend class ::chromeos::system::StatisticsProviderImpl; // http://crbug.com/
125385 | 185 friend class ::chromeos::system::StatisticsProviderImpl; // http://crbug.com/
125385 |
186 friend class browser_sync::NonFrontendDataTypeController; // http://crbug.com
/19757 | 186 friend class browser_sync::NonFrontendDataTypeController; // http://crbug.com
/19757 |
187 friend class browser_sync::UIModelWorker; // http://crbug.com/19757 | 187 friend class browser_sync::UIModelWorker; // http://crbug.com/19757 |
188 friend class chrome_browser_net::Predictor; // http://crbug.com/78451 | 188 friend class chrome_browser_net::Predictor; // http://crbug.com/78451 |
189 friend class | 189 friend class |
190 content::BrowserGpuChannelHostFactory; // http://crbug.com/125248 | 190 content::BrowserGpuChannelHostFactory; // http://crbug.com/125248 |
191 friend class content::GLHelper; // http://crbug.com/125415 | 191 friend class content::GLHelper; // http://crbug.com/125415 |
| 192 friend class content::GpuChannelHost; // http://crbug.com/125264 |
192 friend class dbus::Bus; // http://crbug.com/125222 | 193 friend class dbus::Bus; // http://crbug.com/125222 |
193 friend class disk_cache::BackendImpl; // http://crbug.com/74623 | 194 friend class disk_cache::BackendImpl; // http://crbug.com/74623 |
194 friend class disk_cache::InFlightIO; // http://crbug.com/74623 | 195 friend class disk_cache::InFlightIO; // http://crbug.com/74623 |
195 friend class media::AudioOutputController; // http://crbug.com/120973 | 196 friend class media::AudioOutputController; // http://crbug.com/120973 |
196 friend class net::FileStreamPosix; // http://crbug.com/115067 | 197 friend class net::FileStreamPosix; // http://crbug.com/115067 |
197 friend class net::FileStreamWin; // http://crbug.com/115067 | 198 friend class net::FileStreamWin; // http://crbug.com/115067 |
198 friend class net::NetworkManagerApi; // http://crbug.com/125097 | 199 friend class net::NetworkManagerApi; // http://crbug.com/125097 |
199 friend class ::AcceleratedPresenter; // http://crbug.com/125391 | 200 friend class ::AcceleratedPresenter; // http://crbug.com/125391 |
200 friend class ::BrowserProcessImpl; // http://crbug.com/125207 | 201 friend class ::BrowserProcessImpl; // http://crbug.com/125207 |
201 friend class ::GpuChannelHost; // http://crbug.com/125264 | |
202 friend class ::MetricsService; // http://crbug.com/124954 | 202 friend class ::MetricsService; // http://crbug.com/124954 |
203 friend class ::TextInputClientMac; // http://crbug.com/121917 | 203 friend class ::TextInputClientMac; // http://crbug.com/121917 |
204 friend class ::NativeBackendKWallet; // http://crbug.com/125331 | 204 friend class ::NativeBackendKWallet; // http://crbug.com/125331 |
205 // END USAGE THAT NEEDS TO BE FIXED. | 205 // END USAGE THAT NEEDS TO BE FIXED. |
206 | 206 |
207 #if ENABLE_THREAD_RESTRICTIONS | 207 #if ENABLE_THREAD_RESTRICTIONS |
208 static bool SetWaitAllowed(bool allowed); | 208 static bool SetWaitAllowed(bool allowed); |
209 #else | 209 #else |
210 static bool SetWaitAllowed(bool allowed) { return true; } | 210 static bool SetWaitAllowed(bool allowed) { return true; } |
211 #endif | 211 #endif |
(...skipping 13 matching lines...) Expand all Loading... |
225 | 225 |
226 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); | 226 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); |
227 }; | 227 }; |
228 | 228 |
229 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); | 229 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); |
230 }; | 230 }; |
231 | 231 |
232 } // namespace base | 232 } // namespace base |
233 | 233 |
234 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ | 234 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ |
OLD | NEW |