Extensions Docs Server: Support rules and filtered events

Currently, there aren't any APIs that use filtered events, but webNavigation
will soon.

BUG=142560


Review URL: https://chromiumcodereview.appspot.com/10828403

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152490 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/tools/json_schema_compiler/model.py b/tools/json_schema_compiler/model.py
index 0c18c91f..e377295c 100644
--- a/tools/json_schema_compiler/model.py
+++ b/tools/json_schema_compiler/model.py
@@ -129,14 +129,21 @@
     self.optional = json.get('optional', False)
     self.parent = parent
     self.nocompile = json.get('nocompile')
+    options = json.get('options', {})
+    self.conditions = options.get('conditions', [])
+    self.actions = options.get('actions', [])
+    self.supports_listeners = options.get('supportsListeners', True)
+    self.supports_rules = options.get('supportsRules', False)
+    def GeneratePropertyFromParam(p):
+      return Property(self,
+                      p['name'], p,
+                      from_json=from_json,
+                      from_client=from_client)
 
+    self.filters = [GeneratePropertyFromParam(filter)
+                    for filter in json.get('filters', [])]
     callback_param = None
     for param in json.get('parameters', []):
-      def GeneratePropertyFromParam(p):
-        return Property(self,
-                        p['name'], p,
-                        from_json=from_json,
-                        from_client=from_client)
 
       if param.get('type') == 'function':
         if callback_param: