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 enum PluginIFSupport { |
114 INTERFACE_UNQUERIED = 0, // Must be 0 so memset(0) will clear the list. | |
115 INTERFACE_SUPPORTED, | 114 INTERFACE_SUPPORTED, |
116 INTERFACE_UNSUPPORTED | 115 INTERFACE_UNSUPPORTED |
117 }; | 116 }; |
118 PluginInterfaceSupport plugin_interface_support_[INTERFACE_ID_COUNT]; | 117 typedef std::map<std::string, PluginIFSupport> PluginIFSupportMap; |
118 // Maps interface name to whether that interface is supported. If an interface | |
119 // name is not in the map, that implies that we haven't queried for it yet. | |
120 std::map<std::string, PluginIFSupport> plugin_if_support_; | |
brettw
2011/06/24 00:35:24
I guess I would have just done:
std::map<std::stri
dmichael (off chromium)
2011/06/29 16:13:57
Good suggestion. Done.
| |
119 | 121 |
120 // All target proxies currently created. These are ones that receive | 122 // All target proxies currently created. These are ones that receive |
121 // messages. They are created on demand when we receive messages. | 123 // messages. They are created on demand when we receive messages. |
122 scoped_ptr<InterfaceProxy> target_proxies_[INTERFACE_ID_COUNT]; | 124 scoped_ptr<InterfaceProxy> target_proxies_[INTERFACE_ID_COUNT]; |
123 | 125 |
124 // Function proxies created for "new-style" FunctionGroups. | 126 // Function proxies created for "new-style" FunctionGroups. |
125 // TODO(brettw) this is in progress. It should be merged with the target | 127 // TODO(brettw) this is in progress. It should be merged with the target |
126 // proxies so there is one list to consult. | 128 // proxies so there is one list to consult. |
127 scoped_ptr< ::ppapi::FunctionGroupBase > | 129 scoped_ptr< ::ppapi::FunctionGroupBase > |
128 function_proxies_[INTERFACE_ID_COUNT]; | 130 function_proxies_[INTERFACE_ID_COUNT]; |
(...skipping 25 matching lines...) Expand all Loading... | |
154 private: | 156 private: |
155 HostDispatcher* dispatcher_; | 157 HostDispatcher* dispatcher_; |
156 | 158 |
157 DISALLOW_COPY_AND_ASSIGN(ScopedModuleReference); | 159 DISALLOW_COPY_AND_ASSIGN(ScopedModuleReference); |
158 }; | 160 }; |
159 | 161 |
160 } // namespace proxy | 162 } // namespace proxy |
161 } // namespace pp | 163 } // namespace pp |
162 | 164 |
163 #endif // PPAPI_PROXY_HOST_DISPATCHER_H_ | 165 #endif // PPAPI_PROXY_HOST_DISPATCHER_H_ |
OLD | NEW |