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/logging.h" | 9 #include "base/logging.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 namespace android { | 85 namespace android { |
86 class JavaHandlerThread; | 86 class JavaHandlerThread; |
87 } | 87 } |
88 | 88 |
89 namespace internal { | 89 namespace internal { |
90 class TaskTracker; | 90 class TaskTracker; |
91 } | 91 } |
92 | 92 |
93 class SequencedWorkerPool; | 93 class SequencedWorkerPool; |
| 94 class SimpleThread; |
94 class Thread; | 95 class Thread; |
95 class ThreadTestHelper; | 96 class ThreadTestHelper; |
96 | 97 |
97 // Certain behavior is disallowed on certain threads. ThreadRestrictions helps | 98 // Certain behavior is disallowed on certain threads. ThreadRestrictions helps |
98 // enforce these rules. Examples of such rules: | 99 // enforce these rules. Examples of such rules: |
99 // | 100 // |
100 // * Do not do blocking IO (makes the thread janky) | 101 // * Do not do blocking IO (makes the thread janky) |
101 // * Do not access Singleton/LazyInstance (may lead to shutdown crashes) | 102 // * Do not access Singleton/LazyInstance (may lead to shutdown crashes) |
102 // | 103 // |
103 // Here's more about how the protection works: | 104 // Here's more about how the protection works: |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 friend class ::HistogramSynchronizer; | 183 friend class ::HistogramSynchronizer; |
183 friend class internal::TaskTracker; | 184 friend class internal::TaskTracker; |
184 friend class ::ScopedAllowWaitForLegacyWebViewApi; | 185 friend class ::ScopedAllowWaitForLegacyWebViewApi; |
185 friend class cc::CompletionEvent; | 186 friend class cc::CompletionEvent; |
186 friend class cc::SingleThreadTaskGraphRunner; | 187 friend class cc::SingleThreadTaskGraphRunner; |
187 friend class content::CategorizedWorkerPool; | 188 friend class content::CategorizedWorkerPool; |
188 friend class remoting::AutoThread; | 189 friend class remoting::AutoThread; |
189 friend class ui::WindowResizeHelperMac; | 190 friend class ui::WindowResizeHelperMac; |
190 friend class MessagePumpDefault; | 191 friend class MessagePumpDefault; |
191 friend class SequencedWorkerPool; | 192 friend class SequencedWorkerPool; |
| 193 friend class SimpleThread; |
192 friend class Thread; | 194 friend class Thread; |
193 friend class ThreadTestHelper; | 195 friend class ThreadTestHelper; |
194 friend class PlatformThread; | 196 friend class PlatformThread; |
195 friend class android::JavaHandlerThread; | 197 friend class android::JavaHandlerThread; |
196 friend class mojo::SyncCallRestrictions; | 198 friend class mojo::SyncCallRestrictions; |
197 friend class mojo::edk::ScopedIPCSupport; | 199 friend class mojo::edk::ScopedIPCSupport; |
198 friend class ui::CommandBufferClientImpl; | 200 friend class ui::CommandBufferClientImpl; |
199 friend class ui::CommandBufferLocal; | 201 friend class ui::CommandBufferLocal; |
200 friend class ui::GpuState; | 202 friend class ui::GpuState; |
201 | 203 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 | 246 |
245 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); | 247 DISALLOW_COPY_AND_ASSIGN(ScopedAllowWait); |
246 }; | 248 }; |
247 | 249 |
248 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); | 250 DISALLOW_IMPLICIT_CONSTRUCTORS(ThreadRestrictions); |
249 }; | 251 }; |
250 | 252 |
251 } // namespace base | 253 } // namespace base |
252 | 254 |
253 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ | 255 #endif // BASE_THREADING_THREAD_RESTRICTIONS_H_ |
OLD | NEW |