OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
bbudge
2011/08/16 22:40:49
2011
| |
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_PROXY_PROXY_NON_THREAD_SAFE_REF_COUNT_H_ | 5 #ifndef PPAPI_PROXY_PROXY_NON_THREAD_SAFE_REF_COUNT_H_ |
6 #define PPAPI_PROXY_PROXY_NON_THREAD_SAFE_REF_COUNT_H_ | 6 #define PPAPI_PROXY_PROXY_NON_THREAD_SAFE_REF_COUNT_H_ |
7 | 7 |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "ppapi/cpp/completion_callback.h" | 9 #include "ppapi/cpp/completion_callback.h" |
10 | 10 |
11 namespace pp { | 11 namespace ppapi { |
12 namespace proxy { | 12 namespace proxy { |
13 | 13 |
14 // This class is just like ppapi/cpp/non_thread_safe_ref_count.h but rather | 14 // This class is just like ppapi/cpp/non_thread_safe_ref_count.h but rather |
15 // than using pp::Module::core (which doesn't exist), it uses Chrome threads | 15 // than using pp::Module::core (which doesn't exist), it uses Chrome threads |
16 // which do. | 16 // which do. |
17 class ProxyNonThreadSafeRefCount { | 17 class ProxyNonThreadSafeRefCount { |
18 public: | 18 public: |
19 ProxyNonThreadSafeRefCount() : ref_(0) { | 19 ProxyNonThreadSafeRefCount() : ref_(0) { |
20 #ifndef NDEBUG | 20 #ifndef NDEBUG |
21 message_loop_ = MessageLoop::current(); | 21 message_loop_ = MessageLoop::current(); |
(...skipping 15 matching lines...) Expand all Loading... | |
37 } | 37 } |
38 | 38 |
39 private: | 39 private: |
40 int32_t ref_; | 40 int32_t ref_; |
41 #ifndef NDEBUG | 41 #ifndef NDEBUG |
42 MessageLoop* message_loop_; | 42 MessageLoop* message_loop_; |
43 #endif | 43 #endif |
44 }; | 44 }; |
45 | 45 |
46 } // namespace proxy | 46 } // namespace proxy |
47 } // namespace pp | 47 } // namespace ppapi |
48 | 48 |
49 #endif // PPAPI_PROXY_PROXY_NON_THREAD_SAFE_REF_COUNT_H_ | 49 #endif // PPAPI_PROXY_PROXY_NON_THREAD_SAFE_REF_COUNT_H_ |
OLD | NEW |