Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9454)

Unified Diff: chrome/common/extensions/api/experimental.declarative.json

Issue 10257006: Move Declarative Web Request API out of experimental and make it a feature (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with ToT Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/experimental.declarative.json
diff --git a/chrome/common/extensions/api/experimental.declarative.json b/chrome/common/extensions/api/experimental.declarative.json
deleted file mode 100644
index 18417f4eb360f0374f7a452e59292a5e99570252..0000000000000000000000000000000000000000
--- a/chrome/common/extensions/api/experimental.declarative.json
+++ /dev/null
@@ -1,232 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-[
- {
- "namespace": "experimental.declarative",
- "internal": true,
- "types": [
- {
- "id": "Rule",
- "type": "object",
- "description": "Description of a declarative rule for handling events.",
- "properties": {
- "id": {
- "type": "string",
- "optional": true,
- "description": "Optional identifier that allows referencing this rule."
- },
- "conditions": {
- "type": "array",
- "items": {"type": "any"},
- "description": "List of conditions that can trigger the actions."
- },
- "actions": {
- "type": "array",
- "items": {"type": "any"},
- "description": "List of actions that are triggered if one of the condtions is fulfilled."
- },
- "priority": {
- "type": "integer",
- "optional": true,
- "description": "Optional priority of this rule. Defaults to 100."
- }
- }
- },
- {
- "id": "UrlFilter",
- "type": "object",
- "description": "Filters URLs for various criteria",
- "nocompile": true,
- "properties": {
- "hostContains": {
- "type": "string",
- "description": "Matches if the host name of the URL contains a specified string.",
- "optional": true
- },
- "hostEquals": {
- "type": "string",
- "description": "Matches if the host name of the URL is equal to a specified string.",
- "optional": true
- },
- "hostPrefix": {
- "type": "string",
- "description": "Matches if the host name of the URL starts with a specified string.",
- "optional": true
- },
- "hostSuffix": {
- "type": "string",
- "description": "Matches if the host name of the URL ends with a specified string.",
- "optional": true
- },
- "pathContains": {
- "type": "string",
- "description": "Matches if the path segment of the URL contains a specified string.",
- "optional": true
- },
- "pathEquals": {
- "type": "string",
- "description": "Matches if the path segment of the URL is equal to a specified string.",
- "optional": true
- },
- "pathPrefix": {
- "type": "string",
- "description": "Matches if the path segment of the URL starts with a specified string.",
- "optional": true
- },
- "pathSuffix": {
- "type": "string",
- "description": "Matches if the path segment of the URL ends with a specified string.",
- "optional": true
- },
- "queryEquals": {
- "type": "string",
- "description": "Matches if the query segment of the URL is equal to a specified string.",
- "optional": true
- },
- "queryPrefix": {
- "type": "string",
- "description": "Matches if the query segment of the URL starts with a specified string.",
- "optional": true
- },
- "querySuffix": {
- "type": "string",
- "description": "Matches if the query segment of the URL ends with a specified string.",
- "optional": true
- },
- "urlSuffix": {
- "type": "string",
- "description": "Matches if the URL ends with a specified string.",
- "optional": true
- },
- "urlEquals": {
- "type": "string",
- "description": "Matches if the URL is equal to a specified string.",
- "optional": true
- },
- "urlPrefix": {
- "type": "string",
- "description": "Matches if the URL starts with a specified string.",
- "optional": true
- },
- "urlSuffix": {
- "type": "string",
- "description": "Matches if the URL ends with a specified string.",
- "optional": true
- },
- "schemes": {
- "type": "array",
- "description": "Matches if the scheme of the URL is equal to any of the schemes specified in the array.",
- "optional": true,
- "items": { "type": "string" }
- },
- "ports": {
- "type": "array",
- "description": "Matches if the port of the URL is contained in any of the specified port lists. For example <code>[80, 443, [1000, 1200]]</code> matches all requests on port 80, 443 and in the range 1000-1200.",
- "optional": true,
- "items": {
- "choices": [
- {"type": "integer", "description": "A specific port."},
- {"type": "array", "items": {"type": "integer"}, "description": "A pair of integers identiying the start and end (both inclusive) of a port range."}
- ]
- }
- }
- }
- }
- ],
- "functions": [
- {
- "name": "addRules",
- "type": "function",
- "description": "Registers rules to handle events.",
- "parameters": [
- {
- "name": "eventName",
- "type": "string",
- "description": "Name of the event this function affects."
- },
- {
- "name": "rules",
- "type": "array",
- "items": {"$ref": "Rule"},
- "description": "Rules to be registered. These do not replace previously registered rules."
- },
- {
- "name": "callback",
- "optional": true,
- "type": "function",
- "parameters": [
- {
- "name": "rules",
- "type": "array",
- "items": {"$ref": "Rule"},
- "description": "Rules that were registered, the optional parameters are filled with values."
- }
- ],
- "description": "Called with registered rules."
- }
- ]
- },
- {
- "name": "getRules",
- "type": "function",
- "description": "Returns currently registered rules.",
- "parameters": [
- {
- "name": "eventName",
- "type": "string",
- "description": "Name of the event this function affects."
- },
- {
- "name": "ruleIdentifiers",
- "optional": "true",
- "type": "array",
- "items": {"type": "string"},
- "description": "If an array is passed, only rules with identifiers contained in this array are returned."
- },
- {
- "name": "callback",
- "type": "function",
- "parameters": [
- {
- "name": "rules",
- "type": "array",
- "items": {"$ref": "Rule"},
- "description": "Rules that were registered, the optional parameters are filled with values."
- }
- ],
- "description": "Called with registered rules."
- }
- ]
- },
- {
- "name": "removeRules",
- "type": "function",
- "description": "Unregisters currently registered rules.",
- "parameters": [
- {
- "name": "eventName",
- "type": "string",
- "description": "Name of the event this function affects."
- },
- {
- "name": "ruleIdentifiers",
- "optional": "true",
- "type": "array",
- "items": {"type": "string"},
- "description": "If an array is passed, only rules with identifiers contained in this array are unregistered."
- },
- {
- "name": "callback",
- "optional": true,
- "type": "function",
- "parameters": [],
- "description": "Called when rules were unregistered."
- }
- ]
- }
- ]
- }
-]
-
« no previous file with comments | « chrome/common/extensions/api/declarativeWebRequest.json ('k') | chrome/common/extensions/api/experimental.webRequest.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698