Index: extensions/renderer/api_type_reference_map.h |
diff --git a/extensions/renderer/api_type_reference_map.h b/extensions/renderer/api_type_reference_map.h |
index cf572bd167781bb5e1a49c75f4a7eb4c8aad97db..e96099657025babc2b2db603a882ad973449e1d8 100644 |
--- a/extensions/renderer/api_type_reference_map.h |
+++ b/extensions/renderer/api_type_reference_map.h |
@@ -13,10 +13,10 @@ |
#include "base/macros.h" |
namespace extensions { |
+class APISignature; |
class ArgumentSpec; |
-// A map from type name -> ArgumentSpec for API type definitions. This is used |
-// when an argument is declared to be a reference to a type defined elsewhere. |
+// A map storing type specifications and method signatures for API definitions. |
class APITypeReferenceMap { |
public: |
// A callback used to initialize an unknown type, so that these can be |
@@ -32,6 +32,17 @@ class APITypeReferenceMap { |
// Returns the spec for the given |name|. |
const ArgumentSpec* GetSpec(const std::string& name) const; |
+ // Adds the |signature| to the map under the given |name|. |name| is expected |
+ // to be fully qualified with API, type, and method (e.g. |
+ // storage.StorageArea.get). |
+ void AddTypeMethodSignature(const std::string& name, |
+ std::unique_ptr<APISignature> signature); |
+ |
+ // Returns the signature for the given |name|. |name| is expected |
+ // to be fully qualified with API, type, and method (e.g. |
+ // storage.StorageArea.get). |
+ const APISignature* GetTypeMethodSignature(const std::string& name) const; |
+ |
bool empty() const { return type_refs_.empty(); } |
size_t size() const { return type_refs_.size(); } |
@@ -40,6 +51,8 @@ class APITypeReferenceMap { |
std::map<std::string, std::unique_ptr<ArgumentSpec>> type_refs_; |
+ std::map<std::string, std::unique_ptr<APISignature>> type_methods_; |
+ |
DISALLOW_COPY_AND_ASSIGN(APITypeReferenceMap); |
}; |