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 // This implements the required interfaces for representing a plugin module | 5 // This implements the required interfaces for representing a plugin module |
6 // instance in browser interactions and provides a way to register custom | 6 // instance in browser interactions and provides a way to register custom |
7 // plugin interfaces. | 7 // plugin interfaces. |
8 // | 8 // |
9 | 9 |
| 10 #include <stdint.h> |
10 #include <stdio.h> | 11 #include <stdio.h> |
11 #include <string.h> | 12 #include <string.h> |
12 | 13 |
13 #include <map> | 14 #include <map> |
14 | 15 |
| 16 #include "base/macros.h" |
15 #include "native_client/src/include/nacl_macros.h" | 17 #include "native_client/src/include/nacl_macros.h" |
16 #include "native_client/src/shared/platform/nacl_check.h" | 18 #include "native_client/src/shared/platform/nacl_check.h" |
17 | 19 |
18 #include "ppapi/c/dev/ppb_var_deprecated.h" | 20 #include "ppapi/c/dev/ppb_var_deprecated.h" |
19 #include "ppapi/c/pp_errors.h" | 21 #include "ppapi/c/pp_errors.h" |
20 #include "ppapi/c/pp_instance.h" | 22 #include "ppapi/c/pp_instance.h" |
21 #include "ppapi/c/pp_module.h" | 23 #include "ppapi/c/pp_module.h" |
22 #include "ppapi/c/pp_var.h" | 24 #include "ppapi/c/pp_var.h" |
23 #include "ppapi/c/ppb.h" | 25 #include "ppapi/c/ppb.h" |
24 #include "ppapi/c/ppb_var.h" | 26 #include "ppapi/c/ppb_var.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 // so we supply our own. | 167 // so we supply our own. |
166 if (0 == strncmp(PPP_MESSAGING_INTERFACE, interface_name, | 168 if (0 == strncmp(PPP_MESSAGING_INTERFACE, interface_name, |
167 strlen(PPP_MESSAGING_INTERFACE))) { | 169 strlen(PPP_MESSAGING_INTERFACE))) { |
168 CHECK(ppp == NULL); | 170 CHECK(ppp == NULL); |
169 return &ppp_messaging_interface; | 171 return &ppp_messaging_interface; |
170 } | 172 } |
171 // All other interfaces are to be optionally supplied by the tester, | 173 // All other interfaces are to be optionally supplied by the tester, |
172 // so we return whatever was added in SetupPluginInterfaces() (if anything). | 174 // so we return whatever was added in SetupPluginInterfaces() (if anything). |
173 return ppp; | 175 return ppp; |
174 } | 176 } |
OLD | NEW |