OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 /* | 5 /* |
6 * Copyright (C) 2010 Apple Inc. All rights reserved. | 6 * Copyright (C) 2010 Apple Inc. All rights reserved. |
7 * | 7 * |
8 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
9 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
10 * are met: | 10 * are met: |
(...skipping 14 matching lines...) Expand all Loading... |
25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 25 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF | 26 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
27 * THE POSSIBILITY OF SUCH DAMAGE. | 27 * THE POSSIBILITY OF SUCH DAMAGE. |
28 */ | 28 */ |
29 | 29 |
30 #ifndef PluginTest_h | 30 #ifndef PluginTest_h |
31 #define PluginTest_h | 31 #define PluginTest_h |
32 | 32 |
33 #include <assert.h> | 33 #include <assert.h> |
34 #include <bindings/npfunctions.h> | 34 #include <bindings/npfunctions.h> |
| 35 #include <stdint.h> |
| 36 |
35 #include <map> | 37 #include <map> |
36 #include <string> | 38 #include <string> |
37 | 39 |
38 // Helper classes for implementing has_member | 40 // Helper classes for implementing has_member |
39 typedef char (&no_tag)[1]; | 41 typedef char (&no_tag)[1]; |
40 typedef char (&yes_tag)[2]; | 42 typedef char (&yes_tag)[2]; |
41 | 43 |
42 #define DEFINE_HAS_MEMBER_CHECK(member, returnType, argumentTypes) \ | 44 #define DEFINE_HAS_MEMBER_CHECK(member, returnType, argumentTypes) \ |
43 template <typename T, returnType(T::*member) argumentTypes> \ | 45 template <typename T, returnType(T::*member) argumentTypes> \ |
44 struct pmf_##member##_helper {}; \ | 46 struct pmf_##member##_helper {}; \ |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 typedef PluginTest* (*CreateTestFunction)(NPP, const std::string&); | 293 typedef PluginTest* (*CreateTestFunction)(NPP, const std::string&); |
292 | 294 |
293 static void registerCreateTestFunction(const std::string&, | 295 static void registerCreateTestFunction(const std::string&, |
294 CreateTestFunction); | 296 CreateTestFunction); |
295 static std::map<std::string, CreateTestFunction>& createTestFunctions(); | 297 static std::map<std::string, CreateTestFunction>& createTestFunctions(); |
296 | 298 |
297 std::string m_identifier; | 299 std::string m_identifier; |
298 }; | 300 }; |
299 | 301 |
300 #endif // PluginTest_h | 302 #endif // PluginTest_h |
OLD | NEW |