OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_TESTS_TEST_UTILS_H_ | 5 #ifndef PPAPI_TESTS_TEST_UTILS_H_ |
6 #define PPAPI_TESTS_TEST_UTILS_H_ | 6 #define PPAPI_TESTS_TEST_UTILS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "ppapi/c/dev/ppb_testing_dev.h" | 10 #include "ppapi/c/dev/ppb_testing_dev.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 #else | 72 #else |
73 #error Please add support for your platform in ppapi/c/pp_macros.h. | 73 #error Please add support for your platform in ppapi/c/pp_macros.h. |
74 #endif | 74 #endif |
75 | 75 |
76 /* These are used to determine POSIX-like implementations vs Windows. */ | 76 /* These are used to determine POSIX-like implementations vs Windows. */ |
77 #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \ | 77 #if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \ |
78 defined(__OpenBSD__) || defined(__sun) || defined(__native_client__) | 78 defined(__OpenBSD__) || defined(__sun) || defined(__native_client__) |
79 #define PPAPI_POSIX 1 | 79 #define PPAPI_POSIX 1 |
80 #endif | 80 #endif |
81 | 81 |
82 // This is roughly copied from base/compiler_specific.h, and makes it possible | |
83 // to pass 'this' in a constructor initializer list, when you really mean it. | |
84 // | |
85 // Example usage: | |
86 // Foo::Foo(MyInstance* instance) | |
87 // : ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) {} | |
88 #if defined(COMPILER_MSVC) | |
89 #define PP_ALLOW_THIS_IN_INITIALIZER_LIST(code) \ | |
90 __pragma(warning(push)) \ | |
91 __pragma(warning(disable:4355)) \ | |
92 code \ | |
93 __pragma(warning(pop)) | |
94 #else | |
95 #define PP_ALLOW_THIS_IN_INITIALIZER_LIST(code) code | |
96 #endif | |
97 | |
98 #endif // PPAPI_TESTS_TEST_UTILS_H_ | 82 #endif // PPAPI_TESTS_TEST_UTILS_H_ |
OLD | NEW |