Chromium Code Reviews| Index: chrome/browser/extensions/api/declarative/rules_registry.h |
| diff --git a/chrome/browser/extensions/api/declarative/rules_registry.h b/chrome/browser/extensions/api/declarative/rules_registry.h |
| index 8e816dd3a16d738265d98e0559d5ba27daec40b7..01e9297c897ce81ea767f7bc29e21b2b31d72642 100644 |
| --- a/chrome/browser/extensions/api/declarative/rules_registry.h |
| +++ b/chrome/browser/extensions/api/declarative/rules_registry.h |
| @@ -9,6 +9,9 @@ |
| #include <string> |
| #include <vector> |
| +#include "chrome/common/extensions/api/experimental.declarative.h" |
| +#include "content/public/browser/browser_thread.h" |
| + |
| namespace base { |
| class DictionaryValue; |
| } |
| @@ -18,6 +21,8 @@ namespace extensions { |
| // Interface for rule registries. |
| class RulesRegistry { |
| public: |
| + typedef extensions::api::experimental_declarative::Rule Rule; |
|
Matt Perry
2012/02/21 23:43:42
I believe "using extensions::api::experimental_dec
battre
2012/02/28 22:29:18
This does not work.
|
| + |
| virtual ~RulesRegistry() {} |
| // Registers |rules|, owned by |extension_id| to this RulesRegistry. |
| @@ -37,7 +42,7 @@ class RulesRegistry { |
| // relevant are added or none. |
| virtual std::string AddRules( |
| const std::string& extension_id, |
| - const std::vector<base::DictionaryValue*>& rules) = 0; |
| + const std::vector<linked_ptr<Rule> >& rules) = 0; |
| // Unregisters all rules listed in |rule_identifiers| and owned by |
| // |extension_id| from this RulesRegistry. |
| @@ -64,15 +69,18 @@ class RulesRegistry { |
| // message otherwise. |
| virtual std::string GetRules(const std::string& extension_id, |
| const std::vector<std::string>& rule_identifiers, |
| - std::vector<base::DictionaryValue*>* out) = 0; |
| + std::vector<linked_ptr<Rule> >* out) = 0; |
| // Same as GetRules but returns all rules owned by |extension_id|. |
| virtual std::string GetAllRules(const std::string& extension_id, |
| - std::vector<base::DictionaryValue*>* out) = 0; |
| + std::vector<linked_ptr<Rule> >* out) = 0; |
| // Called to notify the RulesRegistry that an extension has been unloaded |
| // and all rules of this extension need to be removed. |
| virtual void OnExtensionUnloaded(const std::string& extension_id) = 0; |
| + |
| + // Returns the ID of the thread on which the rules registry lives. |
| + virtual content::BrowserThread::ID GetOwnerThread() = 0; |
| }; |
| } // namespace extensions |