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 PPAPI_UTILITY_THREAD_SAFE_THREAD_TRAITS_H_ | 5 #ifndef PPAPI_UTILITY_THREAD_SAFE_THREAD_TRAITS_H_ |
6 #define PPAPI_UTILITY_THREAD_SAFE_THREAD_TRAITS_H_ | 6 #define PPAPI_UTILITY_THREAD_SAFE_THREAD_TRAITS_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include "ppapi/cpp/logging.h" | 10 #include "ppapi/cpp/logging.h" |
9 #include "ppapi/cpp/module.h" | 11 #include "ppapi/cpp/module.h" |
10 #include "ppapi/utility/threading/lock.h" | 12 #include "ppapi/utility/threading/lock.h" |
11 | 13 |
12 /// @file | 14 /// @file |
13 /// Defines the traits structures for thread-safety of a completion callback | 15 /// Defines the traits structures for thread-safety of a completion callback |
14 /// factory. We provide thread-safe and non-thread-safe version. The thread-safe | 16 /// factory. We provide thread-safe and non-thread-safe version. The thread-safe |
15 /// version is always correct (if you follow the thread usage rules of the | 17 /// version is always correct (if you follow the thread usage rules of the |
16 /// callback factory), but if you know your object will only be used on one | 18 /// callback factory), but if you know your object will only be used on one |
17 /// thread, you can uses the non-thread-safe version. | 19 /// thread, you can uses the non-thread-safe version. |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 } | 171 } |
170 | 172 |
171 private: | 173 private: |
172 Lock& lock_; | 174 Lock& lock_; |
173 }; | 175 }; |
174 }; | 176 }; |
175 | 177 |
176 } // namespace pp | 178 } // namespace pp |
177 | 179 |
178 #endif // PPAPI_UTILITY_THREAD_SAFE_THREAD_TRAITS_H_ | 180 #endif // PPAPI_UTILITY_THREAD_SAFE_THREAD_TRAITS_H_ |
OLD | NEW |