| 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_HOST_DISPATCHER_H_ | 5 #ifndef PPAPI_PROXY_HOST_DISPATCHER_H_ |
| 6 #define PPAPI_PROXY_HOST_DISPATCHER_H_ | 6 #define PPAPI_PROXY_HOST_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 private: | 104 private: |
| 105 friend class HostDispatcherTest; | 105 friend class HostDispatcherTest; |
| 106 | 106 |
| 107 // Makes an instance of the given PPB interface proxy, storing it in the | 107 // Makes an instance of the given PPB interface proxy, storing it in the |
| 108 // target_proxies_ array. An proxy for this interface must not exist yet. | 108 // target_proxies_ array. An proxy for this interface must not exist yet. |
| 109 InterfaceProxy* CreatePPBInterfaceProxy(const InterfaceProxy::Info* info); | 109 InterfaceProxy* CreatePPBInterfaceProxy(const InterfaceProxy::Info* info); |
| 110 | 110 |
| 111 PP_Module pp_module_; | 111 PP_Module pp_module_; |
| 112 | 112 |
| 113 enum PluginInterfaceSupport { | 113 typedef std::map<std::string, bool> PluginIFSupportedMap; |
| 114 INTERFACE_UNQUERIED = 0, // Must be 0 so memset(0) will clear the list. | 114 // Maps interface name to whether that interface is supported. If an interface |
| 115 INTERFACE_SUPPORTED, | 115 // name is not in the map, that implies that we haven't queried for it yet. |
| 116 INTERFACE_UNSUPPORTED | 116 std::map<std::string, bool> plugin_if_supported_; |
| 117 }; | |
| 118 PluginInterfaceSupport plugin_interface_support_[INTERFACE_ID_COUNT]; | |
| 119 | 117 |
| 120 // All target proxies currently created. These are ones that receive | 118 // All target proxies currently created. These are ones that receive |
| 121 // messages. They are created on demand when we receive messages. | 119 // messages. They are created on demand when we receive messages. |
| 122 scoped_ptr<InterfaceProxy> target_proxies_[INTERFACE_ID_COUNT]; | 120 scoped_ptr<InterfaceProxy> target_proxies_[INTERFACE_ID_COUNT]; |
| 123 | 121 |
| 124 // Function proxies created for "new-style" FunctionGroups. | 122 // Function proxies created for "new-style" FunctionGroups. |
| 125 // TODO(brettw) this is in progress. It should be merged with the target | 123 // TODO(brettw) this is in progress. It should be merged with the target |
| 126 // proxies so there is one list to consult. | 124 // proxies so there is one list to consult. |
| 127 scoped_ptr< ::ppapi::FunctionGroupBase > | 125 scoped_ptr< ::ppapi::FunctionGroupBase > |
| 128 function_proxies_[INTERFACE_ID_COUNT]; | 126 function_proxies_[INTERFACE_ID_COUNT]; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 154 private: | 152 private: |
| 155 HostDispatcher* dispatcher_; | 153 HostDispatcher* dispatcher_; |
| 156 | 154 |
| 157 DISALLOW_COPY_AND_ASSIGN(ScopedModuleReference); | 155 DISALLOW_COPY_AND_ASSIGN(ScopedModuleReference); |
| 158 }; | 156 }; |
| 159 | 157 |
| 160 } // namespace proxy | 158 } // namespace proxy |
| 161 } // namespace pp | 159 } // namespace pp |
| 162 | 160 |
| 163 #endif // PPAPI_PROXY_HOST_DISPATCHER_H_ | 161 #endif // PPAPI_PROXY_HOST_DISPATCHER_H_ |
| OLD | NEW |