OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 LIBRARIES_NACL_IO_TEST_FAKE_RESOURCE_MANAGER_H_ | 5 #ifndef TESTS_NACL_IO_TEST_FAKE_RESOURCE_MANAGER_H_ |
6 #define LIBRARIES_NACL_IO_TEST_FAKE_RESOURCE_MANAGER_H_ | 6 #define TESTS_NACL_IO_TEST_FAKE_RESOURCE_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include <ppapi/c/pp_resource.h> | 10 #include <ppapi/c/pp_resource.h> |
11 | 11 |
12 #include "sdk_util/atomicops.h" | 12 #include "sdk_util/atomicops.h" |
13 #include "sdk_util/macros.h" | 13 #include "sdk_util/macros.h" |
14 #include "sdk_util/simple_lock.h" | 14 #include "sdk_util/simple_lock.h" |
15 | 15 |
16 class FakeResource; | 16 class FakeResource; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 }; | 103 }; |
104 | 104 |
105 template <typename T> | 105 template <typename T> |
106 inline T* FakeResourceManager::Get(PP_Resource handle) { | 106 inline T* FakeResourceManager::Get(PP_Resource handle) { |
107 return Get(handle)->resource<T>(); | 107 return Get(handle)->resource<T>(); |
108 } | 108 } |
109 | 109 |
110 #define CREATE_RESOURCE(MANAGER, TYPE, RESOURCE) \ | 110 #define CREATE_RESOURCE(MANAGER, TYPE, RESOURCE) \ |
111 (MANAGER)->Create((RESOURCE), #TYPE, __FILE__, __LINE__) | 111 (MANAGER)->Create((RESOURCE), #TYPE, __FILE__, __LINE__) |
112 | 112 |
113 #endif // LIBRARIES_NACL_IO_TEST_FAKE_RESOURCE_MANAGER_H_ | 113 #endif // TESTS_NACL_IO_TEST_FAKE_RESOURCE_MANAGER_H_ |
OLD | NEW |