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

Side by Side Diff: chrome/common/extensions/api/declarative_content.json

Issue 19045002: Use Blink support to watch CSS selectors directly instead of using a MutationObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unCamelCase in Chrome code. Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/chrome_renderer.gypi ('k') | chrome/renderer/extensions/content_watcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 [ 5 [
6 { 6 {
7 "namespace": "declarativeContent", 7 "namespace": "declarativeContent",
8 "description": "Use the <code>chrome.declarativeContent</code> API to take a ctions depending on the content of a page, without requiring permission to read the page's content.", 8 "description": "Use the <code>chrome.declarativeContent</code> API to take a ctions depending on the content of a page, without requiring permission to read the page's content.",
9 "documentation_permissions_required": ["declarative", "declarativeContent"], 9 "documentation_permissions_required": ["declarative", "declarativeContent"],
10 "types": [ 10 "types": [
11 { 11 {
12 "id": "PageStateMatcher", 12 "id": "PageStateMatcher",
13 "type": "object", 13 "type": "object",
14 "description": "Matches the state of a web page by various criteria.", 14 "description": "Matches the state of a web page by various criteria.",
15 "properties": { 15 "properties": {
16 "pageUrl": { 16 "pageUrl": {
17 "$ref": "events.UrlFilter", 17 "$ref": "events.UrlFilter",
18 "description": "Matches if the condition of the UrlFilter are fulfil led for the top-level URL of the page.", 18 "description": "Matches if the condition of the UrlFilter are fulfil led for the top-level URL of the page.",
19 "optional": true 19 "optional": true
20 }, 20 },
21 "css": { 21 "css": {
22 "type": "array", 22 "type": "array",
23 "optional": true, 23 "optional": true,
24 "description": "Matches if all of the CSS selectors in the array mat ch in a frame with the same origin as the page's main frame. Note that listing hundreds of CSS selectors here can slow down web sites.", 24 "description": "Matches if all of the CSS selectors in the array mat ch in a frame with the same origin as the page's main frame. Note that listing hundreds of CSS selectors or CSS selectors that match hundreds of times per page can slow down web sites.",
25 // TODO(jyasskin): Figure out if we want to require all 25 // TODO(jyasskin): Figure out if we want to require all
26 // the selectors to match in the same frame, or allow several 26 // the selectors to match in the same frame, or allow several
27 // frames to contribute to a match. 27 // frames to contribute to a match.
28 "items": { "type": "string" } 28 "items": { "type": "string" }
29 // TODO(jyasskin): Validate that the selectors in this 29 // },
30 // array are valid. Otherwise, we can get exceptions from
31 // content_watcher.js:FindMatchingSelectors() long after the
32 // rule is registered.
33 // },
34 // TODO: "text": { 30 // TODO: "text": {
35 // "type": "array", 31 // "type": "array",
36 // "optional": true, 32 // "optional": true,
37 // "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>.", 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>.",
38 // "items": { "type": "string" } 34 // "items": { "type": "string" }
39 }, 35 },
40 "instanceType": { 36 "instanceType": {
41 "type": "string", "enum": ["declarativeContent.PageStateMatcher"], 37 "type": "string", "enum": ["declarativeContent.PageStateMatcher"],
42 "nodoc": true 38 "nodoc": true
43 } 39 }
(...skipping 21 matching lines...) Expand all
65 "supportsRules": true, 61 "supportsRules": true,
66 "conditions": ["declarativeContent.PageStateMatcher"], 62 "conditions": ["declarativeContent.PageStateMatcher"],
67 "actions": [ 63 "actions": [
68 "declarativeContent.ShowPageAction" 64 "declarativeContent.ShowPageAction"
69 ] 65 ]
70 } 66 }
71 } 67 }
72 ] 68 ]
73 } 69 }
74 ] 70 ]
OLDNEW
« no previous file with comments | « chrome/chrome_renderer.gypi ('k') | chrome/renderer/extensions/content_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698