Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 [ | |
| 6 { | |
| 7 "namespace": "declarativeContent", | |
| 8 "documentation_permissions_required": ["declarative", "declarativeContent"], | |
| 9 "types": [ | |
| 10 { | |
| 11 "id": "PageStateMatcher", | |
| 12 "type": "object", | |
| 13 "description": "Matches the state of a web page by various criteria.", | |
| 14 "properties": { | |
| 15 "top_url": { | |
|
Matt Perry
2012/12/13 20:27:48
topUrl (or maybe pageUrl)
Jeffrey Yasskin
2012/12/14 00:38:20
Done. (pageUrl)
| |
| 16 "$ref": "events.UrlFilter", | |
| 17 "description": "Matches if the condition of the UrlFilter are fulfil led for the top-level URL of the page.", | |
| 18 "optional": true | |
| 19 }, | |
| 20 "css": { | |
| 21 "type": "array", | |
| 22 "optional": true, | |
| 23 "description": "Matches if all of the CSS selectors in the array mat ch in the document. Note that listing hundreds of CSS selectors here can slow d own web sites.", | |
| 24 "items": { "type": "string" } | |
| 25 // TODO(jyasskin): Validate that the selectors in this | |
| 26 // array are valid. Otherwise, we can get exceptions from | |
| 27 // content_watcher.js:FindMatchingSelectors() long after the | |
| 28 // rule is registered. | |
| 29 // }, | |
| 30 // TODO: "text": { | |
| 31 // "type": "array", | |
| 32 // "optional": true, | |
| 33 // "description": "Matches if all of the regular expressions in the a rray match text in the page. The regular expressions use the <a href=\"http://co de.google.com/p/re2/wiki/Syntax\">RE2 syntax</a>.", | |
| 34 // "items": { "type": "string" } | |
| 35 }, | |
| 36 "instanceType": { | |
| 37 "type": "string", "enum": ["declarativeContent.PageStateMatcher"], | |
| 38 "nodoc": true | |
| 39 } | |
| 40 } | |
| 41 }, | |
| 42 { | |
| 43 "id": "ShowPageAction", | |
| 44 "description": "Declarative event action that shows the extension's page action while the corresponding conditions are met.", | |
| 45 "type": "object", | |
| 46 "properties": { | |
| 47 "instanceType": { | |
| 48 "type": "string", "enum": ["declarativeContent.ShowPageAction"], | |
| 49 "nodoc": true | |
| 50 } | |
| 51 } | |
| 52 } | |
| 53 ], | |
| 54 "functions": [ | |
| 55 ], | |
| 56 "events": [ | |
| 57 { | |
| 58 "name": "onPageChanged", | |
| 59 "options": { | |
| 60 "supportsListeners": false, | |
| 61 "supportsRules": true, | |
| 62 "conditions": ["declarativeContent.PageStateMatcher"], | |
| 63 "actions": [ | |
| 64 "declarativeContent.ShowPageAction" | |
| 65 ] | |
| 66 } | |
| 67 } | |
| 68 ] | |
| 69 } | |
| 70 ] | |
| OLD | NEW |