| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 const void* const iface_; | 74 const void* const iface_; |
| 75 const Permission required_permission_; | 75 const Permission required_permission_; |
| 76 | 76 |
| 77 bool sent_to_uma_; | 77 bool sent_to_uma_; |
| 78 base::Lock sent_to_uma_lock_; | 78 base::Lock sent_to_uma_lock_; |
| 79 }; | 79 }; |
| 80 // Give friendship for HashInterfaceName. | 80 // Give friendship for HashInterfaceName. |
| 81 friend class InterfaceInfo; | 81 friend class InterfaceInfo; |
| 82 | 82 |
| 83 typedef base::ScopedPtrHashMap<std::string, InterfaceInfo> | 83 typedef base::ScopedPtrHashMap<std::string, scoped_ptr<InterfaceInfo>> |
| 84 NameToInterfaceInfoMap; | 84 NameToInterfaceInfoMap; |
| 85 | 85 |
| 86 void AddProxy(ApiID id, InterfaceProxy::Factory factory); | 86 void AddProxy(ApiID id, InterfaceProxy::Factory factory); |
| 87 | 87 |
| 88 // Permissions is the type of permission required to access the corresponding | 88 // Permissions is the type of permission required to access the corresponding |
| 89 // interface. Currently this must be just one unique permission (rather than | 89 // interface. Currently this must be just one unique permission (rather than |
| 90 // a bitfield). | 90 // a bitfield). |
| 91 void AddPPB(const char* name, const void* iface, Permission permission); | 91 void AddPPB(const char* name, const void* iface, Permission permission); |
| 92 void AddPPP(const char* name, const void* iface); | 92 void AddPPP(const char* name, const void* iface); |
| 93 | 93 |
| 94 // Hash the interface name for UMA logging. | 94 // Hash the interface name for UMA logging. |
| 95 static int HashInterfaceName(const std::string& name); | 95 static int HashInterfaceName(const std::string& name); |
| 96 | 96 |
| 97 PpapiPermissions permissions_; | 97 PpapiPermissions permissions_; |
| 98 | 98 |
| 99 NameToInterfaceInfoMap name_to_browser_info_; | 99 NameToInterfaceInfoMap name_to_browser_info_; |
| 100 NameToInterfaceInfoMap name_to_plugin_info_; | 100 NameToInterfaceInfoMap name_to_plugin_info_; |
| 101 | 101 |
| 102 InterfaceProxy::Factory id_to_factory_[API_ID_COUNT]; | 102 InterfaceProxy::Factory id_to_factory_[API_ID_COUNT]; |
| 103 | 103 |
| 104 DISALLOW_COPY_AND_ASSIGN(InterfaceList); | 104 DISALLOW_COPY_AND_ASSIGN(InterfaceList); |
| 105 }; | 105 }; |
| 106 | 106 |
| 107 } // namespace proxy | 107 } // namespace proxy |
| 108 } // namespace ppapi | 108 } // namespace ppapi |
| 109 | 109 |
| 110 #endif // PPAPI_PROXY_INTERFACE_LIST_H_ | 110 #endif // PPAPI_PROXY_INTERFACE_LIST_H_ |
| 111 | 111 |
| OLD | NEW |