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_PROXY_INTERFACE_LIST_H_ | 5 #ifndef PPAPI_PROXY_INTERFACE_LIST_H_ |
6 #define PPAPI_PROXY_INTERFACE_LIST_H_ | 6 #define PPAPI_PROXY_INTERFACE_LIST_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 : id(in_id), | 45 : id(in_id), |
46 iface(in_interface) { | 46 iface(in_interface) { |
47 } | 47 } |
48 | 48 |
49 ApiID id; | 49 ApiID id; |
50 const void* iface; | 50 const void* iface; |
51 }; | 51 }; |
52 | 52 |
53 typedef std::map<std::string, InterfaceInfo> NameToInterfaceInfoMap; | 53 typedef std::map<std::string, InterfaceInfo> NameToInterfaceInfoMap; |
54 | 54 |
| 55 // Registers the Flash-specific interfaces. |
| 56 // |
| 57 // TODO(brettw) these should be moved somewhere separately so we can compile |
| 58 // the proxy for NaCl without Flash interface support. |
| 59 void AddFlashInterfaces(); |
| 60 |
55 void AddProxy(ApiID id, InterfaceProxy::Factory factory); | 61 void AddProxy(ApiID id, InterfaceProxy::Factory factory); |
56 | 62 |
57 void AddPPB(const char* name, ApiID id, const void* iface); | 63 void AddPPB(const char* name, ApiID id, const void* iface); |
58 void AddPPP(const char* name, ApiID id, const void* iface); | 64 void AddPPP(const char* name, ApiID id, const void* iface); |
59 | 65 |
60 // Old-style add functions. These should be removed when the rest of the | 66 // Old-style add functions. These should be removed when the rest of the |
61 // proxies are converted over to using the new system. | 67 // proxies are converted over to using the new system. |
62 void AddPPB(const InterfaceProxy::Info* info); | 68 void AddPPB(const InterfaceProxy::Info* info); |
63 void AddPPP(const InterfaceProxy::Info* info); | 69 void AddPPP(const InterfaceProxy::Info* info); |
64 | 70 |
65 NameToInterfaceInfoMap name_to_browser_info_; | 71 NameToInterfaceInfoMap name_to_browser_info_; |
66 NameToInterfaceInfoMap name_to_plugin_info_; | 72 NameToInterfaceInfoMap name_to_plugin_info_; |
67 | 73 |
68 InterfaceProxy::Factory id_to_factory_[API_ID_COUNT]; | 74 InterfaceProxy::Factory id_to_factory_[API_ID_COUNT]; |
69 | 75 |
70 DISALLOW_COPY_AND_ASSIGN(InterfaceList); | 76 DISALLOW_COPY_AND_ASSIGN(InterfaceList); |
71 }; | 77 }; |
72 | 78 |
73 } // namespace proxy | 79 } // namespace proxy |
74 } // namespace ppapi | 80 } // namespace ppapi |
75 | 81 |
76 #endif // PPAPI_PROXY_INTERFACE_LIST_H_ | 82 #endif // PPAPI_PROXY_INTERFACE_LIST_H_ |
77 | 83 |
OLD | NEW |